mirror of
https://github.com/chenasraf/nvim-treesitter.git
synced 2026-05-18 01:39:00 +00:00
feat(python): Improved python indentation (#6859)
* feat: improve python indentation * use lua-match * revert concatenated_string changes, handle function def hanging indents * lint * add delimiters to param query * add test cases
This commit is contained in:
@@ -2,6 +2,12 @@ def aligned_indent(arg1,
|
||||
arg2):
|
||||
pass
|
||||
|
||||
def aligned_indent2(
|
||||
arg1,
|
||||
arg2
|
||||
):
|
||||
pass
|
||||
|
||||
aligned_indent(1,
|
||||
2)
|
||||
|
||||
@@ -10,5 +16,10 @@ aligned_indent(1,
|
||||
2
|
||||
)
|
||||
|
||||
aligned_indent(
|
||||
1,
|
||||
2
|
||||
)
|
||||
|
||||
foodsadsa(sdada,
|
||||
2
|
||||
|
||||
35
tests/indent/python/parenthesized_conditions.py
Normal file
35
tests/indent/python/parenthesized_conditions.py
Normal file
@@ -0,0 +1,35 @@
|
||||
if (
|
||||
True
|
||||
or 1
|
||||
or False
|
||||
):
|
||||
pass
|
||||
|
||||
if (
|
||||
True
|
||||
or 1
|
||||
or False):
|
||||
pass
|
||||
|
||||
if (True
|
||||
or 1
|
||||
or False):
|
||||
pass
|
||||
|
||||
while (
|
||||
False
|
||||
or 1
|
||||
or False
|
||||
):
|
||||
pass
|
||||
|
||||
while (
|
||||
False
|
||||
or 1
|
||||
or False):
|
||||
pass
|
||||
|
||||
while (False
|
||||
or 1
|
||||
or False):
|
||||
pass
|
||||
Reference in New Issue
Block a user