mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-16 18:30:06 -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"
|
"revision": "5e66e961eee421786bdda8495ed1db045e06b5fe"
|
||||||
},
|
},
|
||||||
"groovy": {
|
"groovy": {
|
||||||
"revision": "54c7da8b167261e76c79513c0364a01836093526"
|
"revision": "76e02db5866dd2b096512103ed4d8f630cc32980"
|
||||||
},
|
},
|
||||||
"hack": {
|
"hack": {
|
||||||
"revision": "95e63e79e0d9f91000bd11d458997fabed1bb1e2"
|
"revision": "95e63e79e0d9f91000bd11d458997fabed1bb1e2"
|
||||||
|
|
|
||||||
|
|
@ -1,16 +1,16 @@
|
||||||
(unit
|
(unit
|
||||||
(identifier) @variable)
|
(identifier) @variable)
|
||||||
(string
|
(string
|
||||||
(identifier) @variable)
|
(identifier) @variable)
|
||||||
|
|
||||||
(escape_sequence) @string.escape
|
(escape_sequence) @string.escape
|
||||||
|
|
||||||
(block
|
(block
|
||||||
(unit
|
(unit
|
||||||
(identifier) @namespace))
|
(identifier) @namespace))
|
||||||
|
|
||||||
(func
|
(func
|
||||||
(identifier) @function)
|
(identifier) @function)
|
||||||
|
|
||||||
(number) @number
|
(number) @number
|
||||||
|
|
||||||
|
|
@ -20,10 +20,20 @@
|
||||||
((identifier) @constant
|
((identifier) @constant
|
||||||
(#lua-match? @constant "^[A-Z][A-Z%d_]*$"))
|
(#lua-match? @constant "^[A-Z][A-Z%d_]*$"))
|
||||||
|
|
||||||
((identifier) @type.definition
|
((identifier) @constant.builtin
|
||||||
(#any-of? @type.definition
|
(#eq? @constant.builtin "null"))
|
||||||
"string"
|
|
||||||
|
((identifier) @type
|
||||||
|
(#any-of? @type
|
||||||
"String"
|
"String"
|
||||||
|
"Map"
|
||||||
|
"Object"
|
||||||
|
"Boolean"
|
||||||
|
"Integer"
|
||||||
|
"List"))
|
||||||
|
|
||||||
|
((identifier) @function.builtin
|
||||||
|
(#any-of? @function.builtin
|
||||||
"void"
|
"void"
|
||||||
"id"
|
"id"
|
||||||
"version"
|
"version"
|
||||||
|
|
@ -39,8 +49,28 @@
|
||||||
"class"
|
"class"
|
||||||
"def"
|
"def"
|
||||||
"import"
|
"import"
|
||||||
|
"package"
|
||||||
|
"assert"
|
||||||
|
"extends"
|
||||||
|
"implements"
|
||||||
|
"instanceof"
|
||||||
|
"interface"
|
||||||
"new"))
|
"new"))
|
||||||
|
|
||||||
|
((identifier) @type.qualifier
|
||||||
|
(#any-of? @type.qualifier
|
||||||
|
"abstract"
|
||||||
|
"protected"
|
||||||
|
"private"
|
||||||
|
"public"))
|
||||||
|
|
||||||
|
((identifier) @exception
|
||||||
|
(#any-of? @exception
|
||||||
|
"throw"
|
||||||
|
"finally"
|
||||||
|
"try"
|
||||||
|
"catch"))
|
||||||
|
|
||||||
(string) @string
|
(string) @string
|
||||||
|
|
||||||
[
|
[
|
||||||
|
|
@ -57,7 +87,9 @@
|
||||||
((line_comment) @comment.documentation
|
((line_comment) @comment.documentation
|
||||||
(#lua-match? @comment.documentation "^///$"))
|
(#lua-match? @comment.documentation "^///$"))
|
||||||
|
|
||||||
(operators) @operator
|
[
|
||||||
(leading_key) @operator
|
(operators)
|
||||||
|
(leading_key)
|
||||||
|
] @operator
|
||||||
|
|
||||||
["(" ")" "[" "]" "{" "}"] @punctuation.bracket
|
["(" ")" "[" "]" "{" "}"] @punctuation.bracket
|
||||||
|
|
|
||||||
|
|
@ -1 +1,4 @@
|
||||||
(comment) @comment
|
[
|
||||||
|
(block_comment)
|
||||||
|
(line_comment)
|
||||||
|
] @comment
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue