aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuangxiong Lin <[email protected]>2021-12-10 15:42:12 +0800
committerGuangxiong Lin <[email protected]>2021-12-10 15:42:12 +0800
commit0df889f59ed31ae242857748c99b4705c76adbb6 (patch)
tree2dc4c5a86fcf6b6db2514f8048427f0050c21216
parent82a18aa5e65a982bab806a823bc714f0d84b6418 (diff)
downloaddotfiles-0df889f59ed31ae242857748c99b4705c76adbb6.tar.gz
dotfiles-0df889f59ed31ae242857748c99b4705c76adbb6.tar.bz2
dotfiles-0df889f59ed31ae242857748c99b4705c76adbb6.zip
Disable ycm diagnostic ui by default
-rw-r--r--.vim/plugin/youcompleteme.vim5
1 files changed, 3 insertions, 2 deletions
diff --git a/.vim/plugin/youcompleteme.vim b/.vim/plugin/youcompleteme.vim
index 2cb461f..424fdbc 100644
--- a/.vim/plugin/youcompleteme.vim
+++ b/.vim/plugin/youcompleteme.vim
@@ -3,9 +3,10 @@ let g:ycm_add_preview_to_completeopt = 0
let g:ycm_collect_identifiers_from_comments_and_strings = 1
let g:ycm_complete_in_strings = 1
-let g:ycm_show_diagnostics_ui = 1
+let g:ycm_show_diagnostics_ui = 0
let g:ycm_error_symbol = 'E>'
let g:ycm_warning_symbol = 'W>'
+autocmd BufNewFile,BufRead *.go let g:ycm_show_diagnostics_ui = 1
let g:ycm_filetype_whilelist = {
\ "c": 1,
@@ -41,5 +42,5 @@ nmap <leader>fs <plug>(YCMFindSymbolInDocument)
nmap <leader>fS <plug>(YCMFindSymbolInWorkspace)
nmap K <plug>(YCMHover)
-autocmd! BufWritePre *.rs,*.go call execute('YcmCompleter Format')
+autocmd BufWritePre *.rs,*.go call execute('YcmCompleter Format')