nvimdev

Definition

lspasga

Usage # Invoke by running :Lspsaga peek_definition and :Lspsaga peek_type_definition. Layout is drawer and is currently the only one available. If you want to go to the definition, use :Lspsaga goto_definition and :Lspsaga goto_type_definition. Default Options # Default options in definition section: width = 0.6 defines float window width height = 0.5 defines float window height Default Keymaps # edit = '<C-c>o' vsplit = '<C-c>v' split = '<C-c>i' tabe = '<C-c>t' quit = 'q' close = '<C-c>k' Why the Keymaps Are Not a Single Character? ...

Finder

lspasga

Usage # Finder is an UI to show LSP methods search result. Invoke :Lspsaga finder and you will see the finder window. By default it shows results for references and implementation. Default Options # These are default options in finder section: max_height = 0.5 max_height of the finder window (float layout) left_width = 0.3 Width of the left finder window (float layout) right_width = 0.3 Width of the right finder window (float layout) default = 'ref+imp' Default search results shown, ref for “references” and imp for “implementation” methods = {} Keys are alias of LSP methods. ...

Float Terminal

lspasga

Usage # The command is :Lspsaga term_toggle. Bind a Keymap # vim.keymap.set({'n','t', '<A-d>', '<cmd>Lspsaga term_toggle'})

Hover

lspasga

Usage # Run :Lspsaga hover_doc. If a hover window is opened, then the command would close it. Use :Lspsaga hover_doc ++keep if you want to keep the hover window. It will pin the hover window to the top right of your buffer. Keymap example: vim.keymap.set('n', 'K', '<cmd>Lspsaga hover_doc') Prerequisite # You need to install the Treesitter markdown and markdown_inline parser. If you are not sure if you have them, run :checkhealth. ...

Implement

lspasga

Usage # When buffer has instances of the interface type, Lspsaga will show extra information for it: Support dynamic rendering: Finder Integration # Run :Lspsaga finder imp to search and preview implementation of interfaces. Default Options # Enable the breadcrumbs feature (symbols_in_winbar.enable = true) or this module would not work. Default options in implement section: enable = true enable sign = true show sign in status column virtual_text = true show virtual text at the end of line priority = 100 sign priority

LightBulb

lspasga

Usage # Automatically show lightbulbs when the current line has available code actions. Default Options # enable = true enable sign = true show sign in status column virtual_text = true show virtual text at the end of line debounce = 10 timer debounce sign_priority = 40 sign priority How to Change the Sign # The sign uses ui.code_action (see misc.md): require('lspsaga').setup({ ui = { code_action = 'your icon' } })

Outline

lspasga

Usage # Run :Lspsaga outline. In Float Window # Default Options # Enable the breadcrumbs feature (symbols_in_winbar.enable = true) or this module would not work. Default options of outline section: win_position = 'right' window position win_width = 30 window width auto_preview = true auto preview when cursor moved in outline window detail = true show detail auto_close = true auto close itself when outline window is last window close_after_jump = false close after jump layout = 'normal' float or normal default is normal when is float above options will ignored max_height = 0. ...

Rename

lspasga

Usage # Run :Lspsaga rename. Other than opening the float input window it will also highlight the references in this buffer. Default Options # Default options in rename section: in_select = true Default is true. Whether the name is selected when the float opens In some situation, just like want to change one or less characters, in_select is not so useful. You can tell the Lspsaga to start in normal mode using an extra argument like :Lspsaga lsp_rename mode=n auto_save = false Auto save file when the rename is done project_max_width = 0. ...