mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-19 03:40:04 -04:00
indents added new language highlights added (#5777)
This commit is contained in:
parent
7958ff9ec7
commit
b6b9ca448b
3 changed files with 36 additions and 1 deletions
|
|
@ -336,7 +336,7 @@
|
||||||
"revision": "8a841fb20ce683bfbb3469e6ba67f2851cfdf94a"
|
"revision": "8a841fb20ce683bfbb3469e6ba67f2851cfdf94a"
|
||||||
},
|
},
|
||||||
"leo": {
|
"leo": {
|
||||||
"revision": "23a9534d09d523d0dcee7dbf89e7c819e6835f6f"
|
"revision": "304611b5eaf53aca07459a0a03803b83b6dfd3b3"
|
||||||
},
|
},
|
||||||
"linkerscript": {
|
"linkerscript": {
|
||||||
"revision": "f99011a3554213b654985a4b0a65b3b032ec4621"
|
"revision": "f99011a3554213b654985a4b0a65b3b032ec4621"
|
||||||
|
|
|
||||||
|
|
@ -131,6 +131,7 @@
|
||||||
[
|
[
|
||||||
(block_height)
|
(block_height)
|
||||||
(self_caller)
|
(self_caller)
|
||||||
|
(self_signer)
|
||||||
] @constant.builtin
|
] @constant.builtin
|
||||||
|
|
||||||
(free_function_call
|
(free_function_call
|
||||||
|
|
@ -172,6 +173,7 @@
|
||||||
|
|
||||||
[
|
[
|
||||||
(address_literal)
|
(address_literal)
|
||||||
|
(signature_literal)
|
||||||
((affine_group_literal) (#set! "priority" 101))
|
((affine_group_literal) (#set! "priority" 101))
|
||||||
(field_literal)
|
(field_literal)
|
||||||
(product_group_literal)
|
(product_group_literal)
|
||||||
|
|
|
||||||
33
queries/leo/indents.scm
Normal file
33
queries/leo/indents.scm
Normal file
|
|
@ -0,0 +1,33 @@
|
||||||
|
[
|
||||||
|
(record_declaration)
|
||||||
|
(struct_declaration)
|
||||||
|
(mapping_declaration)
|
||||||
|
(constant_declaration)
|
||||||
|
(return_statement)
|
||||||
|
(expression_statement)
|
||||||
|
(variable_declaration)
|
||||||
|
(loop_statement)
|
||||||
|
(assignment_statement)
|
||||||
|
(assert_statement)
|
||||||
|
(struct_expression)
|
||||||
|
(array_expression)
|
||||||
|
(tuple_expression)
|
||||||
|
(parenthesized_expression)
|
||||||
|
(items_block)
|
||||||
|
(block)
|
||||||
|
] @indent.begin
|
||||||
|
|
||||||
|
; if "if" statement and conditional statement are in separate lines
|
||||||
|
; conditional should be indented and when the conditional block
|
||||||
|
; starts dedented
|
||||||
|
(branch
|
||||||
|
(block "{" @indent.end)) @indent.begin
|
||||||
|
|
||||||
|
((function_parameters) @indent.align
|
||||||
|
(#set! indent.open_delimiter "(")
|
||||||
|
(#set! indent.close_delimiter ")"))
|
||||||
|
|
||||||
|
[
|
||||||
|
(comment)
|
||||||
|
(ERROR)
|
||||||
|
] @indent.auto
|
||||||
Loading…
Add table
Add a link
Reference in a new issue