hedyhli / outline.nvim

Code outline sidebar powered by LSP. Significantly enhanced & refactored fork of symbols-outline.nvim.
https://sr.ht/~hedy/outline.nvim
MIT License
490 stars 14 forks source link

Refresh symbol or breadcrumb when Outline window is closed? #62

Open iwinux opened 3 months ago

iwinux commented 3 months ago

When the Outline window is open, get_symbol() and get_breadcrumb() return current symbol (following cursor) correctly. But when the window is closed, these 2 functions only return cached result. I've tried calling follow_cursor() and refresh() but the symbol information is not updated.

Is it possible to refresh it without opening the Outline window? My use case is to display it in status line (managed by lualine).

hedyhli commented 2 months ago

This sounds a little out-of-scope (outline.nvim revolves around that sidebar window itself, not "all symbols in general"), and currently I don't see a trivial way to implement this.

That said, I understand that it's simpler for us as users to just install one plugin and have it cover everything (both sidebar and statusline breadcrumb), so I'll leave this up for grabs in case anyone wishes to pursue finding a reasonable way to support it.