aboutsummaryrefslogtreecommitdiff
path: root/.vim/after/plugin/youcompleteme.vim
blob: 6f7a266f375b7c8bbc32ec57c983aecfe771b542 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
let g:ycm_server_log_level = 'info'
let g:ycm_add_preview_to_completeopt = 'popup'
let g:ycm_collect_identifiers_from_comments_and_strings = 1
let g:ycm_complete_in_strings = 1
let g:ycm_auto_hover = ''
let g:ycm_auto_trigger = 1

let g:ycm_show_diagnostics_ui = 0
let g:ycm_error_symbol = 'E>'
let g:ycm_warning_symbol = 'W>'

let g:ycm_filetype_whilelist = {
                        \ "c": 1, 
                        \ "cpp": 1, 
                        \ "go": 1, 
                        \ "gdscript": 1,
                        \ "lua": 1,
                        \ "python": 1, 
                        \ "sh": 1, 
                        \ "vim": 1,
                        \ "zsh": 1
                        \ }

let g:ycm_filetype_blacklist = {
            \ 'tagbar': 1,
            \ 'leaderf': 1,
            \ 'ledger': 1, 
            \ 'markdown': 1, 
            \ 'org': 1,
            \ 'vimwiki': 1,
            \ }

nnoremap gd :YcmCompleter GoTo<CR>
nnoremap gr :YcmCompleter GoToReferences<CR>
nnoremap gi :YcmCompleter GoToImplementation<CR>
nmap <leader>fs <plug>(YCMFindSymbolInDocument)
nmap <leader>fS <plug>(YCMFindSymbolInWorkspace)
nmap K <plug>(YCMHover)

autocmd BufWritePre *.rs,*.go call execute('YcmCompleter Format')