Indent doesn't load when opening new files #506
Replies: 2 comments 1 reply
-
the fact that :lua Snacks.indent.* is not available means snakcs isnt loaded. |
Beta Was this translation helpful? Give feedback.
-
I took a look at the code and I think I found out why it doesn't load. From the local events = {
BufReadPre = { "bigfile" },
BufReadPost = { "quickfile", "indent" },
LspAttach = { "words" },
UIEnter = { "dashboard", "scroll", "input", "scope", "picker" },
} https://github.com/folke/snacks.nvim/blob/main/lua/snacks/init.lua#L129 This is what the Neovim documentation says about
The last point should be the reason why it doesn't load. And it works if I move indent to the UIEnter event instead. Again, I'm new to Neovim (and lua) so I don't know which event would be more appropriate. So loading the indent feature on an event that is "BufReadPost but includes files that doesn't exist" would probably solve my problem. Thanks! |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello! I'm still pretty new to the Neovim world so I'm not sure if this is something that requires extra configuration, expected behavior or if it could be a bug. Or just me trying to work with Neovim in a way you shouldn't (very likely!). The problem is that the indent feature doesn't seem to load if I start a new file without opening up an existing file.
Example:
nvim test.go
for example, ornvim
and then:e test.go
):lua Snacks.indent.*
is unavailable. It doesn't matter if the file is saved.This is with the latest Neovim nightly and snacks as the only lazy.nvim plugin loaded.
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions