Repo to hold a bunch of info & extension callbacks for built-in LSP. Use at your own risk 😉
Requires Built-in LSP, Neovim Nightly, nvim-lsp
" LSP Extensions
Plug 'nvim-lua/lsp_extensions.nvim'
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
}
autocmd InsertLeave,BufEnter,BufWinEnter,TabEnter,BufWritePost *.rs :lua require'lsp_extensions'.inlay_hints{ prefix = ' » ', highlight = "NonText" }
Check out the example file for setup
Check out the example file for setup
-
Showing Line Diagnostics: https://clips.twitch.tv/ProductiveBoxyPastaCoolStoryBro
-
This Plugin:
-
N E O V I M: https://clips.twitch.tv/SmoothGoodTurnipCmonBruh