fix: bad interaction with editorconfig-vim

This was a doozy. From the oil buffer, when you edited a file the
editorconfig-vim autocmd that runs s:UseConfigFiles() would run and
something in that logic would cause the oil buffer to become `set
modified`. This obviously messes with the buffer cleanup logic, and also
makes vim more annoying to exit. The solution is to disable
editorconfig-vim in oil buffers.
This commit is contained in:
Steven Arcangeli 2023-02-03 14:28:55 -08:00
parent 98fcc2d0d7
commit 7371dd220f

View file

@ -184,6 +184,7 @@ M.initialize = function(bufnr)
vim.bo[bufnr].buftype = "acwrite"
vim.bo[bufnr].syntax = "oil"
vim.bo[bufnr].filetype = "oil"
vim.b[bufnr].EditorConfig_disable = 1
session[bufnr] = true
for k, v in pairs(config.buf_options) do
vim.api.nvim_buf_set_option(bufnr, k, v)