Syntax highlighting for ninja build files
Switch branches/tags
Nothing to show
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.

ninja syntax

Synxtax highlighting for ninja build files adapted from SublimeNinja.


Direct port of SublimeNinja, with minor fixes.

Release Notes


  • Tweak regex to not match comments following declarations.

    Even though the ninja manual does not explicitly state this,

    • Comments cannot follow variable declarations (since the # will simply be part of the string)
    • Comments cannot follow rule declarations (parser errors occur)

    Change regex so these are not mistakenly highlighted as comments.

  • Configure line comment symbol (#) so editor.action.commentLine etc. will work properly.