dotfiles/config/automatrop/roles/vim/templates/plugins/languageclient.j2

21 lines
943 B
Django/Jinja

{{ add_source('autozimu/LanguageClient-neovim', { 'branch': 'next', 'do': 'bash install.sh'}) -}}
let g:LanguageClient_serverCommands = {
\ 'python': ['pyls'],
\ 'sh': ['bash-language-server', 'start'],
\ }
let g:LanguageClient_loggingFile = expand('~/.cache/{{ variant }}/LanguageClient.log')
function LC_maps()
if has_key(g:LanguageClient_serverCommands, &filetype)
nnoremap <buffer> <silent> K :call LanguageClient#textDocument_hover()<cr>
nnoremap <buffer> <silent> gd :call LanguageClient#textDocument_definition()<CR>
nnoremap <buffer> <silent> gD :call LanguageClient#textDocument_references()<CR>
nnoremap <buffer> <silent> <F2> :call LanguageClient#textDocument_rename()<CR>
nnoremap <buffer> <silent> <F3> :call LanguageClient#textDocument_formatting()<CR>
set completefunc=LanguageClient#complete
set omnifunc=LanguageClient#complete
endif
endfunction
autocmd FileType * call LC_maps()