mirror of
https://github.com/google/gn-language-server.git
synced 2025-12-23 12:26:43 +00:00
A language server for GN, and a tiny VSCode extension wrapping the server.
|
Some checks are pending
CI / lint (push) Waiting to run
CI / language-server (aarch64-apple-darwin) (push) Waiting to run
CI / language-server (x86_64-unknown-linux-musl) (push) Waiting to run
CI / language-server (x86_64-pc-windows-msvc) (push) Waiting to run
CI / vscode-extension (darwin-arm64) (push) Waiting to run
CI / vscode-extension (linux-x64) (push) Waiting to run
CI / vscode-extension (win32-x64) (push) Waiting to run
CI / publish-vscode (push) Blocked by required conditions
CI / publish-cargo (push) Blocked by required conditions
|
||
|---|---|---|
| .github/workflows | ||
| docs/screenshots | ||
| scripts | ||
| src | ||
| testdata/workspaces | ||
| vscode-gn | ||
| .clippy.toml | ||
| .gitignore | ||
| build.rs | ||
| Cargo.lock | ||
| Cargo.toml | ||
| CHANGELOG.md | ||
| CONTRIBUTING.md | ||
| deny.toml | ||
| LICENSE | ||
| README.md | ||
GN Language Server
A language server for GN, the build configuration language used in Chromium, Fuchsia, and other projects.
Features
- Syntax highlighting
- Syntax error reporting
- Context-aware completion
- Hover documentation
- Go to definition
- Finding target references
- Following imports
- Following dependencies
- Sticky scroll with useful lines
- Outline
- Code folding
- Formatting
- Go to the nearest
BUILD.gn(VSCode only)
Installing
VSCode
You can install from the official marketplace. Search for "GN Language" in the VSCode's extension window.
Other Editors/IDEs
You can install the language server with Cargo.
cargo install gn-language-server
Gallery
Syntax highlighting
Completion
Hover documentation
Go to definition
Following imports
Following dependencies
Sticky scroll with useful lines
Outline
Code folding
Building from source
Language server binary
cargo build --release
VSCode extension
cd vscode-gn
npm install
npm run build
npm run package
Versioning scheme
We use the versioning scheme recommended by the VSCode's official documentation. That is:
- Pre-release versions are
1.<odd>.x - Release versions are
1.<even>.x
Disclaimer
This is not an officially supported Google product. This project is not eligible for the Google Open Source Software Vulnerability Rewards Program.









