You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When trying to open the outline in an empty file, it works correctly.
When opening in a .lua file, it crashes to commandline or freezes indefinetely.
Tried to run neovim with the -D option, but the log file is 0 bytes.
When trying other languages (Rust), symbol list is empty.
Hello, this looks peculiar. Using your config, I can reproduce having an empty symbol list but I don't experience any freezing or crashing.
However, it works fine if init = ... is removed (note that Lazy.nvim can call the setup function just fine if the opts table is provided, though empty). Let me know if this works for you.
I'm not quite sure how this init key could've made the difference, and even more so, the original symbols-outline works just fine in this situation though, I'll look into it.
After some more testing with simrat39's version, I've found that works/doesn't work behaves kind of randomly on me, and I'm not sure what the factor is. Excuse my poor understanding of how Lazy exactly works, but I'll try the method you mentioned, and append this comment with the result.
Edits:
Removed init block
Results:
In test file (lua) with just one function: works
In test file (rust) with just one function: works
In complex file (rust) with many functions and other stuff: works
In my vim config file (init.lua): works
Conclusion:
My theory is that if opts causes the plugin to be loaded (setup() is called), then my init function causes setup() to be called twice, thus possibly breaking the plugin.
Counterpoint: not including opts, and including init does cause the crash too.
Counter-counterpoint: maybe something else also calls setup() and init just does it again. (Perhaps when lazy is set to true calling the commands for the first time causes setup() to be called again
Perhaps solution:
Make it so that the plugin ignores any subsequent calls to setup() after the first one, so that it becomes foolproof.
P.S.
It also seems that if the program enters a bugged state (such as by using init), the only way to break out of it is restart the user session (log out and log in again), otherwise, independent of the config file, it will not work anymore)
And also that only the first nvim session works, and any subsequent ones fail even if the config remains unchanged??
On my MacBook, with an identical config, everything seems to work fine, though.
Description
When trying to open the outline in an empty file, it works correctly.
When opening in a .lua file, it crashes to commandline or freezes indefinetely.
Tried to run neovim with the -D option, but the log file is 0 bytes.
When trying other languages (Rust), symbol list is empty.
Simrat's original version works, though
To reproduce
nvim test.lua
:OutlineOpen
My
lazy.nvim
config for loadingoutline.nvim
Other Info
The text was updated successfully, but these errors were encountered: