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 101 forks source link

SymbolsOutlineFocus command is needed #174

Open vitaly opened 2 years ago

vitaly commented 2 years ago

I'd like to be able to get into the symbol outline panel using keyboard.

currently, if it's already open, I need to hit my keymap for SymbolsOutline twice. first time will close it, and second time will open and focus it.

pidgeon777 commented 1 year ago

I second this request. Also:

https://github.com/simrat39/symbols-outline.nvim/issues/207

frogmaster commented 1 year ago

As a workaround, i use something like this.

  keys= {
    {
      "<leader>cs",
      function()
        local symbols = require("symbols-outline")
        symbols.open_outline()
        vim.fn.win_gotoid(symbols.view.winnr)
      end,
      desc = "Symbols Outline",
    }
  }
hedyhli commented 1 year ago

Hi, for the time being (where simrat39 is not very active) I'm maintaining a fork where I've implemented this feature and merged some other PRs -- see the SymbolsOutlineFocus* commands in the readme.

Also note on the fork status in the readme, feel free to try it if you really want this feature but do proceed with caution.