mirror of
https://github.com/neovim/neovim
synced 2025-07-16 01:01:49 +00:00
build(deps): update viml parser and queries (#21158)
This commit is contained in:
@ -200,8 +200,8 @@ set(TREESITTER_C_SHA256 af66fde03feb0df4faf03750102a0d265b007e5d957057b6b293c131
|
||||
set(TREESITTER_LUA_URL https://github.com/MunifTanjim/tree-sitter-lua/archive/v0.0.14.tar.gz)
|
||||
set(TREESITTER_LUA_SHA256 930d0370dc15b66389869355c8e14305b9ba7aafd36edbfdb468c8023395016d)
|
||||
|
||||
set(TREESITTER_VIM_URL https://github.com/vigoux/tree-sitter-viml/archive/v0.2.0.tar.gz)
|
||||
set(TREESITTER_VIM_SHA256 608dcc31a7948cb66ae7f45494620e2e9face1af75598205541f80d782ec4501)
|
||||
set(TREESITTER_VIM_URL https://github.com/vigoux/tree-sitter-viml/archive/55ff1b080c09edeced9b748cf4c16d0b49d17fb9.tar.gz)
|
||||
set(TREESITTER_VIM_SHA256 1b1cd39e33c8fb02fa7fe3977e844883c2a8508a7edd621f2d21e39a9aeefa92)
|
||||
|
||||
set(TREESITTER_HELP_URL https://github.com/neovim/tree-sitter-vimdoc/archive/v1.2.5.tar.gz)
|
||||
set(TREESITTER_HELP_SHA256 379d764937a0e3a38e3f9ce9a62c93ba24211a236c74181dd04ee3b4631472a8)
|
||||
|
@ -36,7 +36,8 @@
|
||||
|
||||
;; Function related
|
||||
(function_declaration name: (_) @function)
|
||||
(call_expression function: (identifier) @function)
|
||||
(call_expression function: (identifier) @function.call)
|
||||
(call_expression function: (scoped_identifier (identifier) @function.call))
|
||||
(parameters (identifier) @parameter)
|
||||
(default_parameter (identifier) @parameter)
|
||||
|
||||
@ -59,14 +60,20 @@
|
||||
"execute"
|
||||
"normal"
|
||||
"set"
|
||||
"setfiletype"
|
||||
"setlocal"
|
||||
"silent"
|
||||
"echo"
|
||||
"echon"
|
||||
"echohl"
|
||||
"echomsg"
|
||||
"echoerr"
|
||||
"autocmd"
|
||||
"augroup"
|
||||
"return"
|
||||
"syntax"
|
||||
"filetype"
|
||||
"source"
|
||||
"lua"
|
||||
"ruby"
|
||||
"perl"
|
||||
@ -98,10 +105,21 @@
|
||||
"ex"
|
||||
"visual"
|
||||
"view"
|
||||
"eval"
|
||||
] @keyword
|
||||
(map_statement cmd: _ @keyword)
|
||||
(command_name) @function.macro
|
||||
|
||||
;; Filetype command
|
||||
|
||||
(filetype_statement [
|
||||
"detect"
|
||||
"plugin"
|
||||
"indent"
|
||||
"on"
|
||||
"off"
|
||||
] @keyword)
|
||||
|
||||
;; Syntax command
|
||||
|
||||
(syntax_statement (keyword) @string)
|
||||
@ -118,6 +136,8 @@
|
||||
"match"
|
||||
"cluster"
|
||||
"region"
|
||||
"clear"
|
||||
"include"
|
||||
] @keyword)
|
||||
|
||||
(syntax_argument name: _ @keyword)
|
||||
@ -175,15 +195,18 @@
|
||||
|
||||
;; Literals
|
||||
|
||||
(string_literal) @string @spell
|
||||
(string_literal) @string
|
||||
(integer_literal) @number
|
||||
(float_literal) @float
|
||||
(comment) @comment @spell
|
||||
(line_continuation_comment) @comment @spell
|
||||
(pattern) @string.special
|
||||
(pattern_multi) @string.regex
|
||||
(filename) @string
|
||||
(heredoc (body) @string)
|
||||
((heredoc (parameter) @keyword))
|
||||
(heredoc (parameter) @keyword)
|
||||
[ (marker_definition) (endmarker) ] @label
|
||||
(literal_dictionary (literal_key) @label)
|
||||
((scoped_identifier
|
||||
(scope) @_scope . (identifier) @boolean)
|
||||
(#eq? @_scope "v:")
|
||||
@ -219,12 +242,16 @@
|
||||
"%="
|
||||
".="
|
||||
"..="
|
||||
"<<"
|
||||
"=<<"
|
||||
(match_case)
|
||||
] @operator
|
||||
|
||||
; Some characters have different meanings based on the context
|
||||
(unary_operation "!" @operator)
|
||||
(binary_operation "." @operator)
|
||||
|
||||
|
||||
;; Punctuation
|
||||
|
||||
[
|
||||
@ -234,6 +261,7 @@
|
||||
"}"
|
||||
"["
|
||||
"]"
|
||||
"#{"
|
||||
] @punctuation.bracket
|
||||
|
||||
(field_expression "." @punctuation.delimiter)
|
||||
@ -249,6 +277,9 @@
|
||||
((set_value) @number
|
||||
(#match? @number "^[0-9]+(\.[0-9]+)?$"))
|
||||
|
||||
(inv_option "!" @operator)
|
||||
(set_item "?" @operator)
|
||||
|
||||
((set_item
|
||||
option: (option_name) @_option
|
||||
value: (set_value) @function)
|
||||
|
@ -1,13 +1,14 @@
|
||||
(lua_statement (script (body) @lua))
|
||||
(lua_statement (chunk) @lua)
|
||||
; (ruby_statement (script (body) @ruby))
|
||||
; (ruby_statement (chunk) @ruby)
|
||||
; (python_statement (script (body) @python))
|
||||
; (python_statement (chunk) @python)
|
||||
(ruby_statement (script (body) @ruby))
|
||||
(ruby_statement (chunk) @ruby)
|
||||
(python_statement (script (body) @python))
|
||||
(python_statement (chunk) @python)
|
||||
;; If we support perl at some point...
|
||||
;; (perl_statement (script (body) @perl))
|
||||
;; (perl_statement (chunk) @perl)
|
||||
|
||||
; (autocmd_statement (pattern) @regex)
|
||||
(autocmd_statement (pattern) @regex)
|
||||
|
||||
((set_item
|
||||
option: (option_name) @_option
|
||||
@ -23,4 +24,5 @@
|
||||
"patchexpr" "pex"
|
||||
"charconvert" "ccv"))
|
||||
|
||||
; (comment) @comment
|
||||
(comment) @comment
|
||||
(line_continuation_comment) @comment
|
||||
|
Reference in New Issue
Block a user