Skip to content

Latest commit

 

History

History
91 lines (58 loc) · 3.01 KB

README.md

File metadata and controls

91 lines (58 loc) · 3.01 KB

lsp_extensions.nvim

Repo to hold a bunch of info & extension callbacks for built-in LSP. Use at your own risk 😉

Install

Requires Built-in LSP, Neovim Nightly, nvim-lsp

" LSP Extensions
Plug 'nvim-lua/lsp_extensions.nvim'

Inlay Hints (rust-analyzer)

inlay-hints

Inlay hints for the whole file:

nnoremap <Leader>T :lua require'lsp_extensions'.inlay_hints()

Only current line:

nnoremap <Leader>t :lua require'lsp_extensions'.inlay_hints{ only_current_line = true }

Run on showing file or new file in buffer:

autocmd BufEnter,BufWinEnter,TabEnter *.rs :lua require'lsp_extensions'.inlay_hints{}

On cursor hover, get hints for current line:

autocmd CursorHold,CursorHoldI *.rs :lua require'lsp_extensions'.inlay_hints{ only_current_line = true }

Available Options (Showing defaults):

require'lsp_extensions'.inlay_hints{
	highlight = "Comment",
	prefix = " > ",
	aligned = false,
	only_current_line = false
}

Customized

autocmd InsertLeave,BufEnter,BufWinEnter,TabEnter,BufWritePost *.rs :lua require'lsp_extensions'.inlay_hints{ prefix = ' » ', highlight = "NonText" }

Closing Labels (dartls)

closing-labels

Closing Labels Documentation

Check out the example file for setup

Outline (dartls)

Rending in loclist: dart-outline-loclist

Rendering in fzf: dart-outline-fzf

Rendering in telescope: dart-outline-telescope

Outline Documentation

Check out the example file for setup

Clips