added some more lsp related keybindings

This commit is contained in:
Daniel Knüttel 2021-09-20 18:25:13 +02:00
parent 252e1abfe8
commit 802200f3f7

View File

@ -172,7 +172,14 @@ highlight LspDiagnosticsDefaultWarning guifg=BrightYellow
" This allows to jump to the definition, and
" show some documentation respectively.
nnoremap <silent> gd <cmd>lua vim.lsp.buf.definition()<CR>
nnoremap <silent> gD <cmd>lua vim.lsp.buf.declaration()<CR>
nnoremap <silent> gh <cmd>lua vim.lsp.buf.hover()<CR>
nnoremap <silent> gi <cmd>lua vim.lsp.buf.implementation()<CR>
nnoremap <silent> <leader>ca <cmd>lua vim.lsp.buf.code_action()<CR>
nnoremap <silent> <leader>rn <cmd>lua vim.lsp.buf.rename()<CR>
nnoremap <silent> [d <cmd>lua vim.lsp.diagnostic.goto_prev()<CR>
nnoremap <silent> ]d <cmd>lua vim.lsp.diagnostic.goto_next()<CR>
" This part sets up lsp diagnostics.
lua << EOF