mirror of
https://github.com/LazyVim/starter.git
synced 2026-07-22 12:31:04 +00:00
16 lines
579 B
Lua
16 lines
579 B
Lua
-- Autocmds are automatically loaded on the VeryLazy event
|
|
-- Default autocmds that are always set: https://github.com/LazyVim/LazyVim/blob/main/lua/lazyvim/config/autocmds.lua
|
|
-- Add any additional autocmds here
|
|
local function augroup(name)
|
|
return vim.api.nvim_create_augroup("lazyvim_" .. name, { clear = true })
|
|
end
|
|
|
|
-- when available, auto update when vim starts
|
|
vim.api.nvim_create_autocmd("VimEnter", {
|
|
group = augroup("autoupdate"),
|
|
callback = function()
|
|
if require("lazy.status").has_updates then
|
|
require("lazy").update({ show = true })
|
|
end
|
|
end,
|
|
})
|