From 7371dd220f1d08789cc225846d8cafed938777e9 Mon Sep 17 00:00:00 2001 From: Steven Arcangeli Date: Fri, 3 Feb 2023 14:28:55 -0800 Subject: [PATCH] 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. --- lua/oil/view.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/lua/oil/view.lua b/lua/oil/view.lua index f15597d..503a8d0 100644 --- a/lua/oil/view.lua +++ b/lua/oil/view.lua @@ -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)