diff --git a/dotfiles/nvim/lua/config/autocmds.lua b/dotfiles/nvim/lua/config/autocmds.lua index 9f755cc..3781867 100644 --- a/dotfiles/nvim/lua/config/autocmds.lua +++ b/dotfiles/nvim/lua/config/autocmds.lua @@ -10,3 +10,8 @@ vim.api.nvim_create_autocmd("FileType", { vim.bo.makeprg = "npx tsc --project " .. project_root end, }) + +vim.api.nvim_create_autocmd( + { "FocusLost", "ModeChanged", "TextChanged", "BufEnter" }, + { desc = "autosave", pattern = "*", command = "silent! update" } +)