diff options
| author | Cezary Drożak <cezdro@alatek.com.pl> | 2022-09-07 10:30:43 +0200 |
|---|---|---|
| committer | Stephan Seitz <stephan.seitz@fau.de> | 2022-09-10 11:09:10 -0700 |
| commit | f2d3d509d95943c00975c8a83dbb35907262e30b (patch) | |
| tree | d4da824548cb7cd5eafefba1f799dadf40f7ce5a /queries/jsonnet | |
| parent | highlights(phpdoc): check spell within `text` (diff) | |
| download | nvim-treesitter-f2d3d509d95943c00975c8a83dbb35907262e30b.tar nvim-treesitter-f2d3d509d95943c00975c8a83dbb35907262e30b.tar.gz nvim-treesitter-f2d3d509d95943c00975c8a83dbb35907262e30b.tar.bz2 nvim-treesitter-f2d3d509d95943c00975c8a83dbb35907262e30b.tar.lz nvim-treesitter-f2d3d509d95943c00975c8a83dbb35907262e30b.tar.xz nvim-treesitter-f2d3d509d95943c00975c8a83dbb35907262e30b.tar.zst nvim-treesitter-f2d3d509d95943c00975c8a83dbb35907262e30b.zip | |
feat: add jsonnet
Diffstat (limited to 'queries/jsonnet')
| -rw-r--r-- | queries/jsonnet/highlights.scm | 76 |
1 files changed, 76 insertions, 0 deletions
diff --git a/queries/jsonnet/highlights.scm b/queries/jsonnet/highlights.scm new file mode 100644 index 000000000..eb8d22be9 --- /dev/null +++ b/queries/jsonnet/highlights.scm @@ -0,0 +1,76 @@ +[ + (true) + (false) +] @boolean + +(comment) @comment +(id) @variable +(import) @include +(null) @constant.builtin +(number) @number +(string) @string + +(fieldname (id) @label) + +[ + "[" + "]" + "{" + "}" + "(" + ")" +] @punctuation.bracket + +[ + "." + "," + ";" + ":" + "::" + ":::" +] @punctuation.delimiter + +(expr + operator: (_) @operator) +[ + "+" + "=" +] @operator + +"in" @keyword.operator + +[ + (local) + "assert" +] @keyword + +[ + "else" + "if" + "then" +] @conditional + +[ + (dollar) + (self) +] @variable.builtin +((id) @variable.builtin + (#eq? @variable.builtin "std")) + +; Function declaration +(bind + function: (id) @function + params: (params + (param + identifier: (id) @parameter))) + +; Function call +(expr + (expr (id) @function.call) + "(" + (args + (named_argument + (id) @parameter))? + ")") + +(ERROR) @error |
