fix(indent): set only one autocmd for binding indentexpr (#3190)

This commit is contained in:
Kiyan 2022-07-17 08:23:51 +02:00 committed by GitHub
parent a5709e685b
commit 7e0651cd56
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -195,10 +195,6 @@ local indent_funcs = {}
function M.attach(bufnr)
indent_funcs[bufnr] = vim.bo.indentexpr
vim.bo.indentexpr = "nvim_treesitter#indent()"
vim.api.nvim_create_autocmd("Filetype", {
pattern = vim.bo.filetype,
command = "setlocal indentexpr=nvim_treesitter#indent()",
})
end
function M.detach(bufnr)