feat: Nvim | update to NvChad 3
This commit is contained in:
17
dotfiles/nvim/lua/autocmds.lua
Normal file
17
dotfiles/nvim/lua/autocmds.lua
Normal file
@@ -0,0 +1,17 @@
|
||||
require "nvchad.autocmds"
|
||||
|
||||
-- Auto-reload files when changed externally
|
||||
vim.api.nvim_create_autocmd({ "FocusGained", "BufEnter" }, {
|
||||
pattern = "*",
|
||||
callback = function()
|
||||
vim.cmd "checktime"
|
||||
end,
|
||||
})
|
||||
|
||||
-- Notify when file has been changed externally
|
||||
vim.api.nvim_create_autocmd("FileChangedShellPost", {
|
||||
pattern = "*",
|
||||
callback = function()
|
||||
vim.notify("File changed on disk. Buffer reloaded.", vim.log.levels.WARN)
|
||||
end,
|
||||
})
|
||||
Reference in New Issue
Block a user