mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-22 13:20:09 -04:00
Add indent.align_hanging metadata
This allows indentation queries to bypass the default behavior of indenting liens following a hanging open_delimiter differently. (Primarily useful for lisp like languages)
This commit is contained in:
parent
453d94ea3b
commit
796f4403bc
1 changed files with 1 additions and 1 deletions
|
|
@ -291,7 +291,7 @@ function M.get_indent(lnum)
|
|||
if c_delim_node then
|
||||
c_srow, _ = c_delim_node:start()
|
||||
end
|
||||
if o_is_last_in_line then
|
||||
if o_is_last_in_line and not metadata['indent.align_hanging'] then
|
||||
-- hanging indent (previous line ended with starting delimiter)
|
||||
-- should be processed like indent
|
||||
if should_process then
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue