vim_config/config/language-client.vim

34 lines
1.1 KiB
VimL
Raw Normal View History

2021-06-11 22:55:32 +02:00
""" 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'],
" \ }
2021-07-21 20:41:08 +02:00
let s:user_dir = has('win32') ? expand('~/vimfiles') : expand('~/.vim')
2021-06-11 22:55:32 +02:00
let g:LanguageClient_serverCommands = {
\ 'rust': ['/usr/bin/rustup', 'run', 'stable', 'rls'],
2021-07-21 20:41:08 +02:00
\ 'elixir': [ s:user_dir . '/pack/vendor/start/vim-elixirls/elixir-ls/release/language_server.sh'],
2021-06-11 22:55:32 +02:00
\ 'elm': ['/usr/bin/elm-language-server'],
\ 'python': ['/usr/bin/pyls'],
\ 'go': ['/usr/bin/gopls'],
\ }
let g:LanguageClient_rootMarkers = {
\ 'elm': ['elm.json'],
2021-07-21 20:41:08 +02:00
\ 'elixir': ['mix.exs'],
2021-06-11 22:55:32 +02:00
\ }
" 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)