|
@ -220,12 +220,16 @@ function! s:on_lsp_buffer_enabled() abort |
|
|
nmap <buffer> [g <plug>(lsp-previous-diagnostic) |
|
|
nmap <buffer> [g <plug>(lsp-previous-diagnostic) |
|
|
nmap <buffer> ]g <plug>(lsp-next-diagnostic) |
|
|
nmap <buffer> ]g <plug>(lsp-next-diagnostic) |
|
|
nmap <buffer> K <plug>(lsp-hover) |
|
|
nmap <buffer> K <plug>(lsp-hover) |
|
|
nnoremap <leader>ft :LspDocumentFormatSync<CR> |
|
|
|
|
|
|
|
|
nnoremap <leader>ft :LspDocumentFormat<CR> |
|
|
|
|
|
|
|
|
let g:lsp_format_sync_timeout = 1000 |
|
|
let g:lsp_format_sync_timeout = 1000 |
|
|
autocmd! BufWritePre *.rs,*.go call execute('LspDocumentFormatSync') |
|
|
|
|
|
endfunction |
|
|
endfunction |
|
|
|
|
|
|
|
|
|
|
|
if exists('*prop_add') && has('patch-9.0.0178') |
|
|
|
|
|
let g:lsp_diagnostics_virtual_text_enabled = 1 |
|
|
|
|
|
let g:lsp_diagnostics_virtual_text_align = "after" |
|
|
|
|
|
endif |
|
|
|
|
|
|
|
|
augroup lsp_install |
|
|
augroup lsp_install |
|
|
au! |
|
|
au! |
|
|
autocmd User lsp_buffer_enabled call s:on_lsp_buffer_enabled() |
|
|
autocmd User lsp_buffer_enabled call s:on_lsp_buffer_enabled() |
|
|