Add more LSP maps

Sat, 24 Apr 2021 21:05:26 -0500

author
Meredith Howard <mhoward@roomag.org>
date
Sat, 24 Apr 2021 21:05:26 -0500
changeset 898
4bcbc5edab74
parent 897
760d4f0ca87b
child 899
2315aad34ca3

Add more LSP maps

.vimrc file | annotate | diff | comparison | revisions
--- a/.vimrc
+++ b/.vimrc
@@ -120,10 +120,16 @@ noremap <silent> <leader>a :call vimrc#A
 " Maps that only apply when an LSP is available
 func! s:on_lsp_buffer_enabled() abort
   setl omnifunc=lsp#complete
-  nmap <buffer> <F9> <plug>(lsp-hover)
-  nmap <buffer> gd   <plug>(lsp-definition)
-  nmap <buffer> ]d   <plug>(lsp-next-diagnostic)
-  nmap <buffer> [d   <plug>(lsp-previous-diagnostic)
+  nmap <buffer> <F9>       <plug>(lsp-hover)
+  nmap <buffer> gd         <plug>(lsp-definition)
+  nmap <buffer> gr         <plug>(lsp-references)
+  nmap <buffer> gt         <plug>(lsp-peek-type-definition)
+  nmap <buffer> ]d         <plug>(lsp-next-diagnostic)
+  nmap <buffer> [d         <plug>(lsp-previous-diagnostic)
+  nmap <buffer> ]r         <plug>(lsp-next-reference)
+  nmap <buffer> [r         <plug>(lsp-previous-reference)
+  nmap <buffer> <leader>rn <plug>(lsp-rename)
+  nmap <buffer> <leader>gt <plug>(lsp-type-definition)
 endfunc
 
 " Commands & Aliases  {{{

mercurial