diff options
| author | Bugala Piotr <Piotr.Bugala@igt.com> | 2023-07-14 13:49:50 +0200 |
|---|---|---|
| committer | Amaan Qureshi <amaanq12@gmail.com> | 2023-07-17 03:36:03 -0400 |
| commit | 7caa97615486d2418d394e3d09a05121de752ec6 (patch) | |
| tree | 89d661c669c2bea94229e3694cb2d83ffef88ba0 | |
| parent | fix(uxntal): move `@variable` query higher (diff) | |
| download | nvim-treesitter-7caa97615486d2418d394e3d09a05121de752ec6.tar nvim-treesitter-7caa97615486d2418d394e3d09a05121de752ec6.tar.gz nvim-treesitter-7caa97615486d2418d394e3d09a05121de752ec6.tar.bz2 nvim-treesitter-7caa97615486d2418d394e3d09a05121de752ec6.tar.lz nvim-treesitter-7caa97615486d2418d394e3d09a05121de752ec6.tar.xz nvim-treesitter-7caa97615486d2418d394e3d09a05121de752ec6.tar.zst nvim-treesitter-7caa97615486d2418d394e3d09a05121de752ec6.zip | |
feat(groovy): Add more support for groovy syntax. Fix for groovy multiline comment highlighting.
| -rw-r--r-- | lockfile.json | 2 | ||||
| -rw-r--r-- | queries/groovy/highlights.scm | 52 | ||||
| -rw-r--r-- | queries/groovy/injections.scm | 5 |
3 files changed, 47 insertions, 12 deletions
diff --git a/lockfile.json b/lockfile.json index d6f7adec5..382e48252 100644 --- a/lockfile.json +++ b/lockfile.json @@ -195,7 +195,7 @@ "revision": "5e66e961eee421786bdda8495ed1db045e06b5fe" }, "groovy": { - "revision": "54c7da8b167261e76c79513c0364a01836093526" + "revision": "76e02db5866dd2b096512103ed4d8f630cc32980" }, "hack": { "revision": "95e63e79e0d9f91000bd11d458997fabed1bb1e2" diff --git a/queries/groovy/highlights.scm b/queries/groovy/highlights.scm index 25dc21086..a9b38ef5b 100644 --- a/queries/groovy/highlights.scm +++ b/queries/groovy/highlights.scm @@ -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 diff --git a/queries/groovy/injections.scm b/queries/groovy/injections.scm index 4bb7d675d..0a63c9bfe 100644 --- a/queries/groovy/injections.scm +++ b/queries/groovy/injections.scm @@ -1 +1,4 @@ -(comment) @comment +[ + (block_comment) + (line_comment) +] @comment |
