118 noremap <silent> <leader>a :call vimrc#AutoFmtToggle()<CR> |
118 noremap <silent> <leader>a :call vimrc#AutoFmtToggle()<CR> |
119 |
119 |
120 " Maps that only apply when an LSP is available |
120 " Maps that only apply when an LSP is available |
121 func! s:on_lsp_buffer_enabled() abort |
121 func! s:on_lsp_buffer_enabled() abort |
122 setl omnifunc=lsp#complete |
122 setl omnifunc=lsp#complete |
123 nmap <buffer> <F9> <plug>(lsp-hover) |
123 nmap <buffer> <F9> <plug>(lsp-hover) |
124 nmap <buffer> gd <plug>(lsp-definition) |
124 nmap <buffer> gd <plug>(lsp-definition) |
125 nmap <buffer> ]d <plug>(lsp-next-diagnostic) |
125 nmap <buffer> gr <plug>(lsp-references) |
126 nmap <buffer> [d <plug>(lsp-previous-diagnostic) |
126 nmap <buffer> gt <plug>(lsp-peek-type-definition) |
|
127 nmap <buffer> ]d <plug>(lsp-next-diagnostic) |
|
128 nmap <buffer> [d <plug>(lsp-previous-diagnostic) |
|
129 nmap <buffer> ]r <plug>(lsp-next-reference) |
|
130 nmap <buffer> [r <plug>(lsp-previous-reference) |
|
131 nmap <buffer> <leader>rn <plug>(lsp-rename) |
|
132 nmap <buffer> <leader>gt <plug>(lsp-type-definition) |
127 endfunc |
133 endfunc |
128 |
134 |
129 " Commands & Aliases {{{ |
135 " Commands & Aliases {{{ |
130 command! -nargs=+ CAlias call vimrc#CommandAlias(<f-args>) |
136 command! -nargs=+ CAlias call vimrc#CommandAlias(<f-args>) |
131 |
137 |