mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-01 19:17:02 -04:00
feat(kotlin): update queries from upstream changes
This commit is contained in:
parent
981f88a0c2
commit
e559b6fb3f
3 changed files with 20 additions and 25 deletions
|
|
@ -255,7 +255,7 @@
|
|||
"revision": "e36f054a60c4d9e5ae29567d439fdb8790b53b30"
|
||||
},
|
||||
"kotlin": {
|
||||
"revision": "e4637037a5fe6f25fe66c305669faa0855f35692"
|
||||
"revision": "826ef28d605d0925a86a99022cd222c96f2d0952"
|
||||
},
|
||||
"lalrpop": {
|
||||
"revision": "7744b56f03ac1e5643fad23c9dd90837fe97291e"
|
||||
|
|
|
|||
|
|
@ -217,9 +217,12 @@
|
|||
|
||||
;;; Literals
|
||||
|
||||
(comment) @comment @spell
|
||||
[
|
||||
(line_comment)
|
||||
(multiline_comment)
|
||||
] @comment @spell
|
||||
|
||||
((comment) @comment.documentation
|
||||
((multiline_comment) @comment.documentation
|
||||
(#lua-match? @comment.documentation "^/[*][*][^*].*[*]/$"))
|
||||
|
||||
(shebang_line) @preproc
|
||||
|
|
@ -240,19 +243,16 @@
|
|||
|
||||
(character_literal) @character
|
||||
|
||||
[
|
||||
(line_string_literal)
|
||||
(multi_line_string_literal)
|
||||
] @string
|
||||
(string_literal) @string
|
||||
|
||||
; NOTE: Escapes not allowed in multi-line strings
|
||||
(line_string_literal (character_escape_seq) @string.escape)
|
||||
(character_literal (character_escape_seq) @string.escape)
|
||||
|
||||
; There are 3 ways to define a regex
|
||||
; - "[abc]?".toRegex()
|
||||
(call_expression
|
||||
(navigation_expression
|
||||
([(line_string_literal) (multi_line_string_literal)] @string.regex)
|
||||
((string_literal) @string.regex)
|
||||
(navigation_suffix
|
||||
((simple_identifier) @_function
|
||||
(#eq? @_function "toRegex")))))
|
||||
|
|
@ -264,7 +264,7 @@
|
|||
(call_suffix
|
||||
(value_arguments
|
||||
(value_argument
|
||||
[ (line_string_literal) (multi_line_string_literal) ] @string.regex))))
|
||||
(string_literal) @string.regex))))
|
||||
|
||||
; - Regex.fromLiteral("[abc]?")
|
||||
(call_expression
|
||||
|
|
@ -277,7 +277,7 @@
|
|||
(call_suffix
|
||||
(value_arguments
|
||||
(value_argument
|
||||
[ (line_string_literal) (multi_line_string_literal) ] @string.regex))))
|
||||
(string_literal) @string.regex))))
|
||||
|
||||
;;; Keywords
|
||||
|
||||
|
|
@ -413,18 +413,10 @@
|
|||
] @punctuation.delimiter
|
||||
|
||||
; NOTE: `interpolated_identifier`s can be highlighted in any way
|
||||
(line_string_literal
|
||||
(string_literal
|
||||
"$" @punctuation.special
|
||||
(interpolated_identifier) @none @variable)
|
||||
(line_string_literal
|
||||
"${" @punctuation.special
|
||||
(interpolated_expression) @none
|
||||
"}" @punctuation.special)
|
||||
|
||||
(multi_line_string_literal
|
||||
"$" @punctuation.special
|
||||
(interpolated_identifier) @none @variable)
|
||||
(multi_line_string_literal
|
||||
(string_literal
|
||||
"${" @punctuation.special
|
||||
(interpolated_expression) @none
|
||||
"}" @punctuation.special)
|
||||
|
|
|
|||
|
|
@ -1,10 +1,13 @@
|
|||
(comment) @comment
|
||||
[
|
||||
(line_comment)
|
||||
(multiline_comment)
|
||||
] @comment
|
||||
|
||||
; There are 3 ways to define a regex
|
||||
; - "[abc]?".toRegex()
|
||||
(call_expression
|
||||
(navigation_expression
|
||||
([(line_string_literal) (multi_line_string_literal)] @regex)
|
||||
((string_literal) @regex)
|
||||
(navigation_suffix
|
||||
((simple_identifier) @_function
|
||||
(#eq? @_function "toRegex")))))
|
||||
|
|
@ -16,7 +19,7 @@
|
|||
(call_suffix
|
||||
(value_arguments
|
||||
(value_argument
|
||||
[ (line_string_literal) (multi_line_string_literal) ] @regex))))
|
||||
(string_literal) @regex))))
|
||||
|
||||
; - Regex.fromLiteral("[abc]?")
|
||||
(call_expression
|
||||
|
|
@ -29,4 +32,4 @@
|
|||
(call_suffix
|
||||
(value_arguments
|
||||
(value_argument
|
||||
[ (line_string_literal) (multi_line_string_literal) ] @regex))))
|
||||
(string_literal) @regex))))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue