improving startup time by using lazy loading or filetype loading

This commit is contained in:
Jeremie Fraeys 2024-07-21 20:57:00 -04:00
parent bdb655c5a1
commit 7f1b34fd6f
62 changed files with 1285 additions and 561 deletions

View file

@ -0,0 +1,19 @@
return {
'f-person/auto-dark-mode.nvim',
event = 'VimEnter', -- Lazy load on VimEnter event
opts = {
update_interval = 1000, -- Check for mode change every second
set_dark_mode = function()
vim.cmd('colorscheme monokai')
vim.cmd('set background=dark') -- Ensure the background is set correctly
end,
set_light_mode = function()
vim.cmd('colorscheme solarized')
vim.cmd('set background=light')
end,
},
config = function(_, opts)
require('auto-dark-mode').setup(opts)
end
}