mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-20 12:20:02 -04:00
feat: add starlark
This commit is contained in:
parent
83e2e22d9e
commit
1641c4f3b4
8 changed files with 459 additions and 0 deletions
47
queries/starlark/indents.scm
Normal file
47
queries/starlark/indents.scm
Normal file
|
|
@ -0,0 +1,47 @@
|
|||
[
|
||||
(list)
|
||||
(dictionary)
|
||||
(set)
|
||||
|
||||
(for_statement)
|
||||
(if_statement)
|
||||
(while_statement)
|
||||
(with_statement)
|
||||
|
||||
(parenthesized_expression)
|
||||
(dictionary_comprehension)
|
||||
(list_comprehension)
|
||||
(set_comprehension)
|
||||
|
||||
(tuple_pattern)
|
||||
(list_pattern)
|
||||
(binary_operator)
|
||||
|
||||
(lambda)
|
||||
(function_definition)
|
||||
] @indent
|
||||
|
||||
(if_statement
|
||||
condition: (parenthesized_expression) @aligned_indent
|
||||
(#set! "delimiter" "()")
|
||||
)
|
||||
((ERROR "(" . (_)) @aligned_indent
|
||||
(#set! "delimiter" "()"))
|
||||
((argument_list) @aligned_indent
|
||||
(#set! "delimiter" "()"))
|
||||
((argument_list) @aligned_indent
|
||||
(#set! "delimiter" "()"))
|
||||
((parameters) @aligned_indent
|
||||
(#set! "delimiter" "()"))
|
||||
((tuple) @aligned_indent
|
||||
(#set! "delimiter" "()"))
|
||||
|
||||
[
|
||||
")"
|
||||
"]"
|
||||
"}"
|
||||
(elif_clause)
|
||||
(else_clause)
|
||||
] @branch
|
||||
|
||||
(string) @auto
|
||||
Loading…
Add table
Add a link
Reference in a new issue