let g:lsp_diagnostics_signs_error = {'text': ''} let g:lsp_diagnostics_signs_warning = {'text': ''} let g:lsp_diagnostics_signs_hint = {'text': ''} " let g:lsp_diagnostics_float_cursor = 1 let g:lsp_diagnostics_enabled = 1 function! s:on_lsp_buffer_enabled() abort setlocal signcolumn=yes let g:lsp_diagnostics_signs_enabled = 1 " nmap cd (lsp-definition) nmap cs (lsp-workspace-symbol-search) nmap cn (lsp-rename) nmap c[ (lsp-previous-diagnostic) nmap c] (lsp-next-diagnostic) nmap ck (lsp-hover) nnoremap lsp#scroll(+4) nnoremap lsp#scroll(-4) let g:lsp_format_sync_timeout = 1000 autocmd! BufWritePre *.js,*.ts,*.php call execute('LspDocumentFormatSync') " 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