symbols-outline.nvim icon indicating copy to clipboard operation
symbols-outline.nvim copied to clipboard

[Feature Request] An option to auto open outline window

Open zhengpd opened this issue 4 years ago • 5 comments

Really like this plugin. It might be more awesome if we could have an option to

  • auto open the outline window when there are outline entries,
  • and auto close when there is no entries.

zhengpd avatar Aug 03 '21 14:08 zhengpd

autocmd FileType c,cpp,rb,vim,php,go nested :SymbolsOutlineOpen

not work

jinleileiking avatar Mar 01 '22 03:03 jinleileiking

It seems, you should wait sometime for lsp ok? then this cmd is worked well.

jinleileiking avatar Mar 01 '22 03:03 jinleileiking

You can run the command SymbolsOutlineOpen inside the on_attach function of the lsp server instead of using it in an autocmd. Still, the outline pane will steal the focus on opening, which I find quite annoying. I don't think there is yet a way to open symbol-outline and stay in the current window (I tried wincmd p after SymbolOutlineOpen, but to no avail).

ecogest avatar Mar 24 '22 19:03 ecogest

Otherwise there is aerial.nvim which provides an auto open outline window.

ecogest avatar Mar 26 '22 11:03 ecogest

An example of the on_attach SymbolsOutlineOpen would be good.

hensg avatar Oct 14 '22 13:10 hensg