aboutsummaryrefslogtreecommitdiffstats
path: root/queries
diff options
context:
space:
mode:
authorDragonBillow <42114817+cathaysia@users.noreply.github.com>2024-05-20 10:47:12 +0800
committerGitHub <noreply@github.com>2024-05-20 11:47:12 +0900
commitd184407e33084f4a57302bc1adf991997ccdd1da (patch)
tree8e5c8c2de3f228deb12fb625eea6eb886c19afa6 /queries
parentbot(lockfile): update php, php_only, swift (diff)
downloadnvim-treesitter-d184407e33084f4a57302bc1adf991997ccdd1da.tar
nvim-treesitter-d184407e33084f4a57302bc1adf991997ccdd1da.tar.gz
nvim-treesitter-d184407e33084f4a57302bc1adf991997ccdd1da.tar.bz2
nvim-treesitter-d184407e33084f4a57302bc1adf991997ccdd1da.tar.lz
nvim-treesitter-d184407e33084f4a57302bc1adf991997ccdd1da.tar.xz
nvim-treesitter-d184407e33084f4a57302bc1adf991997ccdd1da.tar.zst
nvim-treesitter-d184407e33084f4a57302bc1adf991997ccdd1da.zip
feat(queries): update idl hightlight (#6625)
Signed-off-by: DragonBillow <DragonBillow@outlook.com>
Diffstat (limited to 'queries')
-rw-r--r--queries/idl/highlights.scm142
1 files changed, 133 insertions, 9 deletions
diff --git a/queries/idl/highlights.scm b/queries/idl/highlights.scm
index 47ea00c25..54b38fc08 100644
--- a/queries/idl/highlights.scm
+++ b/queries/idl/highlights.scm
@@ -8,19 +8,45 @@
"bitmask"
"bitset"
"@annotation"
- "interface"
"exception"
"typedef"
+ "home"
+ "typeid"
+ "typeprefix"
+ (interface_kind)
+ (value_kind)
+ "component"
+ "porttype"
+ "connector"
+ "eventtype"
+ "valuetype"
] @keyword.type
+(import_dcl
+ "import" @keyword.directive)
+
[
"module"
"attribute"
+ "factory"
+ "manages"
] @keyword
[
"const"
"readonly"
+ "abstract"
+ "custom"
+ "supports"
+ "provides"
+ "uses"
+ "port"
+ "mirrorport"
+ "emits"
+ "publishes"
+ "consumes"
+ "primarykey"
+ "finder"
] @keyword.modifier
[
@@ -44,14 +70,17 @@
(unsigned_longlong_int)
(floating_pt_type)
(char_type)
- (scoped_name)
(string_type)
(any_type)
(fixed_pt_type)
(sequence_type)
(map_type)
+ (object_type)
+ (value_base_type)
] @type.builtin
+(scoped_name) @type
+
(boolean_literal) @boolean
(number_literal) @number
@@ -95,7 +124,8 @@
(readonly_attr_declarator
(simple_declarator) @variable.member)
-(attr_declarator) @variable.member
+(attr_declarator
+ (simple_declarator) @variable.member)
(annotation_appl
"@" @attribute
@@ -176,7 +206,7 @@
"bitfield" @keyword.modifier
(positive_int_const) @number
(destination_type)* @type)
- (identifier) @variable.parameter)
+ (identifier) @variable.member)
(bit_value) @constant
@@ -195,11 +225,105 @@
(scoped_name
(identifier) @type))
-(simple_declarator
+(annotation_appl_param
(identifier) @attribute)
-(array_declarator
- (identifier) @attribute)
+(home_header
+ (identifier) @type)
-(annotation_appl_param
- (identifier) @attribute)
+(factory_dcl
+ (identifier) @type)
+
+(factory_param_dcl
+ "in" @keyword.modifier)
+
+(op_oneway_dcl
+ "oneway" @keyword.modifier
+ (identifier) @function.method)
+
+(in_param_dcl
+ "in" @keyword.modifier)
+
+(context_expr
+ "context" @keyword.modifier)
+
+(get_excep_expr
+ "getraises" @keyword.exception)
+
+(set_excep_expr
+ "setraises" @keyword.exception)
+
+(value_header
+ (identifier) @type)
+
+(value_abs_def
+ (identifier) @type)
+
+(value_forward_dcl
+ (identifier) @type)
+
+(value_box_def
+ (identifier) @type)
+
+(provides_dcl
+ (interface_type) @type
+ (identifier) @variable.member)
+
+(uses_dcl
+ (identifier) @variable.member)
+
+(component_forward_dcl
+ (identifier) @type)
+
+(component_header
+ (identifier) @type)
+
+(porttype_forward_dcl
+ (identifier) @type)
+
+(porttype_def
+ (identifier) @type)
+
+(port_dcl
+ (identifier) @variable.member)
+
+(connector_header
+ (identifier) @type)
+
+(emits_dcl
+ (identifier) @variable.member)
+
+(publishes_dcl
+ (identifier) @variable.member)
+
+(consumes_dcl
+ (identifier) @variable.member)
+
+(event_forward_dcl
+ (identifier) @type)
+
+(event_header
+ (identifier) @type)
+
+(event_abs_def
+ (identifier) @type)
+
+(template_module_dcl
+ (identifier) @type)
+
+(formal_parameter
+ (formal_parameter_type) @type
+ (identifier) @variable.member)
+
+(init_param_dcl
+ "in" @keyword.modifier
+ (simple_declarator) @variable.parameter)
+
+(finder_dcl
+ (identifier) @function.method)
+
+(member
+ identifier: (declarators) @variable.member)
+
+(factory_param_dcl
+ (simple_declarator) @variable.parameter)