mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-19 03:40:04 -04:00
feat: add Squirrel
This commit is contained in:
parent
ba4bce9bb7
commit
71be7c04d5
8 changed files with 480 additions and 0 deletions
58
queries/squirrel/indents.scm
Normal file
58
queries/squirrel/indents.scm
Normal file
|
|
@ -0,0 +1,58 @@
|
|||
[
|
||||
(class_declaration)
|
||||
(function_declaration)
|
||||
(enum_declaration)
|
||||
|
||||
(array)
|
||||
(block)
|
||||
(table)
|
||||
(anonymous_function)
|
||||
(parenthesized_expression)
|
||||
|
||||
(while_statement)
|
||||
(switch_statement)
|
||||
(for_statement)
|
||||
(foreach_statement)
|
||||
; (try_statement)
|
||||
(catch_statement)
|
||||
] @indent
|
||||
|
||||
(
|
||||
(if_statement)
|
||||
(ERROR "else") @indent
|
||||
)
|
||||
|
||||
(if_statement
|
||||
condition: (_) @indent)
|
||||
|
||||
(if_statement
|
||||
consequence: (_)
|
||||
(else_statement) @indent)
|
||||
|
||||
(do_while_statement
|
||||
"do"
|
||||
(_) @indent)
|
||||
|
||||
(try_statement
|
||||
(_) @indent
|
||||
(catch_statement) @indent)
|
||||
|
||||
[ "{" "}" ] @branch
|
||||
|
||||
[ "(" ")" ] @branch
|
||||
|
||||
[ "[" "]" ] @branch
|
||||
|
||||
[
|
||||
"}"
|
||||
")"
|
||||
"]"
|
||||
] @indent_end
|
||||
|
||||
[
|
||||
(ERROR)
|
||||
(comment)
|
||||
|
||||
(string)
|
||||
(verbatim_string)
|
||||
] @auto
|
||||
Loading…
Add table
Add a link
Reference in a new issue