Browse Source

virtual text improvements to lsp

master
Juni Kim 2 years ago
parent
commit
3aed59ff0a
  1. 8
      lsp.vimrc

8
lsp.vimrc

@ -220,12 +220,16 @@ function! s:on_lsp_buffer_enabled() abort
nmap <buffer> [g <plug>(lsp-previous-diagnostic)
nmap <buffer> ]g <plug>(lsp-next-diagnostic)
nmap <buffer> K <plug>(lsp-hover)
nnoremap <leader>ft :LspDocumentFormatSync<CR>
nnoremap <leader>ft :LspDocumentFormat<CR>
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()

Loading…
Cancel
Save