aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGitHub <noreply@github.com>2022-11-21 11:00:23 +0000
committerChristian Clason <christian.clason@uni-due.de>2022-11-21 12:09:24 +0100
commit4f885f2d07a4a0f49f0b56f8c052a6e2e09b4134 (patch)
treea8dd1e300450f278170f39d32333c28622779892
parentremoved switch from keywords (diff)
downloadnvim-treesitter-4f885f2d07a4a0f49f0b56f8c052a6e2e09b4134.tar
nvim-treesitter-4f885f2d07a4a0f49f0b56f8c052a6e2e09b4134.tar.gz
nvim-treesitter-4f885f2d07a4a0f49f0b56f8c052a6e2e09b4134.tar.bz2
nvim-treesitter-4f885f2d07a4a0f49f0b56f8c052a6e2e09b4134.tar.lz
nvim-treesitter-4f885f2d07a4a0f49f0b56f8c052a6e2e09b4134.tar.xz
nvim-treesitter-4f885f2d07a4a0f49f0b56f8c052a6e2e09b4134.tar.zst
nvim-treesitter-4f885f2d07a4a0f49f0b56f8c052a6e2e09b4134.zip
Update lockfile.json
-rw-r--r--lockfile.json2
-rw-r--r--queries/vim/highlights.scm17
2 files changed, 16 insertions, 3 deletions
diff --git a/lockfile.json b/lockfile.json
index a4fa651d1..fe97c8bd6 100644
--- a/lockfile.json
+++ b/lockfile.json
@@ -399,7 +399,7 @@
"revision": "2f87b9d973597e69552ecf6a4fe16470fbd8c44e"
},
"vim": {
- "revision": "4ae7bd67706d7e10afed827ce2ded884ab41650f"
+ "revision": "55ff1b080c09edeced9b748cf4c16d0b49d17fb9"
},
"vue": {
"revision": "91fe2754796cd8fba5f229505a23fa08f3546c06"
diff --git a/queries/vim/highlights.scm b/queries/vim/highlights.scm
index c3ce3dd94..239b0a0b3 100644
--- a/queries/vim/highlights.scm
+++ b/queries/vim/highlights.scm
@@ -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)
@@ -104,6 +105,7 @@
"ex"
"visual"
"view"
+ "eval"
] @keyword
(map_statement cmd: _ @keyword)
(command_name) @function.macro
@@ -197,11 +199,14 @@
(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:")
@@ -237,12 +242,16 @@
"%="
".="
"..="
+ "<<"
+ "=<<"
+ (match_case)
] @operator
; Some characters have different meanings based on the context
(unary_operation "!" @operator)
(binary_operation "." @operator)
+
;; Punctuation
[
@@ -252,6 +261,7 @@
"}"
"["
"]"
+ "#{"
] @punctuation.bracket
(field_expression "." @punctuation.delimiter)
@@ -267,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)