diff options
| author | Mateus Melchiades <matbme@walkintosh.local> | 2022-02-26 10:23:36 -0300 |
|---|---|---|
| committer | Christian Clason <christian.clason@uni-due.de> | 2022-02-26 15:12:17 +0100 |
| commit | 84e4e0237f5d78e4fdc4fb87db03928351d6b882 (patch) | |
| tree | 0d2b55abbe959f442732f9de1ed6ca12f341d1af | |
| parent | Fixed a bug where indentation was not correct for class/enum bodies that had ... (diff) | |
| download | nvim-treesitter-84e4e0237f5d78e4fdc4fb87db03928351d6b882.tar nvim-treesitter-84e4e0237f5d78e4fdc4fb87db03928351d6b882.tar.gz nvim-treesitter-84e4e0237f5d78e4fdc4fb87db03928351d6b882.tar.bz2 nvim-treesitter-84e4e0237f5d78e4fdc4fb87db03928351d6b882.tar.lz nvim-treesitter-84e4e0237f5d78e4fdc4fb87db03928351d6b882.tar.xz nvim-treesitter-84e4e0237f5d78e4fdc4fb87db03928351d6b882.tar.zst nvim-treesitter-84e4e0237f5d78e4fdc4fb87db03928351d6b882.zip | |
highlights(vala): Re-update highlights and lockfile
| -rw-r--r-- | lockfile.json | 2 | ||||
| -rw-r--r-- | queries/vala/highlights.scm | 46 |
2 files changed, 19 insertions, 29 deletions
diff --git a/lockfile.json b/lockfile.json index 7d39d0dc2..a60299f4f 100644 --- a/lockfile.json +++ b/lockfile.json @@ -279,7 +279,7 @@ "revision": "e8e8e8dc2745840b036421b4e43286750443cb13" }, "vala": { - "revision": "a28c1a318f037ae47236491b324e5976ed857f67" + "revision": "4c31aa2f3c077fa69acc49e5c5a58cd87c704229" }, "verilog": { "revision": "8f6b1f357d1231c420404b5f7a368a73c25adfa2" diff --git a/queries/vala/highlights.scm b/queries/vala/highlights.scm index 441e1386b..912c7cad6 100644 --- a/queries/vala/highlights.scm +++ b/queries/vala/highlights.scm @@ -1,18 +1,15 @@ -; Variable - -(uppercased_identifier) @constant - (namespaced_identifier left: [ - (camel_cased_identifier) @namespace - (identifier) @variable + (identifier) @namespace + (_) ] right: [ - (identifier) @parameter - (camel_cased_identifier) @type - (uppercased_identifier) @constant + ((identifier) @constructor (#match? @constructor "^[A-Z]*[a-z]+")) + ((identifier) @constant (#match? @constant "^[A-Z][A-Z_]*")) + (_) ] ) + ; Pointers (address_of_identifier "&" @symbol) @@ -157,7 +154,6 @@ type: (_) @type name: [ (identifier) @method - (camel_cased_identifier) @type (generic_identifier (_) @type) (namespaced_identifier (_) @method . @@ -168,7 +164,6 @@ (function_call identifier: [ (identifier) @method - (camel_cased_identifier) @type (generic_identifier (_) @type) (namespaced_identifier (_) @method . @@ -198,16 +193,14 @@ "global::" @namespace -"using" @include +(using + "using" @include + (_) @namespace +) ; Classes -(class_declaration - [ - (camel_cased_identifier) @type - (generic_identifier (_) @type ) - ] -) +(class_declaration) @type (class_constructor_definition name: [ @@ -223,12 +216,7 @@ ; Interfaces -(interface_declaration - [ - (camel_cased_identifier) @type - (generic_identifier (_) @type ) - ] -) +(interface_declaration) @type ; Strings and escape sequences @@ -247,12 +235,14 @@ ; New instance from Object (new_instance - ".new" @keyword + "new" @keyword ) ; GObject construct -"construct" @constructor +(gobject_construct + "construct" @keyword +) ; Try statement @@ -266,7 +256,7 @@ ; Enum (enum_declaration - (camel_cased_identifier) @type + name: (identifier) @type ) ; Loop @@ -292,6 +282,6 @@ ; Code attribute (code_attribute - name: (camel_cased_identifier) @attribute + name: (identifier) @attribute param: (_) @attribute ) @attribute |
