Improved syntax highlighting for bibop recipies

This commit is contained in:
Anton Novojilov 2019-03-09 02:14:30 +03:00
commit 35f46db49f
2 changed files with 15 additions and 3 deletions

View file

@ -133,6 +133,12 @@
"foreground": "var(function-call)",
"font_style": "bold"
},
{
"name": "Function tag",
"scope": "meta.function.tag",
"foreground": "var(function-call)",
"font_style": ""
},
{
"name": "Invalid",
"scope": "invalid",

View file

@ -11,6 +11,7 @@ contexts:
- include: comments
- include: strings
- include: keywords
- include: commands
- include: variables
comments:
@ -55,10 +56,8 @@ contexts:
pop: true
keywords:
- match: '^(dir|require-root|unsafe-actions|fast-finish)'
- match: '^(dir|require-root|unsafe-actions|fast-finish|lock-workdir)'
scope: keyword.other
- match: '^action'
scope: support.function
- match: '\b(true|false|yes|no)\b'
scope: constant.language
- match: '\b([0-9]+\.[0-9]*|\.[0-9]+)([eE][+-]?\d+)?\b'
@ -66,6 +65,13 @@ contexts:
- match: '\b\d+\b'
scope: constant.numeric.integer.decimal.bibop
commands:
- match: '^(command):*([a-z0-9]*)'
captures:
0: support.function
1: meta.function
2: meta.function.tag
variables:
- match: '^(var) +([\d\w\S]+)'
captures: