2020-03-19 15:56:18 +00:00
|
|
|
if empty(glob('~/.config/nvim/autoload/plug.vim'))"
|
|
|
|
silent !curl -fLo ~/.config/nvim/autoload/plug.vim --create-dirs
|
|
|
|
\ https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
|
|
|
|
autocmd VimEnter * PlugInstall --sync | source $MYVIMRC
|
|
|
|
endif
|
2020-03-20 14:02:30 +00:00
|
|
|
call plug#begin('~/.config/nvim/bundle')
|
2020-03-19 15:56:18 +00:00
|
|
|
|
2019-09-13 14:27:38 +00:00
|
|
|
" #vim-hexokinase {{{
|
2020-04-07 19:38:42 +00:00
|
|
|
" https://github.com/chrisbra/Colorizer
|
|
|
|
Plug 'chrisbra/Colorizer'
|
|
|
|
" let g:colorizer_use_virtual_text = 1
|
|
|
|
nnoremap <silent> <cr>cc :ColorToggle<CR>
|
2019-09-13 14:27:38 +00:00
|
|
|
|
|
|
|
"}}}
|
|
|
|
|
|
|
|
" #coc.nvim{{{
|
|
|
|
" https://github.com/neoclide/coc.nvim
|
|
|
|
|
|
|
|
" SEE BOTTOM OF VIMRC FOR coc#add_extension statement
|
|
|
|
" for some reason fails when added some other places
|
|
|
|
|
2020-04-09 10:27:47 +00:00
|
|
|
Plug 'neoclide/coc.nvim', {'branch': 'release', 'do': { -> coc#util#install()}}
|
2019-09-13 14:27:38 +00:00
|
|
|
|
|
|
|
let g:coc_snippet_next = '<tab>'
|
|
|
|
let g:coc_snippet_prev = '<s-tab>'
|
|
|
|
|
2019-12-06 11:33:49 +00:00
|
|
|
" inoremap <silent><expr> <c-n> coc#refresh()
|
2020-02-26 12:24:02 +00:00
|
|
|
nnoremap <silent> <silent> <space><space> :call CocAction('doHover')<CR>
|
2019-09-13 14:27:38 +00:00
|
|
|
nnoremap <silent> <space>cf :call CocAction('doQuickfix')<CR>
|
2020-02-26 12:24:02 +00:00
|
|
|
nnoremap <silent> <space>cg :call CocAction('jumpDefinition')<CR>
|
2019-09-13 14:27:38 +00:00
|
|
|
nnoremap <silent> <space>ci :call CocAction('jumpImplementation')<CR>
|
|
|
|
nnoremap <silent> <space>cr :call CocAction('jumpReferences')<CR>
|
|
|
|
nnoremap <silent> <space>cm :call CocAction('rename')<CR>
|
|
|
|
nnoremap <silent> <space>ca :call CocAction('codeAction')<CR>
|
|
|
|
nnoremap <silent> <space>cs :call CocAction('documentSymbols')<CR>
|
|
|
|
nnoremap <silent> <space>cS :call CocAction('workspaceSymbols')<CR>
|
2020-08-14 19:14:52 +00:00
|
|
|
nnoremap <silent> ]c :call CocAction('diagnosticNext')<CR>
|
|
|
|
nnoremap <silent> [c :call CocAction('diagnosticPrevious')<CR>
|
2019-09-13 14:27:38 +00:00
|
|
|
command! -nargs=0 Format :call CocAction('format')
|
|
|
|
command! -nargs=? Fold :call CocAction('fold', <f-args>)
|
|
|
|
|
|
|
|
" }}}
|
|
|
|
" #delimitMate{{{
|
|
|
|
" https://github.com/Raimondi/delimitMate
|
|
|
|
Plug 'Raimondi/delimitMate'
|
|
|
|
let delimitMate_expand_cr = 1
|
|
|
|
let delimitMate_expand_space = 1
|
|
|
|
"}}}
|
|
|
|
" #echodoc.vim{{{
|
|
|
|
" https://github.com/Shougo/echodoc.vim
|
|
|
|
Plug 'Shougo/echodoc.vim'
|
|
|
|
"}}}
|
|
|
|
" #emmet-vim {{{
|
|
|
|
" https://github.com/mattn/emmet-vim
|
|
|
|
Plug 'mattn/emmet-vim'
|
|
|
|
let g:user_emmet_leader_key=',,'
|
|
|
|
let g:user_emmet_settings = {
|
|
|
|
\ 'indentation': ' ',
|
|
|
|
\}
|
|
|
|
|
|
|
|
"}}}
|
|
|
|
" #gitgutter {{{
|
|
|
|
" https://github.com/airblade/vim-gitgutter/blob/master/README.mkd
|
|
|
|
Plug 'airblade/vim-gitgutter'
|
|
|
|
|
2020-04-09 10:27:47 +00:00
|
|
|
nmap ]h <Plug>(GitGutterNextHunk)
|
|
|
|
nmap [h <Plug>(GitGutterPrevHunk)
|
|
|
|
omap ih <Plug>(GitGutterTextObjectInnerPending)
|
|
|
|
omap ah <Plug>(GitGutterTextObjectOuterPending)
|
|
|
|
xmap ih <Plug>(GitGutterTextObjectInnerVisual)
|
|
|
|
xmap ah <Plug>(GitGutterTextObjectOuterVisual)
|
2019-09-13 14:27:38 +00:00
|
|
|
|
|
|
|
"}}}
|
|
|
|
" #MatchTagAlways{{{
|
|
|
|
" https://github.com/Valloric/MatchTagAlways
|
|
|
|
Plug 'Valloric/MatchTagAlways'
|
|
|
|
let g:mta_filetypes = {
|
|
|
|
\ 'jinja' : 1,
|
|
|
|
\ 'html' : 1,
|
|
|
|
\ 'vue' : 1,
|
|
|
|
\ 'xhtml' : 1,
|
|
|
|
\ 'xml' : 1,
|
|
|
|
\}
|
|
|
|
"}}}
|
|
|
|
" #phpcomplete.vim{{{
|
|
|
|
" https://github.com/shawncplus/phpcomplete.vim
|
|
|
|
Plug 'shawncplus/phpcomplete.vim'
|
|
|
|
" https://github.com/dsawardekar/wordpress.vim
|
|
|
|
" For up to date Wordpress Files see:
|
|
|
|
" https://github.com/joseluis/wordpress.vim-generator
|
|
|
|
|
|
|
|
"}}}
|
|
|
|
" #quickscope{{{
|
|
|
|
" https://github.com/unblevable/quick-scope
|
|
|
|
Plug 'unblevable/quick-scope'
|
|
|
|
let g:qs_highlight_on_keys = ['f', 'F', 't', 'T']
|
|
|
|
"}}}
|
|
|
|
" #rainbow{{{
|
|
|
|
" https://github.com/luochen1990/rainbow/blob/master/README.md
|
|
|
|
Plug 'luochen1990/rainbow'
|
|
|
|
let g:rainbow_active = 0
|
|
|
|
nnoremap <cr>9 :RainbowToggle<cr>
|
|
|
|
nnoremap <cr>( :RainbowToggle<cr>
|
|
|
|
"}}}
|
|
|
|
" #switch {{{
|
|
|
|
"https://github.com/AndrewRadev/switch.vim
|
|
|
|
Plug 'AndrewRadev/switch.vim'
|
|
|
|
|
|
|
|
let g:switch_mapping = '<space>-'
|
|
|
|
let g:switch_custom_definitions = [
|
|
|
|
\ ['0', '1'],
|
|
|
|
\ ['ease-in', 'ease-out', 'ease-in-out', 'linear'],
|
|
|
|
\ ['auto', 'none'],
|
|
|
|
\ ['left', 'right'],
|
|
|
|
\ ['top', 'bottom'],
|
|
|
|
\ ['row', 'column'],
|
|
|
|
\ ['relative', 'absolute', 'fixed'],
|
|
|
|
\ ['private', 'public', 'protected']
|
|
|
|
\ ]
|
|
|
|
|
|
|
|
"}}}
|
|
|
|
" #tagbar {{{
|
|
|
|
" Plug 'majutsushi/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'
|
|
|
|
" \ ]
|
|
|
|
" \ }
|
|
|
|
|
|
|
|
"}}}
|
|
|
|
" #ultisnips {{{
|
|
|
|
" https://github.com/sirver/UltiSnips
|
|
|
|
Plug 'SirVer/ultisnips'
|
|
|
|
" and some snippets
|
|
|
|
" https://github.com/honza/vim-snippets
|
|
|
|
" Plug 'honza/vim-snippets'
|
|
|
|
|
|
|
|
nnoremap <space>ul :call ListUltisnips()<cr>
|
|
|
|
inoremap jkul <c-o>:call ListUltisnips()<cr>
|
|
|
|
|
|
|
|
let g:UltiSnipsSnippetsDir='~/.vim/UltiSnips'
|
|
|
|
" Trigger configuration. Do not use <tab> if you use https://github.com/Valloric/YouCompleteMe.
|
|
|
|
let g:UltiSnipsExpandTrigger='<tab>'
|
|
|
|
let g:UltiSnipsJumpForwardTrigger='<tab>'
|
|
|
|
let g:UltiSnipsJumpBackwardTrigger='<s-tab>'
|
|
|
|
let g:UltiSnipsEditSplit='horizontal'
|
|
|
|
|
|
|
|
function! ListUltisnips() abort"{{{
|
|
|
|
let l:snips = UltiSnips#SnippetsInCurrentScope(1)
|
|
|
|
let l:keylist = sort(keys(l:snips))
|
|
|
|
echo ' --------------------------------------------------'
|
|
|
|
for l:key in l:keylist
|
|
|
|
echo printf(" %-10s\t%s", l:key, l:snips[l:key])
|
|
|
|
endfor
|
|
|
|
echo '---------------------------------------------------'
|
|
|
|
endfunction
|
|
|
|
|
|
|
|
"}}}
|
|
|
|
function! CompleteSnippets(findstart, base)"{{{
|
|
|
|
if a:findstart
|
|
|
|
let l:line = getline('.')
|
|
|
|
let l:start = col('.') - 1
|
|
|
|
while l:start > 0 && l:line[l:start - 1] =~ '\a'
|
|
|
|
let l:start -= 1
|
|
|
|
endwhile
|
|
|
|
return l:start
|
|
|
|
else
|
|
|
|
let l:res = []
|
|
|
|
let l:snips = UltiSnips#SnippetsInCurrentScope(1)
|
|
|
|
let l:keylist = sort(keys(l:snips))
|
|
|
|
for l:key in l:keylist
|
|
|
|
if l:key =~ '^' . a:base
|
|
|
|
let l:item = {'word': l:key, 'menu': l:snips[l:key]}
|
|
|
|
call add(l:res, l:item)
|
|
|
|
endif
|
|
|
|
endfor
|
|
|
|
return l:res
|
|
|
|
endif
|
|
|
|
endfunction
|
|
|
|
|
|
|
|
"}}}
|
|
|
|
|
|
|
|
set completefunc=CompleteSnippets
|
|
|
|
|
|
|
|
"}}}
|
|
|
|
" #vim-dispatch{{{
|
|
|
|
" https://github.com/tpope/vim-dispatch
|
|
|
|
Plug 'tpope/vim-dispatch'
|
|
|
|
|
|
|
|
"}}}
|
|
|
|
" #vim-easy-align {{{
|
|
|
|
" https://github.com/junegunn/vim-easy-align
|
|
|
|
Plug 'junegunn/vim-easy-align'
|
|
|
|
|
|
|
|
xmap ga <Plug>(EasyAlign)
|
|
|
|
nmap ga <Plug>(EasyAlign)
|
|
|
|
|
|
|
|
"}}}
|
2020-07-26 14:36:09 +00:00
|
|
|
" #vim-floaterm{{{
|
|
|
|
" https://github.com/voldikss/floaterm
|
|
|
|
Plug 'voldikss/vim-floaterm'
|
|
|
|
nnoremap <space>lf :FloatermNew --height=0.9 --width=0.9 lf<CR>
|
|
|
|
nnoremap <space>lg :FloatermNew --height=0.9 --width=0.9 lazygit<CR>
|
|
|
|
"}}}
|
2019-09-13 14:27:38 +00:00
|
|
|
" #vim-gutentags {{{
|
|
|
|
" https://github.com/ludovicchabant/vim-gutentags
|
2020-03-12 16:10:10 +00:00
|
|
|
" Plug 'ludovicchabant/vim-gutentags'
|
|
|
|
"
|
|
|
|
" let g:gutentags_ctags_tagfile = '.tags'
|
|
|
|
" let g:gutentags_ctags_exclude = ['package.json', 'Session.vim', 'package-lock.json', 'TODO.txt']
|
|
|
|
" let g:gutentags_resolve_symlinks = 1
|
2019-09-13 14:27:38 +00:00
|
|
|
|
|
|
|
"}}}
|
|
|
|
" #vim-Jinja2-Syntax{{{
|
|
|
|
" https://github.com/studio-vx/Vim-Jinja2-Syntax
|
|
|
|
" original: https://github.com/Glench/Vim-Jinja2-Syntax
|
|
|
|
Plug 'studio-vx/Vim-Jinja2-Syntax'
|
|
|
|
|
|
|
|
"}}}
|
2020-08-14 20:18:52 +00:00
|
|
|
" #vim-shellcheck{{{
|
|
|
|
" https://github.com/itspriddle/vim-shellcheck
|
|
|
|
Plug 'itspriddle/vim-shellcheck'
|
|
|
|
|
|
|
|
"}}}
|
|
|
|
|
2019-09-13 14:27:38 +00:00
|
|
|
" #vim-SyntaxRange{{{
|
|
|
|
" https://github.com/inkarkat/vim-SyntaxRange
|
|
|
|
" Plug 'inkarkat/vim-SyntaxRange'
|
|
|
|
" command! HiJinja call SyntaxRange#Include('{{', '}}', 'jinja', 'jinjaBraces', 'jinjaVariable')
|
|
|
|
" command! HiJinja call SyntaxRange#IncludeEx('start=/{{-\?/hs=s+2 end=/-\?}}/he=s-1', 'jinja')
|
|
|
|
"}}}
|
2020-04-26 19:10:37 +00:00
|
|
|
" #vim-Styled-components{{{
|
|
|
|
"https://github.com/styled-components/vim-styled-components
|
|
|
|
Plug 'styled-components/vim-styled-components', { 'branch': 'main' }
|
|
|
|
"}}}
|
2019-09-13 14:27:38 +00:00
|
|
|
" #wordpress.vim{{{
|
|
|
|
" doesn't support universal ctags
|
|
|
|
" #Plug 'dsawardekar/wordpress.vim'
|
|
|
|
" This fork does:
|
|
|
|
" https://github.com/DArcMattr/wordpress.vim/tree/universal-ctags
|
|
|
|
" Using studio-vx fork
|
|
|
|
" Plug 'studio-vx/wordpress.vim', { 'branch': 'universal-ctags' }
|
|
|
|
|
|
|
|
"}}}
|
|
|
|
" #vim-git{{{
|
|
|
|
" https://github.com/tpope/vim-git
|
|
|
|
Plug 'tpope/vim-git'
|
|
|
|
|
|
|
|
"}}}
|
|
|
|
|
2020-03-19 15:56:18 +00:00
|
|
|
" #Netrw {{{
|
|
|
|
|
|
|
|
let g:netrw_liststyle=3
|
2020-03-20 17:31:55 +00:00
|
|
|
let g:netrw_list_hide=netrw_gitignore#Hide()
|
2020-05-03 16:50:45 +00:00
|
|
|
let g:netrw_preview = 0
|
|
|
|
let g:netrw_winsize = 50
|
|
|
|
let g:netrw_altv = &spr
|
|
|
|
let g:netrw_alto = 1
|
2020-03-19 15:56:18 +00:00
|
|
|
let g:netrw_altfile = 1
|
|
|
|
let g:netrw_mousemaps = 0
|
|
|
|
|
|
|
|
"}}}
|
|
|
|
" #Obsession{{{
|
|
|
|
" fork of tpope/vim-obsession
|
|
|
|
Plug 'studio-vx/vim-obsession'
|
|
|
|
|
|
|
|
"}}}
|
|
|
|
" #undotree {{{
|
|
|
|
Plug 'mbbill/undotree'
|
|
|
|
nnoremap <space>ut :UndotreeToggle<cr>
|
|
|
|
|
|
|
|
"}}}
|
|
|
|
" #tcomment_vim{{{
|
|
|
|
" https://github.com/tomtom/tcomment_vim
|
|
|
|
Plug 'tomtom/tcomment_vim'
|
|
|
|
|
|
|
|
"}}}
|
|
|
|
" #vim-fzf {{{
|
|
|
|
" https://github.com/junegunn/fzf.vim
|
2020-03-22 21:03:59 +00:00
|
|
|
Plug 'junegunn/fzf'
|
|
|
|
Plug 'junegunn/fzf.vim'
|
|
|
|
|
|
|
|
nnoremap <space>fg :GFiles<CR>
|
|
|
|
nnoremap <space>ff :Files<CR>
|
2020-09-17 16:40:05 +00:00
|
|
|
nnoremap <space>fh :History<CR>
|
2020-03-22 21:03:59 +00:00
|
|
|
nnoremap <space>ft :Tags<CR>
|
|
|
|
nnoremap <space>fb :Buffers<CR>
|
2020-09-17 16:40:05 +00:00
|
|
|
nnoremap <space>fH :Helptags<CR>
|
2020-03-22 21:03:59 +00:00
|
|
|
|
|
|
|
let g:fzf_preview_window = 'right:60%'
|
|
|
|
let g:fzf_colors =
|
|
|
|
\ { 'fg': ['fg', 'Normal'],
|
|
|
|
\ 'bg': ['bg', 'Normal'],
|
|
|
|
\ 'hl': ['fg', 'Label'],
|
|
|
|
\ 'fg+': ['fg', 'CursorLine', 'CursorColumn', 'Normal'],
|
|
|
|
\ 'bg+': ['bg', 'CursorLine', 'CursorColumn'],
|
|
|
|
\ 'hl+': ['fg', 'WildMenu'],
|
|
|
|
\ 'info': ['fg', 'Comment'],
|
|
|
|
\ 'border': ['fg', 'Ignore'],
|
|
|
|
\ 'prompt': ['fg', 'Constant'],
|
|
|
|
\ 'pointer': ['fg', 'Special'],
|
|
|
|
\ 'marker': ['fg', 'Keyword'],
|
|
|
|
\ 'spinner': ['fg', 'Label'],
|
|
|
|
\ 'header': ['fg', 'Comment'] }
|
2020-03-19 15:56:18 +00:00
|
|
|
|
|
|
|
"}}}
|
|
|
|
" #polyglot{{{
|
|
|
|
" https://github.com/sheerun/vim-polyglot
|
|
|
|
Plug 'sheerun/vim-polyglot'
|
|
|
|
|
|
|
|
" vue options
|
|
|
|
let g:vue_disable_pre_processors=0
|
|
|
|
" set custom syntax highlighting
|
|
|
|
augroup fixhighlighting
|
|
|
|
autocmd!
|
|
|
|
autocmd BufNewFile,BufRead *.vue syntax sync fromstart
|
|
|
|
augroup END
|
|
|
|
"}}}
|
|
|
|
" #vim-markdown{{{
|
|
|
|
" https://github.com/plasticboy/vim-markdown
|
|
|
|
Plug 'plasticboy/vim-markdown'
|
|
|
|
let g:vim_markdown_toc_autofit = 1
|
|
|
|
let g:vim_markdown_fenced_languages = ['bash=sh']
|
|
|
|
"}}}
|
|
|
|
" #vim-repeat{{{
|
|
|
|
" https://github.com/tpope/vim-repeat
|
|
|
|
Plug 'tpope/vim-repeat'
|
|
|
|
|
|
|
|
"}}}
|
|
|
|
" #vim-rsi{{{
|
|
|
|
"https://github.com/tpope/vim-rsi
|
|
|
|
Plug 'tpope/vim-rsi'
|
|
|
|
|
|
|
|
"}}}
|
|
|
|
" #vim-surround{{{
|
|
|
|
Plug 'tpope/vim-surround'
|
|
|
|
|
|
|
|
"}}}
|
|
|
|
" #wakatime{{{
|
|
|
|
" https://wakatime.com/vim
|
|
|
|
Plug 'wakatime/vim-wakatime'
|
|
|
|
|
|
|
|
"}}}
|
|
|
|
|
|
|
|
call plug#end()
|
|
|
|
runtime macros/matchit.vim
|
|
|
|
" TODO - try 'coc-tsserver'
|
2020-08-14 20:18:52 +00:00
|
|
|
call coc#add_extension( 'coc-vetur', 'coc-python', 'coc-phpls', 'coc-json', 'coc-css', 'coc-prettier', 'coc-eslint', 'coc-vimlsp', 'coc-tsserver', 'coc-sh')
|
2019-09-13 14:27:38 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
" vim: set fdm=marker ft=vim:
|