diff options
Diffstat (limited to 'lua')
| -rw-r--r-- | lua/nvim-treesitter/indent.lua | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lua/nvim-treesitter/indent.lua b/lua/nvim-treesitter/indent.lua index d63f43207..a86b5baf5 100644 --- a/lua/nvim-treesitter/indent.lua +++ b/lua/nvim-treesitter/indent.lua @@ -117,7 +117,7 @@ function M.get_indent(lnum) end -- do not indent for nodes that starts-and-ends on same line and starts on target line (lnum) - if not is_processed_by_row[srow] and (q.indent[node:id()] and srow ~= erow and srow ~= lnum - 1) then + if not is_processed_by_row[srow] and (q.indent[node:id()] and srow ~= erow and ((srow ~= lnum - 1) or q.indent[node:id()].start_at_same_line)) then indent = indent + indent_size is_processed = true end |
