Coder Social home page Coder Social logo

gabmus / symbols-outline.nvim Goto Github PK

View Code? Open in Web Editor NEW

This project forked from simrat39/symbols-outline.nvim

0.0 2.0 0.0 118 KB

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

License: MIT License

Lua 99.24% Vim Script 0.76%

symbols-outline.nvim's Introduction

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+
  • Properly configured Neovim LSP client

Installation

Using vim-plug

Plug 'simrat39/symbols-outline.nvim'

Configuration

Define a global variable symbols_outline as follows:

Only add stuff that you want to override (even in nested tables), or skip this section entirely if you want to roll with the defaults.

-- init.lua
vim.g.symbols_outline = {
    highlight_hovered_item = true,
    show_guides = true,
    auto_preview = true,
    position = 'right',
    width = 25,
    show_numbers = false,
    show_relative_numbers = false,
    show_symbol_details = true,
    keymaps = {
        close = "<Esc>",
        goto_location = "<Cr>",
        focus_location = "o",
        hover_symbol = "<C-space>",
        rename_symbol = "r",
        code_actions = "a",
    },
    lsp_blacklist = {},
    symbol_blacklist = {},
    symbols = {
        File = {icon = "", hl = "TSURI"},
        Module = {icon = "", hl = "TSNamespace"},
        Namespace = {icon = "", hl = "TSNamespace"},
        Package = {icon = "", hl = "TSNamespace"},
        Class = {icon = "𝓒", hl = "TSType"},
        Method = {icon = "ƒ", hl = "TSMethod"},
        Property = {icon = "", hl = "TSMethod"},
        Field = {icon = "", hl = "TSField"},
        Constructor = {icon = "", hl = "TSConstructor"},
        Enum = {icon = "", hl = "TSType"},
        Interface = {icon = "", hl = "TSType"},
        Function = {icon = "", hl = "TSFunction"},
        Variable = {icon = "", hl = "TSConstant"},
        Constant = {icon = "", hl = "TSConstant"},
        String = {icon = "𝓐", hl = "TSString"},
        Number = {icon = "#", hl = "TSNumber"},
        Boolean = {icon = "", hl = "TSBoolean"},
        Array = {icon = "", hl = "TSConstant"},
        Object = {icon = "⦿", hl = "TSType"},
        Key = {icon = "🔐", hl = "TSType"},
        Null = {icon = "NULL", hl = "TSType"},
        EnumMember = {icon = "", hl = "TSField"},
        Struct = {icon = "𝓢", hl = "TSType"},
        Event = {icon = "🗲", hl = "TSType"},
        Operator = {icon = "+", hl = "TSOperator"},
        TypeParameter = {icon = "𝙏", hl = "TSParameter"}
    }
}
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'
width How big the window is (relative to the current split) int 25
auto_preview Show a preview of the code on hover boolean true
show_numbers Shows numbers with the outline boolean false
show_relative_numbers Shows relative numbers with the outline boolean false
show_symbol_details Shows extra details with the symbols (lsp dependent) boolean true
keymaps Which keys do what table (dictionary) here
symbols Icon and highlight config for symbol icons table (dictionary) scroll up
lsp_blacklist Which lsp clients to ignore table (array) {}
symbol_blacklist Which symbols to ignore (possible values) 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

symbols-outline.nvim's People

Contributors

simrat39 avatar eruizc-dev avatar ovikk13 avatar andersevenrud avatar disrupted avatar krady21 avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.