From 62982378b81ce91d5cdf70047113e51e13434286 Mon Sep 17 00:00:00 2001 From: Stephan Seitz Date: Sat, 22 Jan 2022 14:07:01 +0100 Subject: indents(cpp): indent at field_initializer_list --- lua/nvim-treesitter/indent.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lua') 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 -- cgit v1.2.3-70-g09d2