This commit is contained in:
ManjaroOne666 2018-11-18 22:07:16 +00:00
parent 309ff8f53b
commit 45dd713f71
3 changed files with 425 additions and 403 deletions

6
vim/coc-settings.json Normal file
View File

@ -0,0 +1,6 @@
{
"coc.preferences.triggerAfterInsertEnter": true,
"coc.preferences.autoTrigger": "always",
"coc.preferences.timeout": 200
}

View File

@ -200,7 +200,7 @@
[ "Boolean", "String" ], [ "Boolean", "String" ],
[ "Float", "String" ], [ "Float", "String" ],
[ "Folded", "NONE", fg_strong3, "NONE" ], [ "Folded", "NONE", fg_strong3, "bold" ],
[ "Statement", "NONE", fg, "NONE" ], [ "Statement", "NONE", fg, "NONE" ],
[ "Conditional", "NONE", fg_strong3, "bold" ], [ "Conditional", "NONE", fg_strong3, "bold" ],
@ -213,21 +213,22 @@
[ "PreProc", "NONE", fg_weak1, "bold" ], [ "PreProc", "NONE", fg_weak1, "bold" ],
[ "Include", "NONE", fg_weak1, "NONE" ], [ "Include", "NONE", fg_weak1, "NONE" ],
[ "Comment", "NONE", fg_comment, "italic" ], [ "Comment", "NONE", fg_comment, "bold,italic" ],
[ "SpecialComment", "NONE", fg_strong1, "italic"], [ "SpecialComment", "NONE", fg_strong1, "italic"],
[ "Todo", "NONE", fg_strong2, "italic" ], [ "Todo", "NONE", fg_strong2, "italic" ],
[ "Ignore", "NONE", bg, "NONE" ], [ "Ignore", "NONE", bg, "NONE" ],
[ "Conceal", "NONE", "NONE", "NONE" ],
[ "Error", "NONE", fg_error, "bold" ], [ "Error", "NONE", fg_error, "bold" ],
[ "Underlined", "NONE", "NONE", "underline" ], [ "Underlined", "NONE", "NONE", "underline" ],
[ "StatusLine", ui_bg, ui_fg_strong3, "NONE" ], [ "StatusLine", ui_bg, ui_fg_strong3, "italic" ],
[ "StatusLineNC", ui_bg, ui_fg, "NONE" ], [ "StatusLineNC", ui_bg, ui_fg, "italic" ],
[ "TabLine", ui_bg, ui_fg, "NONE" ], [ "TabLine", ui_bg, ui_fg, "italic" ],
[ "TabLineFill", ui_bg, ui_bg, "NONE" ], [ "TabLineFill", ui_bg, ui_bg, "italic" ],
[ "TabLineSel", ui_bg, ui_fg_strong3, "NONE" ], [ "TabLineSel", ui_bg, ui_fg_strong3, "italic" ],
[ "VertSplit", bg, ui_bg, "NONE" ], [ "VertSplit", bg, ui_bg, "NONE" ],
[ "FoldColumn", bg, fg_weak1, "NONE" ], [ "FoldColumn", bg, fg_weak1, "NONE" ],
@ -235,7 +236,7 @@
[ "SignColumn", bg, ui_fg_strong3, "NONE" ], [ "SignColumn", bg, ui_fg_strong3, "NONE" ],
[ "CursorLine", bg_cursorline, "NONE", "NONE" ], [ "CursorLine", bg_cursorline, "NONE", "NONE" ],
[ "Title", "NONE", fg_strong4, "bold" ], [ "Title", "NONE", fg_strong4, "bold,italic" ],
[ "LineNr", bg, ui_linenr, "NONE" ], [ "LineNr", bg, ui_linenr, "NONE" ],
[ "CursorLineNr", bg, ui_cursorlinenr, "bold" ], [ "CursorLineNr", bg, ui_cursorlinenr, "bold" ],
@ -287,20 +288,20 @@
# tabline, statusline # tabline, statusline
[ "TabLineNum", ui_bg, ui_fg, "bold"], [ "TabLineNum", ui_bg, ui_fg, "italic"],
[ "TabLineNumSel", ui_bg, ui_fg_strong1, "bold"], [ "TabLineNumSel", ui_bg, ui_fg_strong1, "italic"],
[ "StatusLineNoise", ui_bg, ui_fg_weak2, "NONE"], [ "StatusLineNoise", ui_bg, ui_fg_weak2, "italic"],
[ "StatusLineNoiseActive", ui_bg, ui_fg, "NONE"], [ "StatusLineNoiseActive", ui_bg, ui_fg, "italic"],
[ "StatusLineBufferNr", ui_bg, ui_fg_strong2, "bold"], [ "StatusLineBufferNr", ui_bg, ui_fg_strong2, "italic"],
[ "StatusLineBufferNrActive", ui_bg, ui_fg_strong3, "bold"], [ "StatusLineBufferNrActive", ui_bg, ui_fg_strong3, "italic"],
[ "StatusLinePercent", ui_bg, ui_fg, "bold"], [ "StatusLinePercent", ui_bg, ui_fg, "italic"],
[ "StatusLinePercentActive", ui_bg, ui_fg_strong2, "bold"], [ "StatusLinePercentActive", ui_bg, ui_fg_strong2, "italic"],
[ "StatusLineLinecount", ui_bg, ui_fg, "bold"], [ "StatusLineLinecount", ui_bg, ui_fg, "italic"],
[ "StatusLineLinecountActive", ui_bg, ui_fg_strong1, "bold"], [ "StatusLineLinecountActive", ui_bg, ui_fg_strong1, "italic"],
[ "StatusLineDivActive", ui_fg, ui_fg, "NONE"], [ "StatusLineDivActive", ui_fg, ui_fg, "NONE"],
[ "StatusLineDivInput", ui_statusbar_input, ui_statusbar_input, "NONE"], [ "StatusLineDivInput", ui_statusbar_input, ui_statusbar_input, "NONE"],
@ -320,8 +321,8 @@
[ "StatusLineFileReadOnly", ui_bg, ui_fg_warning, "italic"], [ "StatusLineFileReadOnly", ui_bg, ui_fg_warning, "italic"],
[ "StatusLineFileReadOnlyActive", "NONE", ui_fg_warning, "italic"], [ "StatusLineFileReadOnlyActive", "NONE", ui_fg_warning, "italic"],
[ "StatusLineWarning", ui_bg, ui_fg_strong1, "bold"], [ "StatusLineWarning", ui_bg, ui_fg_strong1, "italic"],
[ "StatusLineWarningActive", "NONE", ui_fg_warning, "bold"], [ "StatusLineWarningActive", "NONE", ui_fg_warning, "italic"],
[ "LinterDash", "NONE", ui_fg_linter_dash, "NONE"], [ "LinterDash", "NONE", ui_fg_linter_dash, "NONE"],
[ "LinterDashActive", "NONE", ui_fg_linter_dash_active, "NONE"], [ "LinterDashActive", "NONE", ui_fg_linter_dash_active, "NONE"],
@ -344,6 +345,9 @@
[ "GitGutterAdd", "NONE", ui_sign_add, "bold"], [ "GitGutterAdd", "NONE", ui_sign_add, "bold"],
[ "GitGutterChangeDelete", "NONE", ui_sign_changedelete, "bold"], [ "GitGutterChangeDelete", "NONE", ui_sign_changedelete, "bold"],
[ "QuickScopePrimary", "IncSearch" ],
[ "QuickScopeSecondary", "Search" ],
# css, scss # css, scss
[ "cssIdentifier", "NONE", color_secondary, "bold" ], [ "cssIdentifier", "NONE", color_secondary, "bold" ],
@ -380,7 +384,7 @@
["htmlTagName", "NONE", color_tertiary_weak, "NONE"], ["htmlTagName", "NONE", color_tertiary_weak, "NONE"],
["htmlSpecialTagName", "NONE", color_tertiary, "bold"], ["htmlSpecialTagName", "NONE", color_tertiary, "bold"],
["htmlLink", "NONE", color_tertiary_strong, "underline"], ["htmlLink", "NONE", fg_strong3, "italic,underline"],
[ "htmlNormal", "Normal" ], [ "htmlNormal", "Normal" ],
@ -429,6 +433,7 @@
[ "vueTagComponentName", "NONE", indigo3, "bold" ], [ "vueTagComponentName", "NONE", indigo3, "bold" ],
[ "vueDynamicComponent", "NONE", indigo1, "bold" ], [ "vueDynamicComponent", "NONE", indigo1, "bold" ],
[ "vueComponentName", "vueTagComponentName" ],
[ "vueTransitionComponent", "vueDynamicComponent" ], [ "vueTransitionComponent", "vueDynamicComponent" ],
[ "vueTransitionName", "cssIdentifier" ], [ "vueTransitionName", "cssIdentifier" ],
[ "vueTransitionMode", "String" ], [ "vueTransitionMode", "String" ],

