reload editorconfig on User FilePost event only if enabled #2672

This commit is contained in:
siduck 2024-02-17 06:31:11 +05:30
parent 59082a8f28
commit 56cc2d757a
1 changed files with 4 additions and 1 deletions

View File

@ -121,7 +121,10 @@ vim.api.nvim_create_autocmd({ "UIEnter", "BufReadPost", "BufNewFile" }, {
vim.schedule(function() vim.schedule(function()
vim.api.nvim_exec_autocmds("FileType", {}) vim.api.nvim_exec_autocmds("FileType", {})
if vim.g.editorconfig then
require("editorconfig").config(args.buf) require("editorconfig").config(args.buf)
end
end, 0) end, 0)
end end
end, end,