I want to load a plugin when I enter a buffer, so I set this event to BufEnter
. But when I start neovim, the plugin loads at the dashboard buffer. I want to exclude that buffer. How can I do it?
Update
I created the augroup in the init.lua
file before lazy.nvim
and set the plugin event to the new augroup, but when I enter neovim, I get this error:
Failed to setup handlers for Comment.nvim
...hare/nvim/lazy/lazy.nvim/lua/lazy/core/handler/event.lua:68: Invalid 'event': 'BufInit'
# stacktrace:
- init.lua:65
Note
I changed the augroup name from NVIMCMPtGrp
to BufInit
.
The plugin unloads when I'm on dashboard, but it doesn't load when I enter a file