diff --git a/.config/nvim/lua/config/autocmds.lua b/.config/nvim/lua/config/autocmds.lua index 256e0479..fe749edd 100644 --- a/.config/nvim/lua/config/autocmds.lua +++ b/.config/nvim/lua/config/autocmds.lua @@ -59,7 +59,11 @@ vim.api.nvim_create_autocmd({ "FileType" }, { callback = function() vim.opt_local.breakindent = true -- We want markdown files to autosave - vim.opt_local.autowrite = true + -- vim.opt_local.autowrite = true + vim.api.nvim_create_autocmd({ "InsertLeave", "TextChanged" }, { + buffer = 0, + command = "write", + }) vim.opt_local.wrap = true vim.opt_local.spell = true -- local secondary = "#379393"