vim: Add more languageclient mappings
This commit is contained in:
parent
404f91788c
commit
deb8c82256
|
@ -80,7 +80,17 @@ let g:LanguageClient_serverCommands = {
|
|||
\ 'rust': ['~/.cargo/bin/rustup', 'run', 'stable', 'rls'],
|
||||
\ }
|
||||
|
||||
nnoremap <F5> :call LanguageClient_contextMenu()<CR>
|
||||
function LC_maps()
|
||||
if has_key(g:LanguageClient_serverCommands, &filetype)
|
||||
nnoremap <buffer> <silent> <F5> :call LanguageClient_contextMenu()<CR>
|
||||
nnoremap <buffer> <silent> K :call LanguageClient#textDocument_hover()<CR>
|
||||
nnoremap <buffer> <silent> gd :call LanguageClient#textDocument_definition()<CR>
|
||||
nnoremap <buffer> <silent> <F2> :call LanguageClient#textDocument_rename()<CR>
|
||||
set formatexpr=LanguageClient#textDocument_rangeFormatting_sync()
|
||||
endif
|
||||
endfunction
|
||||
|
||||
autocmd FileType * call LC_maps()
|
||||
|
||||
" Multi-entry selection UI
|
||||
Plug 'junegunn/fzf'
|
||||
|
|
Reference in a new issue