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" ],

775
vimrc
View File

@ -7,458 +7,465 @@ 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
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 "}}}
"}}}
" #css3-syntax{{{
Plug 'hail2u/vim-css3-syntax'
"}}}
" #Ctrlp {{{
Plug 'ctrlpvim/ctrlp.vim'
" :h ctrlp-commands
" :h ctrlp-extensions
let g:ctrlp_extensions = ['tag', 'buffertag', 'quickfix', 'undo']
if executable('ag')
" 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 endif
if w:colorv_is_previewing == 0 " Use ag over grep
execute 'ColorVPreview' if executable('ag')
let w:colorv_is_previewing = 1 set grepprg=ag\ --nogroup\ --nocolor\ --ignore\ node_modules
else
execute 'ColorVClear'
let w:colorv_is_previewing = 0
endif endif
endfunction "}}}
"}}}
" #emmet-vim {{{
" https://github.com/mattn/emmet-vim
Plug 'mattn/emmet-vim'
let g:user_emmet_leader_key=',,'
let g:user_emmet_settings = {
\ 'indentation': ' ',
\}
"}}} "}}}
" #css3-syntax{{{ " #gitgutter {{{
Plug 'hail2u/vim-css3-syntax' " https://github.com/airblade/vim-gitgutter/blob/master/README.mkd
Plug 'airblade/vim-gitgutter'
"}}} nmap ]h <Plug>GitGutterNextHunk
" #Ctrlp {{{ nmap [h <Plug>GitGutterPrevHunk
Plug 'ctrlpvim/ctrlp.vim' omap ih <Plug>GitGutterTextObjectInnerPending
" :h ctrlp-commands omap ah <Plug>GitGutterTextObjectOuterPending
" :h ctrlp-extensions xmap ih <Plug>GitGutterTextObjectInnerVisual
xmap ah <Plug>GitGutterTextObjectOuterVisual
let g:ctrlp_extensions = ['tag', 'buffertag', 'quickfix', 'undo'] "}}}
" #gitv{{{
" https://github.com/gregsexton/gitv
Plug 'gregsexton/gitv'
if executable('ag') "}}}
" Use ag in CtrlP for listing files. Lightning fast and respects .gitignore "#html5{{{
let g:ctrlp_user_command = 'ag %s -l --nocolor -g ""' " https://github.com/othree/html5.vim
" ag is fast enough that CtrlP doesn't need to cache Plug 'othree/html5.vim'
let g:ctrlp_use_caching = 0
endif
" Use ag over grep
if executable('ag')
set grepprg=ag\ --nogroup\ --nocolor\ --ignore\ node_modules
endif
"}}} "}}}
" #emmet-vim {{{ "#i3config.vim{{{
" https://github.com/mattn/emmet-vim " https://github.com/mboughaba/i3config.vim
Plug 'mattn/emmet-vim' Plug 'mboughaba/i3config.vim'
let g:user_emmet_leader_key=',,'
let g:user_emmet_settings = {
\ 'indentation': ' ',
\}
"}}} "}}}
" #gitgutter {{{ " #inline_edit.vim {{{
" https://github.com/airblade/vim-gitgutter/blob/master/README.mkd " https://github.com/AndrewRadev/inline_edit.vim
Plug 'airblade/vim-gitgutter' Plug 'AndrewRadev/inline_edit.vim'
nmap ]h <Plug>GitGutterNextHunk let g:inline_edit_patterns = [{
nmap [h <Plug>GitGutterPrevHunk \ 'main_filetype': '*html',
omap ih <Plug>GitGutterTextObjectInnerPending \ 'sub_filetype': 'scss',
omap ah <Plug>GitGutterTextObjectOuterPending \ 'indent_adjustment': 1,
xmap ih <Plug>GitGutterTextObjectInnerVisual \ 'start': '<style\>[^>]*lang=.scss[^>]*>',
xmap ah <Plug>GitGutterTextObjectOuterVisual \ 'end': '</style>'
\ }]
"}}} let g:inline_edit_autowrite = 1
" #gitv{{{ let g:inline_edit_proxy_type = 'tempfile'
" https://github.com/gregsexton/gitv let g:inline_edit_new_buffer_command ='tabedit'
Plug 'gregsexton/gitv' let g:inline_edit_modify_statusline = 0
"}}} nnoremap <space>ie :InlineEdit<cr>
"#html5{{{
" https://github.com/othree/html5.vim
Plug 'othree/html5.vim'
"}}} "}}}
"#i3config.vim{{{ " #MatchTagAlways{{{
" https://github.com/mboughaba/i3config.vim " https://github.com/Valloric/MatchTagAlways
Plug 'mboughaba/i3config.vim' Plug 'Valloric/MatchTagAlways'
"}}} "}}}
" #inline_edit.vim {{{ " #Netrw {{{
" https://github.com/AndrewRadev/inline_edit.vim
Plug 'AndrewRadev/inline_edit.vim'
let g:inline_edit_patterns = [{ let g:netrw_liststyle=3
\ 'main_filetype': '*html', let g:netrw_list_hide='^\..*'
\ 'sub_filetype': 'scss', let g:netrw_preview = 0
\ 'indent_adjustment': 1,
\ 'start': '<style\>[^>]*lang=.scss[^>]*>',
\ 'end': '</style>'
\ }]
let g:inline_edit_autowrite = 1 "}}}
let g:inline_edit_proxy_type = 'tempfile' " #Obsession{{{
let g:inline_edit_new_buffer_command ='tabedit' Plug 'tpope/vim-obsession'
let g:inline_edit_modify_statusline = 0
nnoremap <space>ie :InlineEdit<cr> "}}}
" #php.vim{{{
" https://github.com/StanAngeloff/php.vim
Plug 'StanAngeloff/php.vim'
"}}} "}}}
" #MatchTagAlways{{{ " #phpcomplete.vim{{{
" https://github.com/Valloric/MatchTagAlways " https://github.com/shawncplus/phpcomplete.vim
Plug 'Valloric/MatchTagAlways' Plug 'shawncplus/phpcomplete.vim'
" https://github.com/dsawardekar/wordpress.vim
" For up to date Wordpress Files see:
" https://github.com/joseluis/wordpress.vim-generator
"}}} "}}}
" #Netrw {{{ " #quickscope{{{
" https://github.com/unblevable/quick-scope
Plug 'unblevable/quick-scope'
let g:qs_highlight_on_keys = ['f', 'F', 't', 'T']
"}}}
" #scss-syntax{{{
Plug 'cakebaker/scss-syntax.vim'
let g:netrw_liststyle=3 "}}}
let g:netrw_list_hide='^\..*' " #switch {{{
let g:netrw_preview = 0 "https://github.com/AndrewRadev/switch.vim
Plug 'AndrewRadev/switch.vim'
"}}} let g:switch_mapping = '<space>-'
" #Obsession{{{ let g:switch_custom_definitions = [
Plug 'tpope/vim-obsession' \ ['0', '1'],
\ ['ease-in', 'ease-out', 'ease-in-out', 'linear'],
\ ['auto', 'none'],
\ ['left', 'right'],
\ ['top', 'bottom'],
\ ['row', 'column'],
\ ['relative', 'absolute', 'fixed']
\ ]
"}}} "}}}
" #php.vim{{{ " #tagbar {{{
" https://github.com/StanAngeloff/php.vim Plug 'majutsushi/tagbar'
Plug 'StanAngeloff/php.vim'
"}}} nnoremap <space>tb :TagbarOpen fj<CR>
" #phpcomplete.vim{{{ nnoremap <space>] :tag /[.#@]<c-r>=expand('<cword>')<cr><cr>
" https://github.com/shawncplus/phpcomplete.vim let g:tagbar_autoclose = 1
Plug 'shawncplus/phpcomplete.vim' " let g:tagbar_autopreview = 1
" https://github.com/dsawardekar/wordpress.vim " let g:tagbar_previewwin_pos = ''
" For up to date Wordpress Files see:
" https://github.com/joseluis/wordpress.vim-generator
"}}} let g:tagbar_type_css = {
" #quickscope{{{ \ 'ctagstype' : 'css',
" https://github.com/unblevable/quick-scope \ 'kinds' : [
Plug 'unblevable/quick-scope' \ 'c:classes',
let g:qs_highlight_on_keys = ['f', 'F', 't', 'T'] \ 'i:ids',
"}}} \ 't:tags',
" #scss-syntax{{{ \ 'm:medias'
Plug 'cakebaker/scss-syntax.vim' \ ]
\}
"}}} let g:tagbar_type_scss = {
" #switch {{{ \ 'ctagstype' : 'scss',
"https://github.com/AndrewRadev/switch.vim \ 'kinds' : [
Plug 'AndrewRadev/switch.vim' \ 'v:variables',
\ 'c:classes',
\ 'i:ids',
\ 't:tags',
\ 'd:medias',
\ 'm:mixins',
\ 'f:functions'
\ ]
\}
let g:switch_mapping = '<space>-' let g:tagbar_type_vue = {
let g:switch_custom_definitions = [ \ 'ctagstype' : 'vue',
\ ['0', '1'], \ 'kinds' : [
\ ['ease-in', 'ease-out', 'ease-in-out', 'linear'], \ 'o:objects',
\ ['auto', 'none'], \ 'f:functions',
\ ['left', 'right'], \ 'a:array',
\ ['top', 'bottom'], \ 's:string',
\ ['row', 'column'], \ 'b:boolean',
\ ['relative', 'absolute', 'fixed'] \ 'n:number',
\ ] \ 'v:variable'
\ ]
\ }
"}}} "}}}
" #tagbar {{{ " #ultisnips {{{
Plug 'majutsushi/tagbar' " https://github.com/sirver/UltiSnips
Plug 'SirVer/ultisnips'
" and some snippets
" https://github.com/honza/vim-snippets
" Plug 'honza/vim-snippets'
nnoremap <space>tb :TagbarOpen fj<CR> nnoremap <space>ul :call ListUltisnips()<cr>
nnoremap <space>] :tag /[.#@]<c-r>=expand('<cword>')<cr><cr> inoremap jkul <c-o>:call ListUltisnips()<cr>
let g:tagbar_autoclose = 1
" let g:tagbar_autopreview = 1
" let g:tagbar_previewwin_pos = ''
let g:tagbar_type_css = { let g:UltiSnipsSnippetsDir='~/.vim/UltiSnips'
\ 'ctagstype' : 'css', " Trigger configuration. Do not use <tab> if you use https://github.com/Valloric/YouCompleteMe.
\ 'kinds' : [ let g:UltiSnipsExpandTrigger='<c-j>'
\ 'c:classes', let g:UltiSnipsJumpForwardTrigger='<tab>'
\ 'i:ids', let g:UltiSnipsJumpBackwardTrigger='<s-tab>'
\ 't:tags', let g:UltiSnipsEditSplit='horizontal'
\ 'm:medias'
\ ]
\}
let g:tagbar_type_scss = { function! ListUltisnips() abort"{{{
\ '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='<c-j>'
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:snips = UltiSnips#SnippetsInCurrentScope(1)
let l:keylist = sort(keys(l:snips)) let l:keylist = sort(keys(l:snips))
echo ' --------------------------------------------------'
for l:key in l:keylist for l:key in l:keylist
if l:key =~ '^' . a:base echo printf(" %-10s\t%s", l:key, l:snips[l:key])
let l:item = {'word': l:key, 'menu': l:snips[l:key]}
call add(l:res, l:item)
endif
endfor endfor
return l:res echo '---------------------------------------------------'
endif endfunction
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 "}}}
"}}} set completefunc=CompleteSnippets
" #undotree {{{
Plug 'mbbill/undotree'
nnoremap <space>ut :UndotreeToggle<cr>
"}}} "}}}
" #vim-commentary{{{ " #undotree {{{
" https://github.com/tpope/vim-commentary Plug 'mbbill/undotree'
Plug 'tpope/vim-commentary' nnoremap <space>ut :UndotreeToggle<cr>
"}}} "}}}
" #vim-dispatch{{{ " #vim-commentary{{{
" https://github.com/tpope/vim-dispatch " https://github.com/tpope/vim-commentary
Plug 'tpope/vim-dispatch' Plug 'tpope/vim-commentary'
"}}} "}}}
" #vim-easy-align {{{ " #vim-dispatch{{{
" https://github.com/junegunn/vim-easy-align " https://github.com/tpope/vim-dispatch
Plug 'junegunn/vim-easy-align' Plug 'tpope/vim-dispatch'
xmap ga <Plug>(EasyAlign) "}}}
nmap ga <Plug>(EasyAlign) " #vim-easy-align {{{
" https://github.com/junegunn/vim-easy-align
Plug 'junegunn/vim-easy-align'
"}}} xmap ga <Plug>(EasyAlign)
" #vim-gutentags {{{ nmap ga <Plug>(EasyAlign)
" 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'] " #vim-gutentags {{{
" https://github.com/ludovicchabant/vim-gutentags
Plug 'ludovicchabant/vim-gutentags'
"}}} let g:gutentags_ctags_tagfile = '.tags'
"#vim-json{{{ let g:gutentags_ctags_exclude = ['package.json', 'Session.vim', 'package-lock.json', 'TODO.txt']
" https://github.com/elzr/vim-json
Plug 'elzr/vim-json'
"}}} "}}}
" #vim-lsp {{{ "#vim-json{{{
" https://github.com/prabirshrestha/vim-lsp " https://github.com/elzr/vim-json
Plug 'prabirshrestha/async.vim' Plug 'elzr/vim-json'
Plug 'prabirshrestha/vim-lsp'
let g:lsp_signs_enabled = 1 "}}}
let g:lsp_signs_error = {'text': '>>'} " #vim-lsp {{{
let g:lsp_signs_warning = {'text': '>'} " https://github.com/prabirshrestha/vim-lsp
let g:lsp_signs_information = {'text': '--'} Plug 'prabirshrestha/async.vim'
let g:lsp_signs_hint = {'text': '--'} Plug 'prabirshrestha/vim-lsp'
let g:lsp_diagnostics_echo_cursor = 1
let g:lsp_diagnostics_echo_delay = 0
nnoremap \l :cclose<CR>:LspDocumentDiagnostics<cr>
nnoremap \h :LspHover<cr>
nnoremap \d :LspDefinition<cr>
nnoremap \r :LspReferences<cr>
nnoremap \n :LspRename<cr>
nnoremap \s :LspDocumentSymbol<cr>
nnoremap \w :LspWorkspaceSymbol<cr>
nnoremap \ff :LspDocumentFormat<cr>
nnoremap \fr :LspDocumentRangeFormat<cr>
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') let g:lsp_signs_enabled = 1
autocmd User lsp_setup call lsp#register_server({ let g:lsp_signs_error = {'text': '>>'}
\ 'name': 'pyls', let g:lsp_signs_warning = {'text': '>'}
\ 'cmd': {server_info->['pyls']}, let g:lsp_signs_information = {'text': '--'}
\ 'whitelist': ['python'], let g:lsp_signs_hint = {'text': '--'}
\ }) let g:lsp_diagnostics_echo_cursor = 1
endif let g:lsp_diagnostics_echo_delay = 0
nnoremap \l :cclose<CR>:LspDocumentDiagnostics<cr>
nnoremap \h :LspHover<cr>
nnoremap \d :LspDefinition<cr>
nnoremap \r :LspReferences<cr>
nnoremap \n :LspRename<cr>
nnoremap \s :LspDocumentSymbol<cr>
nnoremap \w :LspWorkspaceSymbol<cr>
nnoremap \ff :LspDocumentFormat<cr>
nnoremap \fr :LspDocumentRangeFormat<cr>
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
"}}}
if executable('typescript-language-server') "{{{
au User lsp_setup call lsp#register_server({
\ 'name': 'typescript-language-server',
\ 'cmd': { server_info->[&shell, &shellcmdflag, 'typescript-language-server --stdio']},
\ 'root_uri': { server_info->lsp#utils#path_to_uri(lsp#utils#find_nearest_parent_directory(lsp#utils#get_buffer_path(), '.git/..'))},
\ 'whitelist': ['typescript', 'javascript', 'javascript.jsx']
\ })
endif
"}}}
augroup END
if executable('typescript-language-server') ""}}}
au User lsp_setup call lsp#register_server({ " #vim-repeat{{{
\ 'name': 'typescript-language-server', " https://github.com/tpope/vim-repeat
\ 'cmd': { server_info->[&shell, &shellcmdflag, 'typescript-language-server --stdio']}, Plug 'tpope/vim-repeat'
\ 'root_uri': { server_info->lsp#utils#path_to_uri(lsp#utils#find_nearest_parent_directory(lsp#utils#get_buffer_path(), '.git/..'))},
\ 'whitelist': ['typescript', 'javascript', 'javascript.jsx']
\ })
endif
augroup END
"}}} "}}}
" #vim-repeat{{{ "#vim-rsi{{{
" https://github.com/tpope/vim-repeat "https://github.com/tpope/vim-rsi
Plug 'tpope/vim-repeat' Plug 'tpope/vim-rsi'
"}}} "}}}
"#vim-rsi{{{ " #vim-surround{{{
"https://github.com/tpope/vim-rsi Plug 'tpope/vim-surround'
Plug 'tpope/vim-rsi'
"}}} "}}}
" #vim-surround{{{ " #vim-vue {{{
Plug 'tpope/vim-surround' " https://github.com/posva/vim-vue
Plug 'posva/vim-vue'
"}}} " disable preprocessor checking for vue files - increases speed
" #vim-vue {{{ let g:vue_disable_pre_processors=0
" https://github.com/posva/vim-vue " set custom syntax highlighting
Plug 'posva/vim-vue' augroup fixhighlighting
autocmd!
autocmd BufNewFile,BufRead *.vue syntax sync fromstart
augroup END
" disable preprocessor checking for vue files - increases speed " #vim-yaml
let g:vue_disable_pre_processors=0 " https://github.com/stephpy/vim-yaml
" set custom syntax highlighting Plug 'stephpy/vim-yaml'
augroup fixhighlighting
autocmd!
autocmd BufNewFile,BufRead *.vue syntax sync fromstart
augroup END
" #vim-yaml " #python-syntax
" https://github.com/stephpy/vim-yaml " https://github.com/vim-python/python-syntax
Plug 'stephpy/vim-yaml' Plug 'vim-python/python-syntax'
let g:python_highlight_all = 1
" #python-syntax
" https://github.com/vim-python/python-syntax
Plug 'vim-python/python-syntax'
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()}% '
let l:customtabline .= '%#TabLineItem# %{fugitive#statusline()}% ' if exists("*fugitive#statusline")
let l:customtabline .= "%#TabLineItemSel# %{ObsessionStatus(fnamemodify(v:this_session,':t'),'---')} %*" let l:customtabline .= '%#TabLineItem# %{fugitive#statusline()}% '
endif
if exists("*ObsessionStatus")
let l:customtabline .= "%#TabLineItemSel# %{ObsessionStatus(fnamemodify(v:this_session,':t'),'---')} %*"
endif
return l:customtabline return l:customtabline