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:
Garrett Hopper 2025-05-07 12:09:54 -05:00
parent 453d94ea3b
commit 796f4403bc

View file

@ -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