mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-21 12:50:09 -04:00
Fix indentation of lines within node preceding opening delimiter
This commit is contained in:
parent
6a0cc56962
commit
b1791bc488
1 changed files with 1 additions and 1 deletions
|
|
@ -306,7 +306,7 @@ function M.get_indent(lnum)
|
|||
end
|
||||
else
|
||||
-- aligned indent
|
||||
if c_is_last_in_line and c_srow and o_srow ~= c_srow and c_srow < lnum - 1 then
|
||||
if lnum - 1 <= o_srow or (c_is_last_in_line and c_srow and o_srow ~= c_srow and c_srow < lnum - 1) then
|
||||
-- If current line is outside the range of a node marked with `@aligned_indent`
|
||||
-- Then its indent level shouldn't be affected by `@aligned_indent` node
|
||||
indent = math.max(indent - indent_size, 0)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue