Hello, I have something similar happening to me here: `o` in c++ incorrectly indents when using `set indentexpr=nvim_treesitter#indent()` · Issue #3216 · nvim-treesitter/nvim-treesitter · GitHub
Where the indentation of cpp files is one too many. If I run set indentexpr?
, I get the following:
indentexpr=nvim_treesitter#indent()
If I manually unset indentexpr using set indentexpr=""
, everything works correctly. The problem is, I can’t figure out how to do this in my init.lua config.
vim.opt.indentexpr=""
doesn’t work, nor does trying to follow instructions to set this in an after
directory. I also tried to make an auto command, but that didn’t work either:
vim.api.nvim_create_autocmd({"BufReadPost", {
pattern = {"*"},
callback = function()
vim.opt.indentexpr = ""
end
})
I just see nvim_treesitter#indent()
every time.
Thanks!
Cory