aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lua/nvim-treesitter/indent.lua3
1 files changed, 2 insertions, 1 deletions
diff --git a/lua/nvim-treesitter/indent.lua b/lua/nvim-treesitter/indent.lua
index cfc3f8a94..ffbb8c0b7 100644
--- a/lua/nvim-treesitter/indent.lua
+++ b/lua/nvim-treesitter/indent.lua
@@ -50,11 +50,12 @@ function M.get_indent(lnum)
node = node:parent()
end
+ local ind_size = vim.bo.softtabstop < 0 and vim.bo.shiftwidth or vim.bo.tabstop
local ind = 0
while node do
node = node:parent()
if indents[tostring(node)] then
- ind = ind + vim.bo.tabstop
+ ind = ind + ind_size
end
end