aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDragonBillow <DragonBillow@outlook.com>2024-07-01 16:32:56 +0800
committerChristian Clason <c.clason@uni-graz.at>2024-07-01 11:37:38 +0200
commit1e546c0f5e0b3e8427ef637c2b1f4c4dc92bbb13 (patch)
tree306937e9c64c14892bf60228333723bc0b1ef042
parentbot(readme): update (diff)
downloadnvim-treesitter-1e546c0f5e0b3e8427ef637c2b1f4c4dc92bbb13.tar
nvim-treesitter-1e546c0f5e0b3e8427ef637c2b1f4c4dc92bbb13.tar.gz
nvim-treesitter-1e546c0f5e0b3e8427ef637c2b1f4c4dc92bbb13.tar.bz2
nvim-treesitter-1e546c0f5e0b3e8427ef637c2b1f4c4dc92bbb13.tar.lz
nvim-treesitter-1e546c0f5e0b3e8427ef637c2b1f4c4dc92bbb13.tar.xz
nvim-treesitter-1e546c0f5e0b3e8427ef637c2b1f4c4dc92bbb13.tar.zst
nvim-treesitter-1e546c0f5e0b3e8427ef637c2b1f4c4dc92bbb13.zip
feat(idl): update highlight
Signed-off-by: DragonBillow <DragonBillow@outlook.com>
-rw-r--r--lockfile.json2
-rw-r--r--queries/idl/highlights.scm24
2 files changed, 19 insertions, 7 deletions
diff --git a/lockfile.json b/lockfile.json
index 6fc5a1b8f..b5b911b87 100644
--- a/lockfile.json
+++ b/lockfile.json
@@ -318,7 +318,7 @@
"revision": "6858695eba0e63b9e0fceef081d291eb352abce8"
},
"idl": {
- "revision": "dcc727329d383145a57f8ce7209f20c19a3765c6"
+ "revision": "2831737ee4187af867b2febce6f35d0475a3a3ca"
},
"ini": {
"revision": "87176e524f0a98f5be75fa44f4f0ff5c6eac069c"
diff --git a/queries/idl/highlights.scm b/queries/idl/highlights.scm
index 54b38fc08..47ce31b7b 100644
--- a/queries/idl/highlights.scm
+++ b/queries/idl/highlights.scm
@@ -79,6 +79,8 @@
(value_base_type)
] @type.builtin
+(escape_sequence) @string.escape
+
(scoped_name) @type
(boolean_literal) @boolean
@@ -111,7 +113,7 @@
"~"
"|"
"^"
- "$"
+ "&"
] @operator
[
@@ -128,15 +130,22 @@
(simple_declarator) @variable.member)
(annotation_appl
- "@" @attribute
+ "@" @attribute)
+
+(annotation_appl
(scoped_name) @attribute)
+(annotation_appl
+ (annotation_built_name) @attribute.builtin)
+
(op_dcl
(identifier) @function.method)
(type_declarator
- (simple_type_spec) @type
- (any_declarators) @type)
+ (simple_type_spec) @type)
+
+(type_declarator
+ (any_declarators) @variable.member)
(param_dcl
(simple_declarator) @variable.parameter)
@@ -205,8 +214,8 @@
(bitfield_spec
"bitfield" @keyword.modifier
(positive_int_const) @number
- (destination_type)* @type)
- (identifier) @variable.member)
+ (destination_type)? @type)
+ (identifier)* @variable.member)
(bit_value) @constant
@@ -327,3 +336,6 @@
(factory_param_dcl
(simple_declarator) @variable.parameter)
+
+(element_spec
+ (declarator) @variable.member)