607
vimrc
View File

@ -7,52 +7,57 @@ if empty(glob('~/.vim/autoload/plug.vim'))"{{{
endif endif
"}}} "}}}
call plug#begin('~/.vim/bundle') if !has('nvim')
call plug#begin('~/.vim/bundle')
" #Activity Watch #aw-watcher-vim{{{ " #Activity Watch #aw-watcher-vim{{{
" https://github.com/ActivityWatch/aw-watcher-vim " https://github.com/ActivityWatch/aw-watcher-vim
Plug 'ActivityWatch/aw-watcher-vim' Plug 'ActivityWatch/aw-watcher-vim'
"}}} "}}}
" #ALE {{{ " #ALE {{{
" https://github.com/w0rp/ale " https://github.com/w0rp/ale
Plug 'w0rp/ale' Plug 'w0rp/ale'
nnoremap <space>ne :lnext<cr> nnoremap <space>ne :lnext<cr>
nnoremap <space>pe :lprev<cr> nnoremap <space>pe :lprev<cr>
let g:ale_sign_error = '>>' let g:ale_sign_error = '>>'
let g:ale_sign_warning = '>' let g:ale_sign_warning = '>'
let g:ale_sign_column_always = 1 let g:ale_sign_column_always = 1
let g:ale_open_list = 0 let g:ale_open_list = 0
let g:ale_linters = {'scss': ['stylelint'], 'javascript': [], 'php':['php'], 'html':['htmlhint'], 'python': [], 'vue': []} let g:ale_linters = {'scss': ['stylelint'], 'javascript': [], 'php':['php'], 'html':['htmlhint'], 'python': [], 'vue': []}
let g:ale_html_htmlhint_options = '-c ~/.htmlhintrc --format=unix' let g:ale_html_htmlhint_options = '-c ~/.htmlhintrc --format=unix'
let g:ale_fixers = {'javascript': ['eslint']} let g:ale_fixers = {'javascript': ['eslint']}
"}}} "}}}
" #colorV {{{ " #coc.nvim{{{
" original: " https://github.com/neoclide/coc.nvim
" https://github.com/gu-fan/colorv.vim " Plug 'neoclide/coc.nvim', {'tag': '*', 'do': { -> coc#util#install()}}
" Plug 'gu-fan/colorv.vim' "}}}
" custom fork: " #colorV {{{
" https://github.com/studio-vx/colorv.vim " original:
Plug 'studio-vx/colorv.vim' " https://github.com/gu-fan/colorv.vim
" Plug 'gu-fan/colorv.vim'
" custom fork:
" https://github.com/studio-vx/colorv.vim
Plug 'studio-vx/colorv.vim'
let g:ColorVForceGuiColors = 1 let g:ColorVForceGuiColors = 1
let g:colorv_no_global_map = 1 let g:colorv_no_global_map = 1
let g:colorv_win_pos = 'top' let g:colorv_win_pos = 'top'
let g:colorv_preview_area = 0 let g:colorv_preview_area = 0
nnoremap <space>cv :ColorV<CR> nnoremap <space>cv :ColorV<CR>
nnoremap <space>ce :ColorVEdit<CR> nnoremap <space>ce :ColorVEdit<CR>
nnoremap <space>cc :call ToggleColorPreview()<CR> nnoremap <space>cc :call ToggleColorPreview()<CR>
nnoremap <space>ci :ColorVInsert<CR> nnoremap <space>ci :ColorVInsert<CR>
nnoremap <space>cp :ColorVPicker<CR> nnoremap <space>cp :ColorVPicker<CR>
let w:colorv_is_previewing = 0 let w:colorv_is_previewing = 0
function! ToggleColorPreview() abort "{{{ function! ToggleColorPreview() abort "{{{
if !exists('w:colorv_is_previewing') if !exists('w:colorv_is_previewing')
let w:colorv_is_previewing = 0 let w:colorv_is_previewing = 0
endif endif
@ -63,74 +68,74 @@ function! ToggleColorPreview() abort "{{{
execute 'ColorVClear' execute 'ColorVClear'
let w:colorv_is_previewing = 0 let w:colorv_is_previewing = 0
endif endif
endfunction "}}} endfunction "}}}
"}}} "}}}
" #css3-syntax{{{ " #css3-syntax{{{
Plug 'hail2u/vim-css3-syntax' Plug 'hail2u/vim-css3-syntax'
"}}} "}}}
" #Ctrlp {{{ " #Ctrlp {{{
Plug 'ctrlpvim/ctrlp.vim' Plug 'ctrlpvim/ctrlp.vim'
" :h ctrlp-commands " :h ctrlp-commands
" :h ctrlp-extensions " :h ctrlp-extensions
let g:ctrlp_extensions = ['tag', 'buffertag', 'quickfix', 'undo'] let g:ctrlp_extensions = ['tag', 'buffertag', 'quickfix', 'undo']
if executable('ag') if executable('ag')
" Use ag in CtrlP for listing files. Lightning fast and respects .gitignore " Use ag in CtrlP for listing files. Lightning fast and respects .gitignore
let g:ctrlp_user_command = 'ag %s -l --nocolor -g ""' let g:ctrlp_user_command = 'ag %s -l --nocolor -g ""'
" ag is fast enough that CtrlP doesn't need to cache " ag is fast enough that CtrlP doesn't need to cache
let g:ctrlp_use_caching = 0 let g:ctrlp_use_caching = 0
endif endif
" Use ag over grep " Use ag over grep
if executable('ag') if executable('ag')
set grepprg=ag\ --nogroup\ --nocolor\ --ignore\ node_modules set grepprg=ag\ --nogroup\ --nocolor\ --ignore\ node_modules
endif endif
"}}} "}}}
" #emmet-vim {{{ " #emmet-vim {{{
" https://github.com/mattn/emmet-vim " https://github.com/mattn/emmet-vim
Plug 'mattn/emmet-vim' Plug 'mattn/emmet-vim'
let g:user_emmet_leader_key=',,' let g:user_emmet_leader_key=',,'
let g:user_emmet_settings = { let g:user_emmet_settings = {
\ 'indentation': ' ', \ 'indentation': ' ',
\} \}
"}}} "}}}
" #gitgutter {{{ " #gitgutter {{{
" https://github.com/airblade/vim-gitgutter/blob/master/README.mkd " https://github.com/airblade/vim-gitgutter/blob/master/README.mkd
Plug 'airblade/vim-gitgutter' Plug 'airblade/vim-gitgutter'
nmap ]h <Plug>GitGutterNextHunk nmap ]h <Plug>GitGutterNextHunk
nmap [h <Plug>GitGutterPrevHunk nmap [h <Plug>GitGutterPrevHunk
omap ih <Plug>GitGutterTextObjectInnerPending omap ih <Plug>GitGutterTextObjectInnerPending
omap ah <Plug>GitGutterTextObjectOuterPending omap ah <Plug>GitGutterTextObjectOuterPending
xmap ih <Plug>GitGutterTextObjectInnerVisual xmap ih <Plug>GitGutterTextObjectInnerVisual
xmap ah <Plug>GitGutterTextObjectOuterVisual xmap ah <Plug>GitGutterTextObjectOuterVisual
"}}} "}}}
" #gitv{{{ " #gitv{{{
" https://github.com/gregsexton/gitv " https://github.com/gregsexton/gitv
Plug 'gregsexton/gitv' Plug 'gregsexton/gitv'
"}}} "}}}
"#html5{{{ "#html5{{{
" https://github.com/othree/html5.vim " https://github.com/othree/html5.vim
Plug 'othree/html5.vim' Plug 'othree/html5.vim'
"}}} "}}}
"#i3config.vim{{{ "#i3config.vim{{{
" https://github.com/mboughaba/i3config.vim " https://github.com/mboughaba/i3config.vim
Plug 'mboughaba/i3config.vim' Plug 'mboughaba/i3config.vim'
"}}} "}}}
" #inline_edit.vim {{{ " #inline_edit.vim {{{
" https://github.com/AndrewRadev/inline_edit.vim " https://github.com/AndrewRadev/inline_edit.vim
Plug 'AndrewRadev/inline_edit.vim' Plug 'AndrewRadev/inline_edit.vim'
let g:inline_edit_patterns = [{ let g:inline_edit_patterns = [{
\ 'main_filetype': '*html', \ 'main_filetype': '*html',
\ 'sub_filetype': 'scss', \ 'sub_filetype': 'scss',
\ 'indent_adjustment': 1, \ 'indent_adjustment': 1,
@ -138,58 +143,58 @@ let g:inline_edit_patterns = [{
\ 'end': '</style>' \ 'end': '</style>'
\ }] \ }]
let g:inline_edit_autowrite = 1 let g:inline_edit_autowrite = 1
let g:inline_edit_proxy_type = 'tempfile' let g:inline_edit_proxy_type = 'tempfile'
let g:inline_edit_new_buffer_command ='tabedit' let g:inline_edit_new_buffer_command ='tabedit'
let g:inline_edit_modify_statusline = 0 let g:inline_edit_modify_statusline = 0
nnoremap <space>ie :InlineEdit<cr> nnoremap <space>ie :InlineEdit<cr>
"}}} "}}}
" #MatchTagAlways{{{ " #MatchTagAlways{{{
" https://github.com/Valloric/MatchTagAlways " https://github.com/Valloric/MatchTagAlways
Plug 'Valloric/MatchTagAlways' Plug 'Valloric/MatchTagAlways'
"}}} "}}}
" #Netrw {{{ " #Netrw {{{
let g:netrw_liststyle=3 let g:netrw_liststyle=3
let g:netrw_list_hide='^\..*' let g:netrw_list_hide='^\..*'
let g:netrw_preview = 0 let g:netrw_preview = 0
"}}} "}}}
" #Obsession{{{ " #Obsession{{{
Plug 'tpope/vim-obsession' Plug 'tpope/vim-obsession'
"}}} "}}}
" #php.vim{{{ " #php.vim{{{
" https://github.com/StanAngeloff/php.vim " https://github.com/StanAngeloff/php.vim
Plug 'StanAngeloff/php.vim' Plug 'StanAngeloff/php.vim'
"}}} "}}}
" #phpcomplete.vim{{{ " #phpcomplete.vim{{{
" https://github.com/shawncplus/phpcomplete.vim " https://github.com/shawncplus/phpcomplete.vim
Plug 'shawncplus/phpcomplete.vim' Plug 'shawncplus/phpcomplete.vim'
" https://github.com/dsawardekar/wordpress.vim " https://github.com/dsawardekar/wordpress.vim
" For up to date Wordpress Files see: " For up to date Wordpress Files see:
" https://github.com/joseluis/wordpress.vim-generator " https://github.com/joseluis/wordpress.vim-generator
"}}} "}}}
" #quickscope{{{ " #quickscope{{{
" https://github.com/unblevable/quick-scope " https://github.com/unblevable/quick-scope
Plug 'unblevable/quick-scope' Plug 'unblevable/quick-scope'
let g:qs_highlight_on_keys = ['f', 'F', 't', 'T'] let g:qs_highlight_on_keys = ['f', 'F', 't', 'T']
"}}} "}}}
" #scss-syntax{{{ " #scss-syntax{{{
Plug 'cakebaker/scss-syntax.vim' Plug 'cakebaker/scss-syntax.vim'
"}}} "}}}
" #switch {{{ " #switch {{{
"https://github.com/AndrewRadev/switch.vim "https://github.com/AndrewRadev/switch.vim
Plug 'AndrewRadev/switch.vim' Plug 'AndrewRadev/switch.vim'
let g:switch_mapping = '<space>-' let g:switch_mapping = '<space>-'
let g:switch_custom_definitions = [ let g:switch_custom_definitions = [
\ ['0', '1'], \ ['0', '1'],
\ ['ease-in', 'ease-out', 'ease-in-out', 'linear'], \ ['ease-in', 'ease-out', 'ease-in-out', 'linear'],
\ ['auto', 'none'], \ ['auto', 'none'],
@ -197,73 +202,73 @@ let g:switch_custom_definitions = [
\ ['top', 'bottom'], \ ['top', 'bottom'],
\ ['row', 'column'], \ ['row', 'column'],
\ ['relative', 'absolute', 'fixed'] \ ['relative', 'absolute', 'fixed']
\ ] \ ]
"}}} "}}}
" #tagbar {{{ " #tagbar {{{
Plug 'majutsushi/tagbar' Plug 'majutsushi/tagbar'
nnoremap <space>tb :TagbarOpen fj<CR> nnoremap <space>tb :TagbarOpen fj<CR>
nnoremap <space>] :tag /[.#@]<c-r>=expand('<cword>')<cr><cr> nnoremap <space>] :tag /[.#@]<c-r>=expand('<cword>')<cr><cr>
let g:tagbar_autoclose = 1 let g:tagbar_autoclose = 1
" let g:tagbar_autopreview = 1 " let g:tagbar_autopreview = 1
" let g:tagbar_previewwin_pos = '' " let g:tagbar_previewwin_pos = ''
let g:tagbar_type_css = { let g:tagbar_type_css = {
\ 'ctagstype' : 'css', \ 'ctagstype' : 'css',
\ 'kinds' : [ \ 'kinds' : [
\ 'c:classes', \ 'c:classes',
\ 'i:ids', \ 'i:ids',
\ 't:tags', \ 't:tags',
\ 'm:medias' \ 'm:medias'
\ ] \ ]
\} \}
let g:tagbar_type_scss = { let g:tagbar_type_scss = {
\ 'ctagstype' : 'scss', \ 'ctagstype' : 'scss',
\ 'kinds' : [ \ 'kinds' : [
\ 'v:variables', \ 'v:variables',
\ 'c:classes', \ 'c:classes',
\ 'i:ids', \ 'i:ids',
\ 't:tags', \ 't:tags',
\ 'd:medias', \ 'd:medias',
\ 'm:mixins', \ 'm:mixins',
\ 'f:functions' \ 'f:functions'
\ ] \ ]
\} \}
let g:tagbar_type_vue = { let g:tagbar_type_vue = {
\ 'ctagstype' : 'vue', \ 'ctagstype' : 'vue',
\ 'kinds' : [ \ 'kinds' : [
\ 'o:objects', \ 'o:objects',
\ 'f:functions', \ 'f:functions',
\ 'a:array', \ 'a:array',
\ 's:string', \ 's:string',
\ 'b:boolean', \ 'b:boolean',
\ 'n:number', \ 'n:number',
\ 'v:variable' \ 'v:variable'
\ ] \ ]
\ } \ }
"}}} "}}}
" #ultisnips {{{ " #ultisnips {{{
" https://github.com/sirver/UltiSnips " https://github.com/sirver/UltiSnips
Plug 'SirVer/ultisnips' Plug 'SirVer/ultisnips'
" and some snippets " and some snippets
" https://github.com/honza/vim-snippets " https://github.com/honza/vim-snippets
" Plug 'honza/vim-snippets' " Plug 'honza/vim-snippets'
nnoremap <space>ul :call ListUltisnips()<cr> nnoremap <space>ul :call ListUltisnips()<cr>
inoremap jkul <c-o>:call ListUltisnips()<cr> inoremap jkul <c-o>:call ListUltisnips()<cr>
let g:UltiSnipsSnippetsDir='~/.vim/UltiSnips' let g:UltiSnipsSnippetsDir='~/.vim/UltiSnips'
" Trigger configuration. Do not use <tab> if you use https://github.com/Valloric/YouCompleteMe. " Trigger configuration. Do not use <tab> if you use https://github.com/Valloric/YouCompleteMe.
let g:UltiSnipsExpandTrigger='<c-j>' let g:UltiSnipsExpandTrigger='<c-j>'
let g:UltiSnipsJumpForwardTrigger='<tab>' let g:UltiSnipsJumpForwardTrigger='<tab>'
let g:UltiSnipsJumpBackwardTrigger='<s-tab>' let g:UltiSnipsJumpBackwardTrigger='<s-tab>'
let g:UltiSnipsEditSplit='horizontal' let g:UltiSnipsEditSplit='horizontal'
function! ListUltisnips() abort"{{{ function! ListUltisnips() abort"{{{
let l:snips = UltiSnips#SnippetsInCurrentScope(1) let l:snips = UltiSnips#SnippetsInCurrentScope(1)
let l:keylist = sort(keys(l:snips)) let l:keylist = sort(keys(l:snips))
echo ' --------------------------------------------------' echo ' --------------------------------------------------'
@ -271,10 +276,10 @@ function! ListUltisnips() abort"{{{
echo printf(" %-10s\t%s", l:key, l:snips[l:key]) echo printf(" %-10s\t%s", l:key, l:snips[l:key])
endfor endfor
echo '---------------------------------------------------' echo '---------------------------------------------------'
endfunction endfunction
"}}} "}}}
function! CompleteSnippets(findstart, base)"{{{ function! CompleteSnippets(findstart, base)"{{{
if a:findstart if a:findstart
let l:line = getline('.') let l:line = getline('.')
let l:start = col('.') - 1 let l:start = col('.') - 1
@ -294,89 +299,89 @@ function! CompleteSnippets(findstart, base)"{{{
endfor endfor
return l:res return l:res
endif endif
endfunction endfunction
"}}} "}}}
set completefunc=CompleteSnippets set completefunc=CompleteSnippets
"}}} "}}}
" #undotree {{{ " #undotree {{{
Plug 'mbbill/undotree' Plug 'mbbill/undotree'
nnoremap <space>ut :UndotreeToggle<cr> nnoremap <space>ut :UndotreeToggle<cr>
"}}} "}}}
" #vim-commentary{{{ " #vim-commentary{{{
" https://github.com/tpope/vim-commentary " https://github.com/tpope/vim-commentary
Plug 'tpope/vim-commentary' Plug 'tpope/vim-commentary'
"}}} "}}}
" #vim-dispatch{{{ " #vim-dispatch{{{
" https://github.com/tpope/vim-dispatch " https://github.com/tpope/vim-dispatch
Plug 'tpope/vim-dispatch' Plug 'tpope/vim-dispatch'
"}}} "}}}
" #vim-easy-align {{{ " #vim-easy-align {{{
" https://github.com/junegunn/vim-easy-align " https://github.com/junegunn/vim-easy-align
Plug 'junegunn/vim-easy-align' Plug 'junegunn/vim-easy-align'
xmap ga <Plug>(EasyAlign) xmap ga <Plug>(EasyAlign)
nmap ga <Plug>(EasyAlign) nmap ga <Plug>(EasyAlign)
"}}} "}}}
" #vim-gutentags {{{ " #vim-gutentags {{{
" https://github.com/ludovicchabant/vim-gutentags " https://github.com/ludovicchabant/vim-gutentags
Plug 'ludovicchabant/vim-gutentags' Plug 'ludovicchabant/vim-gutentags'
let g:gutentags_ctags_tagfile = '.tags' let g:gutentags_ctags_tagfile = '.tags'
let g:gutentags_ctags_exclude = ['package.json', 'Session.vim', 'package-lock.json', 'TODO.txt'] let g:gutentags_ctags_exclude = ['package.json', 'Session.vim', 'package-lock.json', 'TODO.txt']
"}}} "}}}
"#vim-json{{{ "#vim-json{{{
" https://github.com/elzr/vim-json " https://github.com/elzr/vim-json
Plug 'elzr/vim-json' Plug 'elzr/vim-json'
"}}} "}}}
" #vim-lsp {{{ " #vim-lsp {{{
" https://github.com/prabirshrestha/vim-lsp " https://github.com/prabirshrestha/vim-lsp
Plug 'prabirshrestha/async.vim' Plug 'prabirshrestha/async.vim'
Plug 'prabirshrestha/vim-lsp' Plug 'prabirshrestha/vim-lsp'
let g:lsp_signs_enabled = 1 let g:lsp_signs_enabled = 1
let g:lsp_signs_error = {'text': '>>'} let g:lsp_signs_error = {'text': '>>'}
let g:lsp_signs_warning = {'text': '>'} let g:lsp_signs_warning = {'text': '>'}
let g:lsp_signs_information = {'text': '--'} let g:lsp_signs_information = {'text': '--'}
let g:lsp_signs_hint = {'text': '--'} let g:lsp_signs_hint = {'text': '--'}
let g:lsp_diagnostics_echo_cursor = 1 let g:lsp_diagnostics_echo_cursor = 1
let g:lsp_diagnostics_echo_delay = 0 let g:lsp_diagnostics_echo_delay = 0
nnoremap \l :cclose<CR>:LspDocumentDiagnostics<cr> nnoremap \l :cclose<CR>:LspDocumentDiagnostics<cr>
nnoremap \h :LspHover<cr> nnoremap \h :LspHover<cr>
nnoremap \d :LspDefinition<cr> nnoremap \d :LspDefinition<cr>
nnoremap \r :LspReferences<cr> nnoremap \r :LspReferences<cr>
nnoremap \n :LspRename<cr> nnoremap \n :LspRename<cr>
nnoremap \s :LspDocumentSymbol<cr> nnoremap \s :LspDocumentSymbol<cr>
nnoremap \w :LspWorkspaceSymbol<cr> nnoremap \w :LspWorkspaceSymbol<cr>
nnoremap \ff :LspDocumentFormat<cr> nnoremap \ff :LspDocumentFormat<cr>
nnoremap \fr :LspDocumentRangeFormat<cr> nnoremap \fr :LspDocumentRangeFormat<cr>
augroup User lsp_setup augroup User lsp_setup
autocmd! autocmd!
if executable('vls') if executable('vls') "{{{
autocmd User lsp_setup call lsp#register_server({ autocmd User lsp_setup call lsp#register_server({
\ 'name': 'vue', \ 'name': 'vue',
\ 'cmd': {server_info->['vls']}, \ 'cmd': {server_info->['vls']},
\ 'whitelist': ['vue'], \ 'whitelist': ['vue'],
\ }) \ })
endif endif
"}}}
if executable('pyls') if executable('pyls') "{{{
autocmd User lsp_setup call lsp#register_server({ autocmd User lsp_setup call lsp#register_server({
\ 'name': 'pyls', \ 'name': 'pyls',
\ 'cmd': {server_info->['pyls']}, \ 'cmd': {server_info->['pyls']},
\ 'whitelist': ['python'], \ 'whitelist': ['python'],
\ }) \ })
endif endif
"}}}
if executable('typescript-language-server') if executable('typescript-language-server') "{{{
au User lsp_setup call lsp#register_server({ au User lsp_setup call lsp#register_server({
\ 'name': 'typescript-language-server', \ 'name': 'typescript-language-server',
\ 'cmd': { server_info->[&shell, &shellcmdflag, 'typescript-language-server --stdio']}, \ 'cmd': { server_info->[&shell, &shellcmdflag, 'typescript-language-server --stdio']},
@ -384,34 +389,35 @@ augroup User lsp_setup
\ 'whitelist': ['typescript', 'javascript', 'javascript.jsx'] \ 'whitelist': ['typescript', 'javascript', 'javascript.jsx']
\ }) \ })
endif endif
augroup END "}}}
augroup END
"}}} ""}}}
" #vim-repeat{{{ " #vim-repeat{{{
" https://github.com/tpope/vim-repeat " https://github.com/tpope/vim-repeat
Plug 'tpope/vim-repeat' Plug 'tpope/vim-repeat'
"}}} "}}}
"#vim-rsi{{{ "#vim-rsi{{{
"https://github.com/tpope/vim-rsi "https://github.com/tpope/vim-rsi
Plug 'tpope/vim-rsi' Plug 'tpope/vim-rsi'
"}}} "}}}
" #vim-surround{{{ " #vim-surround{{{
Plug 'tpope/vim-surround' Plug 'tpope/vim-surround'
"}}} "}}}
" #vim-vue {{{ " #vim-vue {{{
" https://github.com/posva/vim-vue " https://github.com/posva/vim-vue
Plug 'posva/vim-vue' Plug 'posva/vim-vue'
" disable preprocessor checking for vue files - increases speed " disable preprocessor checking for vue files - increases speed
let g:vue_disable_pre_processors=0 let g:vue_disable_pre_processors=0
" set custom syntax highlighting " set custom syntax highlighting
augroup fixhighlighting augroup fixhighlighting
autocmd! autocmd!
autocmd BufNewFile,BufRead *.vue syntax sync fromstart autocmd BufNewFile,BufRead *.vue syntax sync fromstart
augroup END augroup END
" #vim-yaml " #vim-yaml
" https://github.com/stephpy/vim-yaml " https://github.com/stephpy/vim-yaml
@ -423,42 +429,43 @@ augroup END
let g:python_highlight_all = 1 let g:python_highlight_all = 1
"}}} "}}}
" #vim-javascript{{{ " #vim-javascript{{{
Plug 'pangloss/vim-javascript' Plug 'pangloss/vim-javascript'
"}}} "}}}
" #vimwiki {{{ " #vimwiki {{{
" https://github.com/vimwiki/vimwiki " https://github.com/vimwiki/vimwiki
Plug 'vimwiki/vimwiki' Plug 'vimwiki/vimwiki'
let g:vimwiki_list = [{'path': '~/vimwiki/', 'path_html': '~/vimwiki_html/'}] let g:vimwiki_list = [{'path': '~/vimwiki/', 'path_html': '~/vimwiki_html/'}]
"}}} "}}}
" #wordpress.vim{{{ " #wordpress.vim{{{
" doesn't support universal ctags " doesn't support universal ctags
" #Plug 'dsawardekar/wordpress.vim' " #Plug 'dsawardekar/wordpress.vim'
" This fork does: " This fork does:
" https://github.com/DArcMattr/wordpress.vim/tree/universal-ctags " https://github.com/DArcMattr/wordpress.vim/tree/universal-ctags
" Using studio-vx fork " Using studio-vx fork
Plug 'studio-vx/wordpress.vim', { 'branch': 'universal-ctags' } Plug 'studio-vx/wordpress.vim', { 'branch': 'universal-ctags' }
"}}} "}}}
" #fugitive-vim{{{ " #fugitive-vim{{{
" https://github.com/tpope/vim-fugitive/blob/master/README.markdown " https://github.com/tpope/vim-fugitive/blob/master/README.markdown
Plug 'tpope/vim-fugitive' Plug 'tpope/vim-fugitive'
"}}} "}}}
" #vim-git{{{ " #vim-git{{{
" https://github.com/tpope/vim-git " https://github.com/tpope/vim-git
Plug 'tpope/vim-git' Plug 'tpope/vim-git'
"}}} "}}}
" #wakatime{{{ " #wakatime{{{
" https://wakatime.com/vim " https://wakatime.com/vim
Plug 'wakatime/vim-wakatime' Plug 'wakatime/vim-wakatime'
"}}} "}}}
call plug#end() call plug#end()
endif
runtime macros/matchit.vim runtime macros/matchit.vim
@ -1502,8 +1509,12 @@ if exists('+showtabline')
let l:customtabline .= '%T%#TabLineFill#%=' let l:customtabline .= '%T%#TabLineFill#%='
let l:customtabline .= '%#TabLineItem# %{getcwd()}% ' let l:customtabline .= '%#TabLineItem# %{getcwd()}% '
if exists("*fugitive#statusline")
let l:customtabline .= '%#TabLineItem# %{fugitive#statusline()}% ' let l:customtabline .= '%#TabLineItem# %{fugitive#statusline()}% '
endif
if exists("*ObsessionStatus")
let l:customtabline .= "%#TabLineItemSel# %{ObsessionStatus(fnamemodify(v:this_session,':t'),'---')} %*" let l:customtabline .= "%#TabLineItemSel# %{ObsessionStatus(fnamemodify(v:this_session,':t'),'---')} %*"
endif
return l:customtabline return l:customtabline