vim/vimrc.plugins.vim

417 lines
9.4 KiB
VimL

" #plugins{{{
set runtimepath+=~/.vim/bundle/Vundle.vim
call vundle#begin()
Plugin 'VundleVim/Vundle.vim'
"
"css3-syntax
Plugin 'hail2u/vim-css3-syntax.git'
"
"scss-syntax
Plugin 'cakebaker/scss-syntax.vim'
"
"tagbar
Plugin 'majutsushi/tagbar'
"
"vim-surround
Plugin 'tpope/vim-surround'
"
"undotree
Plugin 'mbbill/undotree'
"
" Ctrlp
Plugin 'ctrlpvim/ctrlp.vim'
"
" Obsession
Plugin 'tpope/vim-obsession'
"
" vim-css-color
" Plugin 'ap/vim-css-color'
" vim-javascript
Plugin 'pangloss/vim-javascript'
"
" ultisnips
" https://github.com/sirver/UltiSnips
Plugin 'SirVer/ultisnips'
" and some snippets
" https://github.com/honza/vim-snippets
Plugin 'honza/vim-snippets'
"
" ALE
" https://github.com/w0rp/ale
Plugin 'w0rp/ale'
"
" MatchTag
" https://github.com/gregsexton/MatchTag
Plugin 'gregsexton/MatchTag'
"
" phpcomplete.vim
" https://github.com/shawncplus/phpcomplete.vim
Plugin 'shawncplus/phpcomplete.vim'
" https://github.com/dsawardekar/wordpress.vim
" For up to date Wordpress Files see:
" https://github.com/joseluis/wordpress.vim-generator
"
"Plugin 'dsawardekar/wordpress.vim'
" disabled - doesn't support universal ctags?
" vim-vue
" https://github.com/posva/vim-vue
Plugin 'posva/vim-vue'
"
" vim-commentary
" https://github.com/tpope/vim-commentary
Plugin 'tpope/vim-commentary'
"
" vim-repeat
" https://github.com/tpope/vim-repeat
Plugin 'tpope/vim-repeat'
"
" https://github.com/mattn/emmet-vim
Plugin 'mattn/emmet-vim'
"
" vimwiki
" https://github.com/vimwiki/vimwiki
Plugin 'vimwiki/vimwiki'
"
" gitgutter
" https://github.com/airblade/vim-gitgutter/blob/master/README.mkd
Plugin 'airblade/vim-gitgutter'
"
" vim-gutentags
" https://github.com/ludovicchabant/vim-gutentags
Plugin 'ludovicchabant/vim-gutentags'
"
" vim-qlist
" https://github.com/romainl/vim-qlist/
" Plugin 'romainl/vim-qlist'
" PLugin takac/vim-hardtime
" https://bluz71.github.io/2017/05/15/vim-tips-tricks.html
Plugin 'takac/vim-hardtime'
" fugitive-vim
" https://github.com/tpope/vim-fugitive/blob/master/README.markdown
Plugin 'tpope/vim-fugitive'
" vim-dispatch
" https://github.com/tpope/vim-dispatch
Plugin 'tpope/vim-dispatch'
" colorV
" https://github.com/gu-fan/colorv.vim
Plugin 'gu-fan/colorv.vim'
" vim switch
"https://github.com/AndrewRadev/switch.vim
Plugin 'AndrewRadev/switch.vim'
" gitv
" https://github.com/gregsexton/gitv
Plugin 'gregsexton/gitv'
" wakarime
" https://wakatime.com/vim
Plugin 'wakatime/vim-wakatime'
" asyncomplerte.vim
" https://github.com/prabirshrestha/asyncomplete.vim
Plugin 'prabirshrestha/asyncomplete.vim'
Plugin 'yami-beta/asyncomplete-omni.vim'
Plugin 'prabirshrestha/asyncomplete-ultisnips.vim'
Plugin 'prabirshrestha/asyncomplete-file.vim'
Plugin 'prabirshrestha/asyncomplete-buffer.vim'
Plugin 'prabirshrestha/asyncomplete-tags.vim'
Plugin 'prabirshrestha/asyncomplete-lsp.vim'
Plugin 'Shougo/neco-vim'
Plugin 'prabirshrestha/asyncomplete-necovim.vim'
" vim-lsp
" https://github.com/prabirshrestha/vim-lsp
Plugin 'prabirshrestha/async.vim'
Plugin 'prabirshrestha/vim-lsp'
" typewriter
" https://github.com/logico-dev/typewriter/blob/master/README.md
Plugin 'logico-dev/typewriter'
" All of your Plugins must be added before the following line
call vundle#end() " required
filetype plugin indent on " required
" just a test
"}}}
" #plugin settings{{{
" asyncomplete.vim
"{{{
let g:asyncomplete_auto_popup = 1
let g:asyncomplete_remove_duplicates = 1
" not working why?
let g:asyncomplete_min_chars = 3
augroup User asyncomplete_setup
autocmd!
autocmd! CompleteDone * if pumvisible() == 0 | pclose | endif
augroup END
call asyncomplete#register_source(asyncomplete#sources#file#get_source_options({
\ 'name': 'file',
\ 'whitelist': ['*'],
\ 'priority': -20,
\ 'completor': function('asyncomplete#sources#file#completor')
\ }))
call asyncomplete#register_source(asyncomplete#sources#ultisnips#get_source_options({
\ 'name': 'ultisnips',
\ 'whitelist': ['*'],
\ 'priority': -30,
\ 'completor': function('asyncomplete#sources#ultisnips#completor'),
\ }))
call asyncomplete#register_source(asyncomplete#sources#necovim#get_source_options({
\ 'name': 'necovim',
\ 'whitelist': ['vim'],
\ 'priority': -40,
\ 'completor': function('asyncomplete#sources#necovim#completor'),
\ }))
call asyncomplete#register_source(asyncomplete#sources#buffer#get_source_options({
\ 'name': 'buffer',
\ 'whitelist': ['*'],
\ 'blacklist': ['go'],
\ 'priority': -50,
\ 'completor': function('asyncomplete#sources#buffer#completor'),
\ }))
call asyncomplete#register_source(asyncomplete#sources#omni#get_source_options({
\ 'name': 'omni',
\ 'whitelist': ['*'],
\ 'blacklist': ['c', 'cpp', 'html', 'python'],
\ 'priority': -60,
\ 'completor': function('asyncomplete#sources#omni#completor')
\ }))
call asyncomplete#register_source(asyncomplete#sources#tags#get_source_options({
\ 'name': 'tags',
\ 'whitelist': ['*'],
\ 'blacklist': ['vim', 'python'],
\ 'priority': -70,
\ 'completor': function('asyncomplete#sources#tags#completor'),
\ 'config': {
\ 'max_file_size': 50000000,
\ },
\ }))
"}}}
" vim-lsp
"{{{
augroup User lsp_setup
autocmd!
if executable('vls')
autocmd User lsp_setup call lsp#register_server({
\ 'name': 'vue',
\ 'cmd': {server_info->['vls']},
\ 'whitelist': ['vue'],
\ })
endif
if executable('pyls')
autocmd User lsp_setup call lsp#register_server({
\ 'name': 'pyls',
\ 'cmd': {server_info->['pyls']},
\ 'whitelist': ['python'],
\ })
endif
augroup END
"}}}
" switch.vim
"{{{
let g:switch_mapping = '<space>-'
let g:switch_custom_definitions = [
\ ['0', '1'],
\ ['ease-in', 'ease-out'],
\ ['auto', 'none']
\ ]
"}}}
" vim-hardtime
"{{{
let g:hardtime_default_on = 1
let g:hardtime_showmsg = 1
let g:hardtime_ignore_quickfix = 1
let g:hardtime_allow_different_key = 0
let g:hardtime_maxcount = 3
let g:hardtime_ignore_buffer_patterns = ['TagBar', 'gitv']
"}}}
" gitgutter
"{{{
nmap ]h <Plug>GitGutterNextHunk
nmap [h <Plug>GitGutterPrevHunk
omap ih <Plug>GitGutterTextObjectInnerPending
omap ah <Plug>GitGutterTextObjectOuterPending
xmap ih <Plug>GitGutterTextObjectInnerVisual
xmap ah <Plug>GitGutterTextObjectOuterVisual
"}}}
" Use the silver searcher ag command instead of grep
"{{{
if executable('ag')
" Use ag over grep
set grepprg=ag\ --nogroup\ --nocolor
" Use ag in CtrlP for listing files. Lightning fast and respects .gitignore
let g:ctrlp_user_command = 'ag %s -l --nocolor -g ""'
" ag is fast enough that CtrlP doesn't need to cache
let g:ctrlp_use_caching = 0
endif
"vim-wiki
let g:vimwiki_list = [{'path': '~/vimwiki/', 'path_html': '~/vimwiki_html/'}]
" emmet
let g:user_emmet_leader_key=',,'
let g:user_emmet_settings = {
\ 'indentation': ' ',
\ 'html': {
\ 'indentation': ' ',
\ }
\}
"}}}
" vue-vim
"{{{
" disable preprocessor checking for vue files - increases speed
let g:vue_disable_pre_processors=0
" set custom syntax highlighting
augroup fixhighlighting
autocmd!
autocmd BufNewFile,BufRead *.vue syntax sync fromstart
augroup END
"}}}
" ALE
"{{{
nnoremap <space>ne :lnext<cr>
nnoremap <space>pe :lprev<cr>
let g:ale_sign_error = '>>'
let g:ale_sign_warning = '--'
let g:ale_sign_column_always = 1
let g:ale_linters = {'scss': ['stylelint'], 'javascript': ['eslint'], 'php':['php'], 'html':['htmlhint']}
let g:ale_html_htmlhint_options = '-c ~/.htmlhintrc --format=unix'
let g:ale_fixers = {'javascript': ['eslint']}
"}}}
" ultisnips
"{{{
let g:UltiSnipsSnippetsDir='~/.vim/UltiSnips'
" Trigger configuration. Do not use <tab> if you use https://github.com/Valloric/YouCompleteMe.
let g:UltiSnipsExpandTrigger='<c-j>'
let g:UltiSnipsJumpForwardTrigger='<c-b>'
let g:UltiSnipsJumpBackwardTrigger='<c-z>'
let g:UltiSnipsEditSplit='horizontal'
"}}}
" Netrw
"{{{
let g:netrw_liststyle=3
let g:netrw_list_hide='^\..*'
let g:netrw_preview = 0
"}}}
" undotree
"{{{
nnoremap <space>ut :UndotreeToggle<cr>
"}}}
" TagBar
"{{{
nnoremap <space>tb :TagbarOpen fj<CR>
nnoremap <space>] :tag /[.#@]<c-r>=expand('<cword>')<cr><cr>
let g:tagbar_autoclose = 1
" let g:tagbar_autopreview = 1
" let g:tagbar_previewwin_pos = ''
let g:tagbar_type_css = {
\ 'ctagstype' : 'css',
\ 'kinds' : [
\ 'c:classes',
\ 'i:ids',
\ 't:tags',
\ 'm:medias'
\ ]
\}
let g:tagbar_type_scss = {
\ 'ctagstype' : 'scss',
\ 'kinds' : [
\ 'v:variables',
\ 'c:classes',
\ 'i:ids',
\ 't:tags',
\ 'd:medias',
\ 'm:mixins',
\ 'f:functions'
\ ]
\}
let g:tagbar_type_vue = {
\ 'ctagstype' : 'vue',
\ 'kinds' : [
\ 'o:objects',
\ 'f:functions',
\ 'a:array',
\ 's:string',
\ 'b:boolean',
\ 'n:number',
\ 'v:variable'
\ ]
\ }
"}}}
" gutentags
"{{{
let g:gutentags_ctags_tagfile = '.tags'
let g:gutentags_ctags_exclude = ['package.json', 'Session.vim', 'package-lock.json', 'TODO.txt']
"}}}
" colorV
"{{{
let g:colorv_no_global_map = 1
let g:colorv_win_pos = 'top'
let g:colorv_preview_area = 0
nnoremap <space>cv :ColorV<CR>
nnoremap <space>ce :ColorVEdit<CR>
nnoremap <space>cc :call ToggleColorPreview()<CR>
nnoremap <space>ci :ColorVInsert<CR>
nnoremap <space>cp :ColorVPicker<CR>
function! ToggleColorPreview() abort
if !exists('w:colorv_is_previewing')
let w:colorv_is_previewing = 0
endif
if w:colorv_is_previewing == 0
execute 'ColorVPreview'
let w:colorv_is_previewing = 1
else
execute 'ColorVClear'
let w:colorv_is_previewing = 0
endif
endfunction
"}}}
"}}}
" vim: foldmethod=marker