2020-09-30 00:50:25 +00:00
|
|
|
set nocompatible
|
|
|
|
filetype off
|
2019-09-26 16:46:38 +00:00
|
|
|
|
|
|
|
set rtp+=~/.vim/bundle/Vundle.vim
|
|
|
|
call vundle#begin()
|
|
|
|
|
|
|
|
Plugin 'VundleVim/Vundle.vim'
|
2022-08-09 23:56:06 +00:00
|
|
|
" --- installed plugins -----------------------------------------------
|
|
|
|
" {{{
|
2019-09-26 16:46:38 +00:00
|
|
|
Plugin 'tpope/vim-surround'
|
2022-08-09 23:56:06 +00:00
|
|
|
Plugin 'tpope/vim-fugitive'
|
2022-08-17 00:42:57 +00:00
|
|
|
Plugin 'scrooloose/nerdtree'
|
2021-08-23 22:36:56 +00:00
|
|
|
Plugin 'fatih/vim-go'
|
2022-08-17 00:42:57 +00:00
|
|
|
Plugin 'w0rp/ale'
|
|
|
|
|
|
|
|
Plugin 'valloric/youcompleteme', {'oninstall': 'python3 install.py --all', 'onupdate': 'python3 install.py --all'}
|
|
|
|
|
|
|
|
Plugin 'rrethy/vim-hexokinase', {'oninstall': 'make hexokinase', 'onupdate': 'make hexokinase'}
|
2022-08-09 23:56:06 +00:00
|
|
|
" }}}
|
|
|
|
" ---------------------------------------------------------------------
|
2020-09-30 00:50:25 +00:00
|
|
|
call vundle#end()
|
|
|
|
filetype plugin indent on
|
2019-09-26 16:46:38 +00:00
|
|
|
|
2022-08-09 23:56:06 +00:00
|
|
|
" --- plugin configuration --------------------------------------------
|
|
|
|
" {{{
|
2020-10-09 22:55:04 +00:00
|
|
|
|
2022-08-09 23:56:06 +00:00
|
|
|
" scrooloose/nerdtree
|
2022-04-20 18:59:45 +00:00
|
|
|
nnoremap <C-o> :NERDTreeToggle %<CR>
|
2019-09-26 16:46:38 +00:00
|
|
|
let g:NERDTreeNodeDelimiter = "\u00a0" " -- Was seeing ^G character, and this should fix that
|
|
|
|
|
2020-10-09 22:55:04 +00:00
|
|
|
|
2022-08-09 23:56:06 +00:00
|
|
|
" Valloric/YouCompleteMe
|
2019-09-26 16:46:38 +00:00
|
|
|
function! ToggleYCM()
|
|
|
|
if g:ycm_auto_trigger
|
|
|
|
let g:ycm_auto_trigger = 0
|
|
|
|
echohl DiffDelete | echo "YouCompleteMe autocompletion disabled" | echohl None
|
|
|
|
else
|
|
|
|
let g:ycm_auto_trigger = 1
|
|
|
|
echohl DiffAdd | echo "YouCompleteMe autocompletion enabled" | echohl None
|
|
|
|
endif
|
|
|
|
endfunction
|
2020-09-30 00:50:25 +00:00
|
|
|
|
2021-08-23 22:36:56 +00:00
|
|
|
let g:ycm_autoclose_preview_window_after_insertion = 1
|
2020-09-30 00:50:25 +00:00
|
|
|
let g:ycm_goto_buffer_command = 'new-tab'
|
|
|
|
|
2020-10-09 22:55:04 +00:00
|
|
|
nnoremap <S-y> :call ToggleYCM()<CR>
|
2020-09-30 00:50:25 +00:00
|
|
|
nnoremap gd :YcmCompleter GoToDefinition<CR>
|
2020-10-09 22:55:04 +00:00
|
|
|
|
|
|
|
|
2022-08-09 23:56:06 +00:00
|
|
|
" w0ryn/ale
|
2019-09-26 16:46:38 +00:00
|
|
|
let g:ale_linters = {
|
2020-04-02 18:39:40 +00:00
|
|
|
\ 'cs' : ['OmniSharp'],
|
2021-08-23 22:36:56 +00:00
|
|
|
\ 'python' : ['pylint'],
|
|
|
|
\ 'go' : ['golint']
|
2019-09-26 16:46:38 +00:00
|
|
|
\}
|
2021-08-23 22:36:56 +00:00
|
|
|
let g:ale_lint_on_text_changed = 0
|
|
|
|
let g:ale_lint_on_insert_leave = 0
|
|
|
|
let g:ale_lint_on_save = 1
|
|
|
|
let g:ale_sign_column_always = 1
|
|
|
|
|
|
|
|
nmap <Leader>ae <Plug>(ale_next)
|
|
|
|
nmap <Leader>ar <Plug>(ale_previous)
|
|
|
|
|
2022-08-09 23:56:06 +00:00
|
|
|
|
|
|
|
" fatih/vim-go
|
2021-08-23 22:36:56 +00:00
|
|
|
let g:go_imports_autosave = 0
|
|
|
|
let g:go_def_mapping_enabled = 0
|
|
|
|
let g:go_fmt_fail_silently = 1
|
|
|
|
let g:go_def_reuse_buffer = 1
|
|
|
|
let g:go_textobj_enabled = 0
|
2022-08-09 23:56:06 +00:00
|
|
|
|
|
|
|
" }}}
|
|
|
|
" ---------------------------------------------------------------------
|