diff --git a/lsp.vimrc b/lsp.vimrc index 1516db1..fcf8725 100644 --- a/lsp.vimrc +++ b/lsp.vimrc @@ -220,12 +220,16 @@ function! s:on_lsp_buffer_enabled() abort nmap [g (lsp-previous-diagnostic) nmap ]g (lsp-next-diagnostic) nmap K (lsp-hover) - nnoremap ft :LspDocumentFormatSync + nnoremap ft :LspDocumentFormat let g:lsp_format_sync_timeout = 1000 - autocmd! BufWritePre *.rs,*.go call execute('LspDocumentFormatSync') 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 au! autocmd User lsp_buffer_enabled call s:on_lsp_buffer_enabled()