mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-01 19:17:02 -04:00
feat(indent): support @aligned_indent for python
This commit is contained in:
parent
46438064ac
commit
bb60706433
5 changed files with 67 additions and 17 deletions
|
|
@ -1,6 +1,5 @@
|
|||
[
|
||||
(list)
|
||||
(tuple)
|
||||
(dictionary)
|
||||
(set)
|
||||
|
||||
|
|
@ -19,8 +18,6 @@
|
|||
|
||||
(tuple_pattern)
|
||||
(list_pattern)
|
||||
(argument_list)
|
||||
(parameters)
|
||||
(binary_operator)
|
||||
|
||||
(lambda)
|
||||
|
|
@ -30,6 +27,20 @@
|
|||
(concatenated_string)
|
||||
] @indent
|
||||
|
||||
|
||||
(if_statement
|
||||
condition: (parenthesized_expression) @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" "()"))
|
||||
|
||||
[
|
||||
")"
|
||||
"]"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue