""" 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 g:LanguageClient_serverCommands = { \ 'rust': ['/usr/bin/rustup', 'run', 'stable', 'rls'], \ 'elixir': ['/usr/lib/elixir-ls/language_server.sh'], \ 'elm': ['/usr/bin/elm-language-server'], \ 'python': ['/usr/bin/pyls'], \ 'go': ['/usr/bin/gopls'], \ 'promql': ['/usr/local/bin/promql-langserver'], \ 'java': ['/usr/bin/java-language-server'], \ 'typescript': ['/usr/bin/typescript-language-server', '--stdio'], \ 'typescriptreact': ['/usr/bin/typescript-language-server', '--stdio'], \ } let g:LanguageClient_rootMarkers = { \ 'elm': ['elm.json'], \ 'typescript': ['package.json'], \ 'typescriptreact': ['package.json'], \ } let g:LanguageClient_hoverPreview = 'always' let g:LanguageClient_loggingFile = expand('~/.vim/LanguageClient.log') function LC_maps() if has_key(g:LanguageClient_serverCommands, &filetype) nnoremap :call LanguageClient_contextMenu() nnoremap K :call LanguageClient#textDocument_hover() nnoremap gdd :call LanguageClient#textDocument_definition() nnoremap gdi :call LanguageClient#textDocument_implementation() nnoremap gdt :call LanguageClient#textDocument_typeDefinition() nnoremap gds :call LanguageClient#textDocument_documentSymbol() nnoremap gdr :call LanguageClient#textDocument_references() nnoremap :call LanguageClient#textDocument_rename() " noremap (lcn-menu) " noremap K (lcn-hover) " noremap gd (lcn-definition) " noremap (lcn-rename) set formatexpr=LanguageClient#textDocument_rangeFormatting_sync() endif endfunction autocmd FileType * call LC_maps()