aboutsummaryrefslogtreecommitdiffstats
path: root/queries/vala
diff options
context:
space:
mode:
authorMateus Melchiades <matbme@walkintosh.local>2022-02-26 10:23:36 -0300
committerChristian Clason <christian.clason@uni-due.de>2022-02-26 15:12:17 +0100
commit84e4e0237f5d78e4fdc4fb87db03928351d6b882 (patch)
tree0d2b55abbe959f442732f9de1ed6ca12f341d1af /queries/vala
parentFixed a bug where indentation was not correct for class/enum bodies that had ... (diff)
downloadnvim-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
Diffstat (limited to 'queries/vala')
-rw-r--r--queries/vala/highlights.scm46
1 files changed, 18 insertions, 28 deletions
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