Replies: 1 comment
-
I now use this autocommand to update the dashboard when the status of plugins changes. -- Updates an existing dashboard every time when lazy.nvim checks or updates plugins.
vim.api.nvim_create_autocmd('User', {
pattern = { 'LazyCheck', 'LazyUpdate' },
callback = function()
for _, bufnr in ipairs(vim.api.nvim_list_bufs()) do
if vim.api.nvim_get_option_value('filetype', { buf = bufnr }) == 'snacks_dashboard' then
snacks.dashboard.update()
end
end
end,
}) |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I have an information in the dashboard about how many packages have updates.
LazyCheck
through an autocmd.Is this a good way or am I missing a shortcut here?
The updates info is from:
local updates = require('lazy.manage.checker').updated
and#updates
.My config details:
My snacks: config
Beta Was this translation helpful? Give feedback.
All reactions