Skip to content

Commit

Permalink
feat(nvim): Add an auto save autocommand
Browse files Browse the repository at this point in the history
  • Loading branch information
briandipalma committed Oct 11, 2024
1 parent c912b94 commit ec2eed9
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions dotfiles/nvim/lua/config/autocmds.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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" }
)

0 comments on commit ec2eed9

Please sign in to comment.