Emiliano Ruiz Carletti bb73de0e6a Silent mappings
2021-05-26 19:46:47 -03:00
2021-05-26 19:46:47 -03:00
2021-04-27 09:58:07 -03:00
2021-04-21 22:59:41 -07:00
2021-05-05 19:15:49 -07:00

symbols-outline.nvim

A tree like view for symbols in Neovim using the Language Server Protocol. Supports all your favourite languages.

demo

Prerequisites

  • neovim 0.5+ (nightly)
  • Properly configured Neovim LSP client

Installation

Using vim-plug

Plug 'simrat39/symbols-outline.nvim'

Configuration

Define a global variable symbols_outline as follows:

-- init.lua
vim.g.symbols_outline = {
    highlight_hovered_item = true,
    show_guides = true,
    auto_preview = false, -- experimental
    position = 'right',
    keymaps = {
        close = "<Esc>",
        goto_location = "<Cr>",
        focus_location = "o",
        hover_symbol = "<C-space>",
        rename_symbol = "r",
        code_actions = "a",
    },
    lsp_blacklist = {},
}

or

" init.vim
let g:symbols_outline = {
    \ "highlight_hovered_item": v:true,
    \ "show_guides": v:true,
    \ "position": 'right',
    \ "auto_preview": v:false,
    \ "keymaps": {
        \ "close": "<Esc>",
        \ "goto_location": "<Cr>",
        \ "focus_location": "o",
        \ "hover_symbol": "<C-space>",
        \ "rename_symbol": "r",
        \ "code_actions": "a",
    \ },
    \ "lsp_blacklist": [],
\ }
Property Description Type Default
highlight_hovered_item Whether to highlight the currently hovered symbol (high cpu usage) boolean true
show_guides Wether to show outline guides boolean true
position Where to open the split window 'right' or 'left' 'right'
auto_preview Experimenatl, to show a preview of the code on hover boolean true
keymaps Which keys do what table (dictionary) here
lsp_blacklist Which lsp clients to ignore table (array) {}

Commands

Command Description
:SymbolsOutline Toggle symbols outline
:SymbolsOutlineOpen Open symbols outline
:SymbolsOutlineClose Close symbols outline

Default keymaps

Key Action
Escape Close outline
Enter Go to symbol location in code
o Go to symbol location in code without losing focus
Ctrl+Space Hover current symbol
r Rename symbol
a Code actions
Description
Navigate code with an outline sidebar. Forked from symbols-outline.nvim.
Readme MIT 1 MiB
Languages
Lua 100%