Use vim-lsp
This commit is contained in:
@@ -178,9 +178,39 @@ autocmd VimEnter * if argc() == 1 && isdirectory(argv()[0]) && !exists("s:std_in
|
||||
let g:EditorConfig_max_line_indicator = 'none'
|
||||
" let g:EditorConfig_preserve_formatoptions = 1
|
||||
|
||||
|
||||
" vim current word
|
||||
let g:vim_current_word#highlight_current_word = 0
|
||||
hi default link CurrentWordTwins CursorColumn
|
||||
|
||||
|
||||
" vista
|
||||
let g:vista#renderer#enable_icon = 0
|
||||
|
||||
|
||||
" vim-lsp
|
||||
function! s:on_lsp_buffer_enabled() abort
|
||||
setlocal omnifunc=lsp#complete
|
||||
setlocal signcolumn=yes
|
||||
if exists('+tagfunc') | setlocal tagfunc=lsp#tagfunc | endif
|
||||
nmap <buffer> gd <plug>(lsp-definition)
|
||||
nmap <buffer> gr <plug>(lsp-references)
|
||||
nmap <buffer> gi <plug>(lsp-implementation)
|
||||
nmap <buffer> gt <plug>(lsp-type-definition)
|
||||
nmap <buffer> <leader>rn <plug>(lsp-rename)
|
||||
nmap <buffer> [g <Plug>(lsp-previous-diagnostic)
|
||||
nmap <buffer> ]g <Plug>(lsp-next-diagnostic)
|
||||
nmap <buffer> K <plug>(lsp-hover)
|
||||
|
||||
" refer to doc to add more commands
|
||||
endfunction
|
||||
|
||||
augroup lsp_install
|
||||
au!
|
||||
" call s:on_lsp_buffer_enabled only for languages that has the server registered.
|
||||
autocmd User lsp_buffer_enabled call s:on_lsp_buffer_enabled()
|
||||
augroup END
|
||||
|
||||
let g:lsp_auto_enable = 0
|
||||
|
||||
command -nargs=0 LspStart call lsp#activate()
|
||||
|
||||
Reference in New Issue
Block a user