Improved language server client config
This commit is contained in:
parent
00feff296f
commit
2092e78930
2 changed files with 35 additions and 9 deletions
|
@ -1,3 +1,25 @@
|
||||||
|
let g:lsp_highlight_references_enabled = 1
|
||||||
|
highlight lspReference ctermfg=black guifg=black ctermbg=yellow guibg=yellow
|
||||||
|
|
||||||
|
let g:lsp_signs_enabled = 1
|
||||||
|
let g:lsp_diagnostics_echo_cursor = 1
|
||||||
|
let g:lsp_signs_error = {'text': '✗'}
|
||||||
|
let g:lsp_signs_warning = {'text': '‼'}
|
||||||
|
|
||||||
|
noremap <Leader>df :LspDocumentFormat<cr>
|
||||||
|
vnoremap <Leader>df :LspDocumentRangeFormat<cr>
|
||||||
|
noremap <Leader>dr :LspReferences<cr>
|
||||||
|
noremap <F3> :LspDefinition<cr>
|
||||||
|
noremap <Leader>dR :LspRename<cr>
|
||||||
|
noremap <Leader>dh :LspHover<cr>
|
||||||
|
noremap <Leader>ds :LspWorkspaceSymbol<cr>
|
||||||
|
|
||||||
|
"-----------------------------
|
||||||
|
" CONFIGURE VARIOUS SERVERS
|
||||||
|
"-----------------------------
|
||||||
|
|
||||||
|
" Rust
|
||||||
|
if executable('rustup')
|
||||||
au User lsp_setup call lsp#register_server({
|
au User lsp_setup call lsp#register_server({
|
||||||
\ 'name': 'rust' ,
|
\ 'name': 'rust' ,
|
||||||
\ 'cmd' : {server_info->[
|
\ 'cmd' : {server_info->[
|
||||||
|
@ -7,11 +29,13 @@ au User lsp_setup call lsp#register_server({
|
||||||
\ } ,
|
\ } ,
|
||||||
\ 'whitelist' : [ 'rust' ] ,
|
\ 'whitelist' : [ 'rust' ] ,
|
||||||
\ })
|
\ })
|
||||||
|
endif
|
||||||
|
|
||||||
noremap <Leader>df :LspDocumentFormat<cr>
|
" Python (requires pip install python-language-server)
|
||||||
vnoremap <Leader>df :LspDocumentRangeFormat<cr>
|
if executable('pyls')
|
||||||
noremap <Leader>dr :LspReferences<cr>
|
au User lsp_setup call lsp#register_server({
|
||||||
noremap <F3> :LspDefinition<cr>
|
\ 'name': 'pyls',
|
||||||
noremap <Leader>dR :LspRename<cr>
|
\ 'cmd': {server_info->['pyls']},
|
||||||
noremap <Leader>dh :LspHover<cr>
|
\ 'whitelist': ['python'],
|
||||||
noremap <Leader>ds :LspWorkspaceSymbol<cr>
|
\ })
|
||||||
|
endif
|
||||||
|
|
|
@ -1,2 +1,4 @@
|
||||||
|
NeoBundle 'prabirshrestha/asyncomplete.vim'
|
||||||
NeoBundle 'prabirshrestha/async.vim'
|
NeoBundle 'prabirshrestha/async.vim'
|
||||||
NeoBundle 'prabirshrestha/vim-lsp'
|
NeoBundle 'prabirshrestha/vim-lsp'
|
||||||
|
NeoBundle 'prabirshrestha/asyncomplete-lsp.vim'
|
||||||
|
|
Loading…
Reference in a new issue