diff --git a/lua/hlchunk/utils/indentHelper.lua b/lua/hlchunk/utils/indentHelper.lua index 09ae824..d455a5d 100644 --- a/lua/hlchunk/utils/indentHelper.lua +++ b/lua/hlchunk/utils/indentHelper.lua @@ -70,12 +70,12 @@ local function get_rows_indent_by_treesitter(range) local bufnr = range.bufnr for i = range.start, range.finish, 1 do local t1 = vim.api.nvim_buf_call(bufnr, function() - local ok, indent = pcall(ts_indent.get_indent, i + 1) - return ok and indent or nil + local ok, indent = pcall(ts_indent.get_indent, i + 1) + return ok and indent or nil end) if t1 == nil then - goto continue + goto continue end local t2 = cFunc.get_indent(bufnr, i) diff --git a/stylua.toml b/stylua.toml index b047210..75b830c 100644 --- a/stylua.toml +++ b/stylua.toml @@ -1,3 +1,4 @@ line_endings = "Unix" indent_type = "Spaces" indent_width = 4 +syntax = "Lua52"