vim_config/config/language-client.vim
2021-07-21 20:50:56 +02:00

34 lines
1.1 KiB
VimL

""" LanguageClient
" Required for operations modifying multiple buffers like rename.
set hidden
" let g:LanguageClient_serverCommands = {
" \ 'javascript': ['/usr/local/bin/javascript-typescript-stdio'],
" \ 'javascript.jsx': ['tcp://127.0.0.1:2089'],
" \ 'python': ['/usr/local/bin/pyls'],
" \ 'ruby': ['~/.rbenv/shims/solargraph', 'stdio'],
" \ }
let s:user_dir = has('win32') ? expand('~/vimfiles') : expand('~/.vim')
let g:LanguageClient_serverCommands = {
\ 'rust': ['/usr/bin/rustup', 'run', 'stable', 'rls'],
\ 'elixir': [ s:user_dir . '/pack/vendor/start/vim-elixirls/elixir-ls/release/language_server.sh'],
\ 'elm': ['/usr/bin/elm-language-server'],
\ 'python': ['/usr/bin/pyls'],
\ 'go': ['/usr/bin/gopls'],
\ }
let g:LanguageClient_rootMarkers = {
\ 'elm': ['elm.json'],
\ 'elixir': ['mix.exs'],
\ }
" note that if you are using Plug mapping you should not use `noremap` mappings.
nmap <F5> <Plug>(lcn-menu)
" Or map each action separately
nmap <silent>K <Plug>(lcn-hover)
nmap <silent> gd <Plug>(lcn-definition)
nmap <silent> <F2> <Plug>(lcn-rename)