mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-08 06:20:01 -04:00
feat: add jsonnet
This commit is contained in:
parent
72d61cd9fa
commit
f2d3d509d9
4 changed files with 88 additions and 0 deletions
76
queries/jsonnet/highlights.scm
Normal file
76
queries/jsonnet/highlights.scm
Normal file
|
|
@ -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
|
||||
Loading…
Add table
Add a link
Reference in a new issue