aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.vim/plugin/youcompleteme.vim25
1 files changed, 22 insertions, 3 deletions
diff --git a/.vim/plugin/youcompleteme.vim b/.vim/plugin/youcompleteme.vim
index d702738..67eac03 100644
--- a/.vim/plugin/youcompleteme.vim
+++ b/.vim/plugin/youcompleteme.vim
@@ -5,10 +5,29 @@ let g:ycm_collect_identifiers_from_comments_and_strings = 1
let g:ycm_complete_in_strings = 1
let g:ycm_filetype_whilelist = {
- \ "c": 1, "cpp": 1, "sh": 1, "zsh": 1,
- \ "python": 1, "go": 1, "gdscript": 1,
+ \ "c": 1,
+ \ "cpp": 1,
+ \ "go": 1,
+ \ "gdscript": 1,
\ "lua": 1
+ \ "python": 1,
+ \ "sh": 1,
+ \ "vim": 1,
+ \ "zsh": 1,
\ }
+
let g:ycm_filetype_blacklist = {
- \ 'ledger': 1, 'markdown': 1, 'org': 1
+ \ 'ledger': 1,
+ \ 'markdown': 1,
+ \ 'org': 1
\ }
+
+nnoremap gd :YcmCompleter GoTo<CR>
+nnoremap gr :YcmCompleter GoToReferences<CR>
+nnoremap gi :YcmCompleter GoToImplementation<CR>
+nnoremap gt :YcmCompleter GoToType<CR>
+nmap gs <plug>(YCMFindSymbolInDocument)
+nmap gS <plug>(YCMFindSymbolInWorkspace)
+nmap K <plug>(YCMHover)
+
+autocmd! BufWritePre *.rs,*.go call execute('YcmCompleter Format')