mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-15 09:50:04 -04:00
feat!: drop modules, general refactor and cleanup
This commit is contained in:
parent
310f0925ec
commit
692b051b09
1247 changed files with 6096 additions and 9074 deletions
135
runtime/queries/jsonnet/highlights.scm
Normal file
135
runtime/queries/jsonnet/highlights.scm
Normal file
|
|
@ -0,0 +1,135 @@
|
|||
(id) @variable
|
||||
|
||||
(comment) @comment @spell
|
||||
|
||||
; Literals
|
||||
(null) @constant.builtin
|
||||
|
||||
(string) @string
|
||||
|
||||
(number) @number
|
||||
|
||||
[
|
||||
(true)
|
||||
(false)
|
||||
] @boolean
|
||||
|
||||
; Keywords
|
||||
"for" @keyword.repeat
|
||||
|
||||
"in" @keyword.operator
|
||||
|
||||
"function" @keyword.function
|
||||
|
||||
[
|
||||
"if"
|
||||
"then"
|
||||
"else"
|
||||
] @keyword.conditional
|
||||
|
||||
[
|
||||
(local)
|
||||
(tailstrict)
|
||||
"function"
|
||||
] @keyword
|
||||
|
||||
[
|
||||
"assert"
|
||||
"error"
|
||||
] @keyword.exception
|
||||
|
||||
[
|
||||
(dollar)
|
||||
(self)
|
||||
(super)
|
||||
] @variable.builtin
|
||||
|
||||
((id) @variable.builtin
|
||||
(#eq? @variable.builtin "std"))
|
||||
|
||||
; Operators
|
||||
[
|
||||
(multiplicative)
|
||||
(additive)
|
||||
(bitshift)
|
||||
(comparison)
|
||||
(equality)
|
||||
(bitand)
|
||||
(bitxor)
|
||||
(bitor)
|
||||
(and)
|
||||
(or)
|
||||
(unaryop)
|
||||
] @operator
|
||||
|
||||
; Punctuation
|
||||
[
|
||||
"["
|
||||
"]"
|
||||
"{"
|
||||
"}"
|
||||
"("
|
||||
")"
|
||||
] @punctuation.bracket
|
||||
|
||||
[
|
||||
"."
|
||||
","
|
||||
";"
|
||||
":"
|
||||
] @punctuation.delimiter
|
||||
|
||||
[
|
||||
"::"
|
||||
":::"
|
||||
] @punctuation.special
|
||||
|
||||
(field
|
||||
(fieldname)
|
||||
"+" @punctuation.special)
|
||||
|
||||
; Imports
|
||||
[
|
||||
(import)
|
||||
(importstr)
|
||||
] @keyword.import
|
||||
|
||||
; Fields
|
||||
(fieldname
|
||||
(id) @variable.member)
|
||||
|
||||
(fieldname
|
||||
(string
|
||||
(string_content) @variable.member))
|
||||
|
||||
; Functions
|
||||
(field
|
||||
function: (fieldname
|
||||
(id) @function))
|
||||
|
||||
(field
|
||||
function: (fieldname
|
||||
(string
|
||||
(string_content) @function)))
|
||||
|
||||
(param
|
||||
identifier: (id) @variable.parameter)
|
||||
|
||||
(bind
|
||||
(id) @variable)
|
||||
|
||||
(bind
|
||||
function: (id) @function)
|
||||
|
||||
; Function call
|
||||
(functioncall
|
||||
(fieldaccess
|
||||
last: (id) @function.call)?
|
||||
(fieldaccess_super
|
||||
(id) @function.call)?
|
||||
(id)? @function.call
|
||||
"("
|
||||
(args
|
||||
(named_argument
|
||||
(id) @variable.parameter))?
|
||||
")")
|
||||
Loading…
Add table
Add a link
Reference in a new issue