Skip to content
An Emacs major-mode for editing GN (generate ninja build) files
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.



A major-mode for editing GN (ninja generator) config files in Emacs. Files of this type (e.g. or *.gni) are common in Chromium-derived projects like Chrome and (Anaheim) Edge.


  • Syntax hilighting - working correct
  • Indentation - as correct as feasible without a complete parser
  • Context-sensitive-help - keywords and variables only for now

Changes in 0.4

  • Fixed indentation hangs with evil-mode motion control.
  • Fixed indentation text removal or hangs with over-indented regions at the end of the buffer.

To-Do features

  • Maybe better help for operators / site-defined symbols
  • Maybe offer to use "gn format" for cleanup
You can’t perform that action at this time.