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.

Shuhei / nya
--