2019-04-20 10:56:33 +00:00
|
|
|
|
" #vim-hexokinase {{{
|
|
|
|
|
" https://github.com/RRethy/vim-hexokinase
|
|
|
|
|
Plug 'RRethy/vim-hexokinase'
|
|
|
|
|
let g:Hexokinase_highlighters = ['virtual']
|
|
|
|
|
let g:Hexokinase_virtualText = '██████'
|
2019-04-28 21:02:34 +00:00
|
|
|
|
nnoremap <silent> <cr>cc :HexokinaseToggle<CR>
|
|
|
|
|
nnoremap <silent> <cr>cr :HexokinaseRefresh<CR>
|
2019-04-20 10:56:33 +00:00
|
|
|
|
|
|
|
|
|
"}}}
|
|
|
|
|
|
|
|
|
|
" #ALE {{{
|
|
|
|
|
" https://github.com/w0rp/ale
|
|
|
|
|
|
|
|
|
|
Plug 'w0rp/ale'
|
|
|
|
|
" let g:ale_completion_enabled = 1
|
|
|
|
|
|
|
|
|
|
let g:ale_disable_lsp = 1
|
|
|
|
|
let g:ale_sign_column_always = 1
|
|
|
|
|
let g:ale_open_list = 0
|
|
|
|
|
let g:ale_fix_on_save = 1
|
|
|
|
|
let g:ale_fix_on_save_ignore = { 'vue': ['eslint'] }
|
|
|
|
|
|
2019-06-16 10:38:43 +00:00
|
|
|
|
let g:ale_linters = {'scss': [], 'javascript': ['eslint'], 'json': ['jsonlint'], 'php':['php'], 'python': [], 'html':['htmlhint'], 'vue': []}
|
2019-06-04 15:00:26 +00:00
|
|
|
|
let g:ale_fixers = {'scss': ['prettier'], 'javascript': ['eslint'], 'json': ['jq'], 'python': [], 'vue': []}
|
2019-04-20 10:56:33 +00:00
|
|
|
|
|
|
|
|
|
let g:ale_html_htmlhint_options = '-c ~/.htmlhintrc --format=unix'
|
|
|
|
|
|
|
|
|
|
let g:ale_python_pyls_config = {
|
|
|
|
|
\ 'pyls': {
|
|
|
|
|
\ 'pycodestyle': { 'enabled': v:false },
|
|
|
|
|
\ 'configurationSources': ['flake8']
|
|
|
|
|
\ }
|
|
|
|
|
\ }
|
|
|
|
|
|
|
|
|
|
let g:ale_sign_error = 'Α'
|
|
|
|
|
let g:ale_sign_warning = 'α'
|
|
|
|
|
|
2019-04-20 11:41:47 +00:00
|
|
|
|
nmap gh <Plug>(ale_hover)
|
2019-04-22 18:26:32 +00:00
|
|
|
|
nmap <space>aa <Plug>(ale_detail)
|
|
|
|
|
nmap <space>af <Plug>(ale_fix)
|
|
|
|
|
nmap <space>ar <Plug>(ale_find_references)
|
|
|
|
|
nmap <space>ad <Plug>(ale_go_to_definition)
|
|
|
|
|
nmap <space>aD <Plug>(ale_documentation)
|
|
|
|
|
nmap <space>an <Plug>(ale_next)
|
|
|
|
|
nmap <space>ap <Plug>(ale_previous)
|
2019-04-20 10:56:33 +00:00
|
|
|
|
|
|
|
|
|
"}}}
|
|
|
|
|
" #coc.nvim{{{
|
|
|
|
|
" https://github.com/neoclide/coc.nvim
|
|
|
|
|
|
2019-07-30 11:35:17 +00:00
|
|
|
|
" installed extensions:
|
|
|
|
|
" coc-vetur
|
|
|
|
|
" coc-python
|
|
|
|
|
" coc-phpls
|
|
|
|
|
" coc-json
|
|
|
|
|
" coc-css
|
|
|
|
|
" coc-eslint
|
|
|
|
|
|
2019-04-20 10:56:33 +00:00
|
|
|
|
Plug 'neoclide/coc.nvim', {'tag': '*', 'do': { -> coc#util#install()}}
|
|
|
|
|
|
|
|
|
|
let g:coc_snippet_next = '<tab>'
|
|
|
|
|
let g:coc_snippet_prev = '<s-tab>'
|
|
|
|
|
|
|
|
|
|
inoremap <silent><expr> <c-n> coc#refresh()
|
2019-04-20 11:41:47 +00:00
|
|
|
|
nnoremap <silent> <silent> gH :call CocAction('doHover')<CR>
|
|
|
|
|
nnoremap <silent> <space>cf :call CocAction('doQuickfix')<CR>
|
|
|
|
|
nnoremap <silent> <space>cd :call CocAction('jumpDefinition')<CR>
|
|
|
|
|
nnoremap <silent> <space>ci :call CocAction('jumpImplementation')<CR>
|
|
|
|
|
nnoremap <silent> <space>cr :call CocAction('jumpReferences')<CR>
|
2019-04-22 18:26:32 +00:00
|
|
|
|
nnoremap <silent> <space>cm :call CocAction('rename')<CR>
|
2019-04-20 11:41:47 +00:00
|
|
|
|
nnoremap <silent> <space>ca :call CocAction('codeAction')<CR>
|
2019-04-22 18:26:32 +00:00
|
|
|
|
nnoremap <silent> <space>cs :call CocAction('documentSymbols')<CR>
|
|
|
|
|
nnoremap <silent> <space>cS :call CocAction('workspaceSymbols')<CR>
|
|
|
|
|
nnoremap <silent> <space>cn :call CocAction('diagnosticNext')<CR>
|
|
|
|
|
nnoremap <silent> <space>cp :call CocAction('diagnosticPrevious')<CR>
|
2019-04-20 10:56:33 +00:00
|
|
|
|
" vnoremap \f <Plug>(coc-format-selected)
|
|
|
|
|
" nnoremap \f <Plug>(coc-format-selected)
|
|
|
|
|
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': ' ',
|
|
|
|
|
\}
|
|
|
|
|
|
|
|
|
|
"}}}
|
|
|
|
|
" #vim-fugitive{{{
|
|
|
|
|
" https://github.com/tpope/vim-fugitive/blob/master/README.markdown
|
|
|
|
|
Plug 'tpope/vim-fugitive'
|
|
|
|
|
nnoremap <silent> <space>gs :Gstatus<CR>
|
|
|
|
|
nnoremap <silent> <space>gd :tabedit %<CR>:Gdiff<CR>
|
|
|
|
|
nnoremap <silent> <space>gc :Gcommit<CR>
|
|
|
|
|
nnoremap <silent> <space>gl :Glog<CR>
|
|
|
|
|
nnoremap <silent> <space>gp :Gpush<CR>:copen<CR>
|
|
|
|
|
nnoremap <silent> <space>gp :Gpushjob<CR>:copen<CR>
|
|
|
|
|
|
|
|
|
|
"}}}
|
|
|
|
|
" #gitgutter {{{
|
|
|
|
|
" https://github.com/airblade/vim-gitgutter/blob/master/README.mkd
|
|
|
|
|
Plug 'airblade/vim-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
|
|
|
|
|
|
|
|
|
|
"}}}
|
|
|
|
|
" #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
|
|
|
|
|
|
|
|
|
|
"}}}
|
2019-04-28 20:01:00 +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
|
|
|
|
|
"}}}
|
2019-04-20 10:56:33 +00:00
|
|
|
|
" #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
|
2019-04-28 21:02:34 +00:00
|
|
|
|
nnoremap <cr>9 :RainbowToggle<cr>
|
|
|
|
|
nnoremap <cr>( :RainbowToggle<cr>
|
2019-04-20 10:56:33 +00:00
|
|
|
|
"}}}
|
|
|
|
|
" #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-gutentags {{{
|
|
|
|
|
" https://github.com/ludovicchabant/vim-gutentags
|
|
|
|
|
Plug 'ludovicchabant/vim-gutentags'
|
|
|
|
|
|
|
|
|
|
let g:gutentags_ctags_tagfile = '.tags'
|
|
|
|
|
let g:gutentags_ctags_exclude = ['package.json', 'Session.vim', 'package-lock.json', 'TODO.txt']
|
2019-06-16 10:38:43 +00:00
|
|
|
|
let g:gutentags_resolve_symlinks = 1
|
2019-04-20 10:56:33 +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'
|
|
|
|
|
|
|
|
|
|
"}}}
|
|
|
|
|
" #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')
|
|
|
|
|
"}}}
|
|
|
|
|
" #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'
|
|
|
|
|
|
|
|
|
|
"}}}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
" vim: set fdm=marker ft=vim:
|