simrat39 / symbols-outline.nvim

A tree like view for symbols in Neovim using the Language Server Protocol. Supports all your favourite languages.
MIT License
1.85k stars 97 forks source link

How to restore symbols-outline state on session restore? #208

Open xbladesub opened 1 year ago

xbladesub commented 1 year ago

I use auto-session plugin to manage my sessions. How can I restore the state of symbols-outline with it? Currently it restores empty buffer. Maybe there are some settings or maybe another session plugin which would work with symbols-outline in this case?

gennaro-tedesco commented 1 year ago

If you use nvim-possession you can pass a callback to the post_hook argument to restore states of additional buffers, for instance in this case the symbols outline.

However, this works with lua callbacks only, and as far as I know this plugin doesn't expose the corresponding require("symbols-outline").toggle/open() method or such (if it did, you could just pass it to the post_hook callback).