mirror of
https://github.com/sharkdp/bat.git
synced 2024-11-07 08:24:21 +01:00
Add Ninja syntax highlighting
This commit is contained in:
parent
a3f037773a
commit
fc1f37d3df
3
.gitmodules
vendored
3
.gitmodules
vendored
@ -197,3 +197,6 @@
|
||||
[submodule "assets/syntaxes/02_Extra/Apache"]
|
||||
path = assets/syntaxes/02_Extra/Apache
|
||||
url = https://github.com/colinta/ApacheConf.tmLanguage
|
||||
[submodule "assets/syntaxes/02_Extra/Ninja"]
|
||||
path = assets/syntaxes/02_Extra/Ninja
|
||||
url = https://github.com/pope/SublimeNinja.git
|
||||
|
1
assets/syntaxes/02_Extra/Ninja
vendored
Submodule
1
assets/syntaxes/02_Extra/Ninja
vendored
Submodule
@ -0,0 +1 @@
|
||||
Subproject commit 25830aaec9316b7fca6600000535214164525d7a
|
52
assets/syntaxes/02_Extra/Ninja.sublime-syntax
vendored
Normal file
52
assets/syntaxes/02_Extra/Ninja.sublime-syntax
vendored
Normal file
@ -0,0 +1,52 @@
|
||||
%YAML 1.2
|
||||
---
|
||||
# http://www.sublimetext.com/docs/3/syntax.html
|
||||
name: Ninja
|
||||
file_extensions:
|
||||
- ninja
|
||||
scope: source.ninja
|
||||
contexts:
|
||||
main:
|
||||
- match: (#).*$\n?
|
||||
comment: Comment line.
|
||||
scope: comment.line.number-sign.ninja
|
||||
captures:
|
||||
1: punctuation.definition.comment.ninja
|
||||
- match: ^(rule)\b
|
||||
comment: Rule keyword and keywords for a rule.
|
||||
captures:
|
||||
1: keyword.other.ninja
|
||||
push:
|
||||
- match: ^(?=\S)
|
||||
pop: true
|
||||
- include: main
|
||||
- match: \b(?:command|deps|depfile|description|generator|pool|restat|rspfile|rspfile_content)\b
|
||||
scope: keyword.other.ninja
|
||||
- match: ^(pool)\b
|
||||
comment: Pool keyword and keywords for a pool.
|
||||
captures:
|
||||
1: keyword.other.ninja
|
||||
push:
|
||||
- match: ^(?=\S)
|
||||
pop: true
|
||||
- include: main
|
||||
- match: \b(?:depth)\b
|
||||
scope: keyword.other.ninja
|
||||
- match: ^(?:build|rule|default|include|subninja)\b
|
||||
comment: Other Keywords.
|
||||
scope: keyword.other.ninja
|
||||
- match: '(?:[=:]|\|{1,2})(?=\s)'
|
||||
comment: Operators for variable assignment (=), rule definition (:), implicit (|) and order only (||) dependencies.
|
||||
scope: keyword.operator.ninja
|
||||
- match: \$$
|
||||
comment: Line wrap.
|
||||
scope: keyword.operator.ninja
|
||||
- match: \$\$
|
||||
comment: Dollar literal.
|
||||
scope: keyword.operator.ninja
|
||||
- match: '\$[[:alnum:]_-]+'
|
||||
comment: Simple variables, e.g. $var.
|
||||
scope: variable.other.ninja
|
||||
- match: '\${[[:alnum:]_.-]+}'
|
||||
comment: "Variables, e.g. ${some.var.name}."
|
||||
scope: variable.other.ninja
|
Loading…
Reference in New Issue
Block a user