[PSA] Introducing a GN Language Server for Chromium development

124 views
Skip to first unread message

Shuhei Takahashi

unread,
Jan 5, 2026, 4:04:07 PM (4 days ago) Jan 5
to Chromium-dev, gn-dev, n...@google.com
Hi Chromium developers,

We are sharing a GN Language Server designed to assist with the GN build system in projects like Chromium and Fuchsia.

While there are other GN integrations available, this tool is specifically optimized for large-scale codebases. Unlike tools limited to single-file analysis, it provides workspace-wide symbol resolution and dependency tracking to better support the complex development workflows in the Chromium environment.

With the recent v1.10.0 release, the server includes the following features:

Features
  • Enhanced Syntax Highlighting: Provides clear visual structure, including recognition of string interpolation.
  • User-defined Variable/Template Support: Context-aware completion and hover documentation for both built-in and user-defined variables and templates.
  • Cross-file References: Support for "Go to definition," finding references, and following imports or dependencies across the entire project.
  • Sticky Scroll: Keeps block headers (such as target names or if conditions) visible at the top of the editor while you navigate through large files.
  • Outline: Offers a structured, hierarchical view of targets and blocks for easier navigation within a file.
  • Code Folding: Allows collapsing sections of code to help manage visibility in complex GN files.
  • Error Reporting: Real-time syntax error reporting to catch issues before build time.
New in v1.10.0
  • Workspace Symbol Completion with Auto-imports: Support for auto-importing variables and templates during completion, with suggestions pulled from across the workspace.
  • Undefined Variable Analysis: Highlights undefined variables to catch potential configuration errors early.
  • Code Lens: Displays reference information and quick actions directly above target definitions.
  • JetBrains IDE Support: A dedicated plugin is now available for IntelliJ, CLion, Android Studio, and other JetBrains IDEs.
Installation

Search for "GN Language" (publisher: Google) in the VSCode marketplace or the JetBrains marketplace. For other environments, you can install the server via Cargo: cargo install gn-language-server.

Screenshot 2026-01-05 at 10.40.11.png
Screenshot 2026-01-05 at 10.40.41.png

We welcome your feedback, feature requests, and bug reports on our GitHub repository: https://github.com/google/gn-language-server.

Best regards,
Shuhei / nya

--
Shuhei Takahashi a.k.a nya <n...@chromium.org>

Dirk Pranke

unread,
Jan 6, 2026, 11:58:39 AM (3 days ago) Jan 6
to n...@chromium.org, Chromium-dev, gn-dev, n...@google.com
-chromium-dev@ ...

Nice work! I look forward to trying it out very soon.

-- Dirk

--
--
Chromium Developers mailing list: chromi...@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-dev
---
You received this message because you are subscribed to the Google Groups "Chromium-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-dev...@chromium.org.
To view this discussion visit https://groups.google.com/a/chromium.org/d/msgid/chromium-dev/CANf5rkshP9xi4hjCujz0hisF_VgQfvMWqQwmVZkdtnwYg0oNfw%40mail.gmail.com.

Atharv Maan

unread,
Jan 6, 2026, 12:39:43 PM (3 days ago) Jan 6
to dpr...@chromium.org, n...@chromium.org, Chromium-dev, gn-dev, n...@google.com
Is it possible to hook it up with neovim somehow?

Thanks,
Atharv Maan


Shuhei Takahashi (nya)

unread,
Jan 6, 2026, 8:29:55 PM (3 days ago) Jan 6
to Atharv Maan, Chromium-dev
Hi Atharv,

The following issue tracks better Vim support. You can find Nvim snippet to enable the language server: https://github.com/google/gn-language-server/issues/24

It basically works with Nvim, but syntax highlighting is missing (VSCode and IntelliJ uses TextMate grammar for syntax highlighting that is not a part of LSP). Let me look into this, and will update on the issue thread.


Shuhei Takahashi a.k.a nya <n...@google.com>
Shuhei Takahashi a.k.a nya <n...@google.com>

Hayato Ito

unread,
Jan 6, 2026, 10:17:02 PM (3 days ago) Jan 6
to n...@google.com, Atharv Maan, Chromium-dev
Excellent work!

I’ve confirmed that it works in Emacs as well. Here is the configuration for Eglot:

(add-to-list 'eglot-server-programs '(gn-mode . ("gn-language-server")))

Please replace `gn-mode` with the major mode you are using for GN files.



--
Hayato
Reply all
Reply to author
Forward
0 new messages