Re: [chromium-dev] [PSA] Introducing a GN Language Server for Chromium development

29 views
Skip to first unread message

Dirk Pranke

unread,
Jan 6, 2026, 11:56:36 AM (13 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

On Mon, Jan 5, 2026 at 1:03 PM Shuhei Takahashi <n...@chromium.org> wrote:
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>

--
--
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.

Aaron Wood

unread,
Jan 6, 2026, 6:59:36 PM (13 days ago) Jan 6
to n...@google.com, gn-dev
This is fantastic!  I've been using it with Fuchsia, and we've switched to it as our recommended GN extension for the Fuchsia project.  Having the ability to jump to the definition of a template is amazingly useful for us, given the complexity of the templates we have.  Thanks so much! 

To unsubscribe from this group and stop receiving emails from it, send an email to gn-dev+un...@chromium.org.

Roland McGrath

unread,
Jan 6, 2026, 7:19:23 PM (13 days ago) Jan 6
to Aaron Wood, n...@google.com, gn-dev
I've been using it in Emacs via eglot for quite some time and it is a real boon for everyone working in GN code.  I think a few of the fancier features are only really available in VSCode and not in other LSP clients, but what I get even in the older version posted months ago is pretty great.  I'll have to find where I put it and upgrade to the new version!

Shuhei Takahashi (nya)

unread,
Jan 7, 2026, 12:10:38 AM (13 days ago) Jan 7
to Roland McGrath, Aaron Wood, gn-dev
Thanks Aaron and Roland for liking it :) 

It's true that non-VSCode clients have a slightly limited set of features due to LSP restrictions ("jump to nearest BUILD.gn" and code lens are unavailable). Please don't hesitate to file bugs if you find any other features not working for non-VSCode clients!


On Wed, Jan 7, 2026 at 9:19 AM Roland McGrath <mcgr...@chromium.org> wrote:
I've been using it in Emacs via eglot for quite some time and it is a real boon for everyone working in GN code.  I think a few of the fancier features are only really available in VSCode and not in other LSP clients, but what I get even in the older version posted months ago is pretty great.  I'll have to find where I put it and upgrade to the new version!


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

c00lkidd

unread,
Jan 8, 2026, 2:00:37 PM (11 days ago) Jan 8
to gn-dev, n...@google.com, aaro...@google.com, gn-dev, mcgr...@chromium.org
Hello, idk how I got added to this group and who are you guys and why am I here? Why is say "Be careful sharing sensitive information. 

You are posting to a group that does not belong to your organization."

Justin Noffsinger

unread,
Jan 8, 2026, 2:04:45 PM (11 days ago) Jan 8
to gn-dev, Justin Noffsinger, n...@google.com, aaro...@google.com, gn-dev, mcgr...@chromium.org
Is this a school prank
Reply all
Reply to author
Forward
0 new messages