A language server for GN, and a tiny VSCode extension wrapping the server.
Find a file
nightly-bump[bot] 0d91c0a491
Some checks failed
CI / lint (push) Has been cancelled
CI / build (darwin-arm64) (push) Has been cancelled
CI / build (linux-x64) (push) Has been cancelled
CI / build (win32-x64) (push) Has been cancelled
CI / attestation (push) Has been cancelled
CI / upload-release-artifacts (push) Has been cancelled
CI / publish-vscode (push) Has been cancelled
CI / publish-cargo (push) Has been cancelled
Bump version to 1.9.7
2025-11-01 03:28:40 +00:00
.github/workflows Add attestations 2025-11-01 10:56:53 +09:00
docs/screenshots
scripts Fix builtins generation 2025-08-17 13:27:13 +09:00
src Rename AnalysisNode to CacheNode 2025-10-01 11:24:05 +09:00
testdata/workspaces
vscode-gn Bump version to 1.9.7 2025-11-01 03:28:40 +00:00
.clippy.toml
.gitignore
ARCHITECTURE.md
build.rs
Cargo.lock Bump version to 1.9.7 2025-11-01 03:28:40 +00:00
Cargo.toml Bump version to 1.9.7 2025-11-01 03:28:40 +00:00
CHANGELOG.md Release 1.8.0 2025-10-01 12:11:59 +09:00
CONTRIBUTING.md
deny.toml
LICENSE
README.md Add link to the vscode and openvsx marketplace. 2025-10-01 11:22:55 +09:00

GN Language Server

CI

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 VSCode marketplace or the OpenVSX marketplace. Search for "GN Language" in the VSCode's extension window.

VSCode Marketplace

Other Editors/IDEs

You can install the language server with Cargo.

cargo install gn-language-server

Syntax highlighting

Syntax highlighting

Completion

Completion

Hover documentation

Hover documentation

Go to definition

Go to definition

Following imports

Following imports

Following dependencies

Following dependencies

Sticky scroll with useful lines

Sticky scroll with useful lines

Outline

Outline

Code folding

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

Architecture

For an overview of the project's architecture, see ARCHITECTURE.md.

Disclaimer

This is not an officially supported Google product. This project is not eligible for the Google Open Source Software Vulnerability Rewards Program.