]> Sergey Matveev's repositories - dotfiles.git/blob - vim/.vim/plugin/lsp.vim
DTrace filetype
[dotfiles.git] / vim / .vim / plugin / lsp.vim
1 if exists("g:loaded_mein_lsp") | finish | endif
2 let g:loaded_mein_lsp = 1
3 let g:lsp_auto_enable = 1
4
5 let g:lsp_highlight_references_enabled = 1
6 let g:lsp_diagnostics_echo_cursor = 1
7 let g:lsp_diagnostics_echo_delay = -1
8
9 function! s:on_lsp_buffer_enabled() abort
10     setlocal omnifunc=lsp#complete
11     nmap <buffer> [g <Plug>(lsp-previous-diagnostic)
12     nmap <buffer> ]g <Plug>(lsp-next-diagnostic)
13     nmap <buffer> gd <plug>(lsp-definition)
14     nmap <buffer> K <plug>(lsp-hover)
15 endfunction
16
17 augroup lsp_install
18     autocmd!
19     autocmd User lsp_buffer_enabled call s:on_lsp_buffer_enabled()
20 augroup END