mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-01 19:17:02 -04:00
feat(groovy): Add more support for groovy syntax. Fix for groovy multiline comment highlighting.
This commit is contained in:
parent
51ea343f70
commit
7caa976154
3 changed files with 47 additions and 12 deletions
|
|
@ -195,7 +195,7 @@
|
|||
"revision": "5e66e961eee421786bdda8495ed1db045e06b5fe"
|
||||
},
|
||||
"groovy": {
|
||||
"revision": "54c7da8b167261e76c79513c0364a01836093526"
|
||||
"revision": "76e02db5866dd2b096512103ed4d8f630cc32980"
|
||||
},
|
||||
"hack": {
|
||||
"revision": "95e63e79e0d9f91000bd11d458997fabed1bb1e2"
|
||||
|
|
|
|||
|
|
@ -1,16 +1,16 @@
|
|||
(unit
|
||||
(identifier) @variable)
|
||||
(identifier) @variable)
|
||||
(string
|
||||
(identifier) @variable)
|
||||
(identifier) @variable)
|
||||
|
||||
(escape_sequence) @string.escape
|
||||
|
||||
(block
|
||||
(unit
|
||||
(identifier) @namespace))
|
||||
(unit
|
||||
(identifier) @namespace))
|
||||
|
||||
(func
|
||||
(identifier) @function)
|
||||
(identifier) @function)
|
||||
|
||||
(number) @number
|
||||
|
||||
|
|
@ -20,10 +20,20 @@
|
|||
((identifier) @constant
|
||||
(#lua-match? @constant "^[A-Z][A-Z%d_]*$"))
|
||||
|
||||
((identifier) @type.definition
|
||||
(#any-of? @type.definition
|
||||
"string"
|
||||
((identifier) @constant.builtin
|
||||
(#eq? @constant.builtin "null"))
|
||||
|
||||
((identifier) @type
|
||||
(#any-of? @type
|
||||
"String"
|
||||
"Map"
|
||||
"Object"
|
||||
"Boolean"
|
||||
"Integer"
|
||||
"List"))
|
||||
|
||||
((identifier) @function.builtin
|
||||
(#any-of? @function.builtin
|
||||
"void"
|
||||
"id"
|
||||
"version"
|
||||
|
|
@ -39,8 +49,28 @@
|
|||
"class"
|
||||
"def"
|
||||
"import"
|
||||
"package"
|
||||
"assert"
|
||||
"extends"
|
||||
"implements"
|
||||
"instanceof"
|
||||
"interface"
|
||||
"new"))
|
||||
|
||||
((identifier) @type.qualifier
|
||||
(#any-of? @type.qualifier
|
||||
"abstract"
|
||||
"protected"
|
||||
"private"
|
||||
"public"))
|
||||
|
||||
((identifier) @exception
|
||||
(#any-of? @exception
|
||||
"throw"
|
||||
"finally"
|
||||
"try"
|
||||
"catch"))
|
||||
|
||||
(string) @string
|
||||
|
||||
[
|
||||
|
|
@ -57,7 +87,9 @@
|
|||
((line_comment) @comment.documentation
|
||||
(#lua-match? @comment.documentation "^///$"))
|
||||
|
||||
(operators) @operator
|
||||
(leading_key) @operator
|
||||
[
|
||||
(operators)
|
||||
(leading_key)
|
||||
] @operator
|
||||
|
||||
["(" ")" "[" "]" "{" "}"] @punctuation.bracket
|
||||
|
|
|
|||
|
|
@ -1 +1,4 @@
|
|||
(comment) @comment
|
||||
[
|
||||
(block_comment)
|
||||
(line_comment)
|
||||
] @comment
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue