From 84e4e0237f5d78e4fdc4fb87db03928351d6b882 Mon Sep 17 00:00:00 2001 From: Mateus Melchiades Date: Sat, 26 Feb 2022 10:23:36 -0300 Subject: highlights(vala): Re-update highlights and lockfile --- lockfile.json | 2 +- 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 -- cgit v1.2.3-70-g09d2