aboutsummaryrefslogtreecommitdiffstats
path: root/queries/leo
diff options
context:
space:
mode:
authorRobert Horvath <rob@nyar.eu>2024-12-29 12:16:38 -0300
committerChristian Clason <ch.clason+github@icloud.com>2024-12-30 17:55:35 +0100
commitf0f48e02903bd5ae079ca19d92ad1be7b4c88179 (patch)
tree10a8fb33d9cfdb0ab1f3b1e1e5cab6baaa578d06 /queries/leo
parentfeat(ipkg): add parser and queries (#7277) (diff)
downloadnvim-treesitter-f0f48e02903bd5ae079ca19d92ad1be7b4c88179.tar
nvim-treesitter-f0f48e02903bd5ae079ca19d92ad1be7b4c88179.tar.gz
nvim-treesitter-f0f48e02903bd5ae079ca19d92ad1be7b4c88179.tar.bz2
nvim-treesitter-f0f48e02903bd5ae079ca19d92ad1be7b4c88179.tar.lz
nvim-treesitter-f0f48e02903bd5ae079ca19d92ad1be7b4c88179.tar.xz
nvim-treesitter-f0f48e02903bd5ae079ca19d92ad1be7b4c88179.tar.zst
nvim-treesitter-f0f48e02903bd5ae079ca19d92ad1be7b4c88179.zip
feat(leo): highlights casting and record expressions added
Diffstat (limited to 'queries/leo')
-rw-r--r--queries/leo/highlights.scm23
1 files changed, 21 insertions, 2 deletions
diff --git a/queries/leo/highlights.scm b/queries/leo/highlights.scm
index 4e10de013..3d4dadd3c 100644
--- a/queries/leo/highlights.scm
+++ b/queries/leo/highlights.scm
@@ -17,7 +17,10 @@
"struct"
] @keyword.type
-"in" @keyword.operator
+[
+ "in"
+ "as"
+] @keyword.operator
[
"constant"
@@ -133,7 +136,23 @@
(struct_component_declaration
(identifier) @variable.member)
-(type) @type
+(struct_expression
+ (identifier) @type.definition)
+
+(struct_component_initializer
+ (identifier) @variable.member)
+
+[
+ (type)
+ (boolean_type)
+ (integer_type)
+ (field_type)
+ (group_type)
+ (scalar_type)
+ (address_type)
+ (signature_type)
+ (string_type)
+] @type
[
(block_height)