Add indent.propagate metadata

This allows multiple nodes which share the same line to contribute to
indentation. (Primarily for lisp like languages)
This commit is contained in:
Garrett Hopper 2025-05-07 12:08:41 -05:00
parent 6ba63e4844
commit 453d94ea3b

View file

@ -335,7 +335,9 @@ function M.get_indent(lnum)
indent = indent
end
end
is_processed = true
if not metadata["indent.propagate"] then
is_processed = true
end
if indent_is_absolute then
-- don't allow further indenting by parent nodes, this is an absolute position
return indent