Update generated neovim config
This commit is contained in:
@ -0,0 +1,7 @@
|
||||
[
|
||||
(comment)
|
||||
(list)
|
||||
(dict_core)
|
||||
] @fold
|
||||
|
||||
(code (code_body)* @fold)
|
||||
@ -0,0 +1,64 @@
|
||||
;; Comments
|
||||
(comment) @comment
|
||||
|
||||
;; Generic Key-value pairs and dictionary keywords
|
||||
(key_value
|
||||
keyword: (identifier) @function
|
||||
)
|
||||
(dict
|
||||
key: (identifier) @type
|
||||
)
|
||||
|
||||
;; Macros
|
||||
(macro
|
||||
"$" @conditional
|
||||
(prev_scope)* @conditional
|
||||
(identifier)* @namespace
|
||||
)
|
||||
|
||||
|
||||
;; Directives
|
||||
"#" @conditional
|
||||
(preproc_call
|
||||
directive: (identifier)* @conditional
|
||||
argument: (identifier)* @namespace
|
||||
)
|
||||
(
|
||||
(preproc_call
|
||||
argument: (identifier)* @namespace
|
||||
) @conditional
|
||||
(#match? @conditional "ifeq")
|
||||
)
|
||||
|
||||
(
|
||||
(preproc_call) @conditional
|
||||
(#match? @conditional "(else|endif)")
|
||||
)
|
||||
|
||||
;; Literals
|
||||
|
||||
(number_literal) @float
|
||||
(string_literal) @string
|
||||
(escape_sequence) @escape
|
||||
(boolean) @boolean
|
||||
|
||||
;; Treat [m^2 s^-2] the same as if it was put in numbers format
|
||||
(dimensions dimension: (identifier) @float)
|
||||
|
||||
;; Punctuation
|
||||
[
|
||||
"("
|
||||
")"
|
||||
"["
|
||||
"]"
|
||||
"{"
|
||||
"}"
|
||||
"#{"
|
||||
"#}"
|
||||
";"
|
||||
] @punctuation
|
||||
|
||||
;; Special identifiers
|
||||
|
||||
((identifier) @attribute
|
||||
(#match? @attribute "^(uniform|non-uniform|and|or)$"))
|
||||
@ -0,0 +1,11 @@
|
||||
[
|
||||
"{"
|
||||
"}"
|
||||
] @branch
|
||||
|
||||
[(dict) (key_value)] @indent
|
||||
|
||||
|
||||
[
|
||||
(comment)
|
||||
] @ignore
|
||||
@ -0,0 +1,9 @@
|
||||
;; Pass code blocks to Cpp highlighter
|
||||
(code (code_body) @cpp)
|
||||
|
||||
;; Pass identifiers to Go highlighter (Cheating I know)
|
||||
;;((identifier) @lua)
|
||||
|
||||
;; Highlight regex syntax inside literal strings
|
||||
((string_literal) @regex)
|
||||
|
||||
@ -0,0 +1,6 @@
|
||||
(dict) @scope
|
||||
|
||||
(dict key: (_) @definition.type)
|
||||
|
||||
(key_value keyword: (_) @definition.parameter)
|
||||
(key_value value: (macro (identifier)*)* @reference)
|
||||
@ -0,0 +1,5 @@
|
||||
(dict) @class.outer
|
||||
((dict_core) @class.inner)
|
||||
((key_value value: _? @_start (_)* _? @parameter.inner)
|
||||
(#make-range! "function.inner" @_start @parameter.inner)) @function.outer
|
||||
(code (_)* @class.inner) @class.outer
|
||||
@ -0,0 +1,3 @@
|
||||
((dict) @_start @_end
|
||||
(#make-range! "range" @_start @_end)
|
||||
)
|
||||
@ -0,0 +1,14 @@
|
||||
((comment) @_start @_end
|
||||
(#make-range! "range" @_start @_end))
|
||||
|
||||
(((_) @head . (comment) @_start . (comment)+ @_end (_) @tail)
|
||||
(#not-has-type? @tail "comment")
|
||||
(#not-has-type? @head "comment")
|
||||
(#make-range! "range" @_start @_end))
|
||||
|
||||
((key_value value: _? @_start (_)* @_end)
|
||||
(#make-range! "range" @_start @_end))
|
||||
|
||||
((key_value) @_start @_end
|
||||
(#make-range! "range" @_start @_end)
|
||||
)
|
||||
Reference in New Issue
Block a user