From 3adcf542289a0883924ae9b9be8b898c36702c95 Mon Sep 17 00:00:00 2001 From: Sam Chudnick Date: Sun, 11 Jun 2023 07:54:59 -0400 Subject: Add some Vim plugins --- .../autoload/devicons/plugins/ctrlp.vim | 30 ++++++++++++++++++ .../autoload/devicons/plugins/denite.vim | 10 ++++++ .../autoload/devicons/plugins/flagship.vim | 15 +++++++++ .../autoload/devicons/plugins/startify.vim | 6 ++++ .../autoload/devicons/plugins/unite.vim | 37 ++++++++++++++++++++++ .../autoload/devicons/plugins/vimfiler.vim | 8 +++++ 6 files changed, 106 insertions(+) create mode 100644 .vim/pack/vendor/start/vim-devicons/autoload/devicons/plugins/ctrlp.vim create mode 100644 .vim/pack/vendor/start/vim-devicons/autoload/devicons/plugins/denite.vim create mode 100644 .vim/pack/vendor/start/vim-devicons/autoload/devicons/plugins/flagship.vim create mode 100644 .vim/pack/vendor/start/vim-devicons/autoload/devicons/plugins/startify.vim create mode 100644 .vim/pack/vendor/start/vim-devicons/autoload/devicons/plugins/unite.vim create mode 100644 .vim/pack/vendor/start/vim-devicons/autoload/devicons/plugins/vimfiler.vim (limited to '.vim/pack/vendor/start/vim-devicons/autoload/devicons') diff --git a/.vim/pack/vendor/start/vim-devicons/autoload/devicons/plugins/ctrlp.vim b/.vim/pack/vendor/start/vim-devicons/autoload/devicons/plugins/ctrlp.vim new file mode 100644 index 0000000..1ea4898 --- /dev/null +++ b/.vim/pack/vendor/start/vim-devicons/autoload/devicons/plugins/ctrlp.vim @@ -0,0 +1,30 @@ +" Initialize for up to date ctrlp fork: ctrlpvim/ctrlp.vim +" Support for kien/ctrlp.vim deprecated since v0.7.0 +" @TODO implementation for CtrlP buffer and find file mode + +function! devicons#plugins#ctrlp#init() abort + let l:ctrlp_warning_message = 'vim-devicons: https://github.com/kien/ctrlp.vim is deprecated since v0.7.0, please use https://github.com/ctrlpvim/ctrlp.vim' + let l:ctrlp_warned_file = webdevicons#pluginHome() . '/status_warned_ctrlp' + + if exists('g:loaded_ctrlp') && g:webdevicons_enable_ctrlp + let l:forkedCtrlp = exists('g:ctrlp_mruf_map_string') + + if l:forkedCtrlp + if !exists('g:ctrlp_formatline_func') + " logic for ctrlpvim/ctrlp.vim: + let g:ctrlp_formatline_func = 's:formatline(s:curtype() == "buf" ? v:val : WebDevIconsGetFileTypeSymbol(v:val) . " " . v:val) ' + endif + elseif empty(glob(l:ctrlp_warned_file)) + " logic for kien/ctrlp.vim: + echohl WarningMsg | + \ echomsg l:ctrlp_warning_message + " only warn first time, do not warn again: + try + execute writefile(['File automatically generated after warning about CtrlP once', l:ctrlp_warning_message], l:ctrlp_warned_file) + catch + endtry + endif + endif +endfunction + +" vim: tabstop=2 softtabstop=2 shiftwidth=2 expandtab: diff --git a/.vim/pack/vendor/start/vim-devicons/autoload/devicons/plugins/denite.vim b/.vim/pack/vendor/start/vim-devicons/autoload/devicons/plugins/denite.vim new file mode 100644 index 0000000..5884644 --- /dev/null +++ b/.vim/pack/vendor/start/vim-devicons/autoload/devicons/plugins/denite.vim @@ -0,0 +1,10 @@ +function! devicons#plugins#denite#init() abort + let s:denite_ver = (exists('*denite#get_status_mode') ? 2 : 3) + if s:denite_ver == 3 + call denite#custom#source('file,file/rec,file_mru,file/old,buffer,directory/rec,directory_mru', 'converters', ['devicons_denite_converter']) + else + call denite#custom#source('file,file_rec,file_mru,file_old,buffer,directory_rec,directory_mru', 'converters', ['devicons_denite_converter']) + endif +endfunction + +" vim: tabstop=2 softtabstop=2 shiftwidth=2 expandtab: diff --git a/.vim/pack/vendor/start/vim-devicons/autoload/devicons/plugins/flagship.vim b/.vim/pack/vendor/start/vim-devicons/autoload/devicons/plugins/flagship.vim new file mode 100644 index 0000000..f67103c --- /dev/null +++ b/.vim/pack/vendor/start/vim-devicons/autoload/devicons/plugins/flagship.vim @@ -0,0 +1,15 @@ +function! devicons#plugins#flagship#init() abort + if g:webdevicons_enable_flagship_statusline + augroup webdevicons_flagship_filetype + autocmd User Flags call Hoist('buffer', 'WebDevIconsGetFileTypeSymbol') + augroup END + endif + + if g:webdevicons_enable_flagship_statusline_fileformat_symbols + augroup webdevicons_flagship_filesymbol + autocmd User Flags call Hoist('buffer', 'WebDevIconsGetFileFormatSymbol') + augroup END + endif +endfunction + +" vim: tabstop=2 softtabstop=2 shiftwidth=2 expandtab: diff --git a/.vim/pack/vendor/start/vim-devicons/autoload/devicons/plugins/startify.vim b/.vim/pack/vendor/start/vim-devicons/autoload/devicons/plugins/startify.vim new file mode 100644 index 0000000..f3c2d12 --- /dev/null +++ b/.vim/pack/vendor/start/vim-devicons/autoload/devicons/plugins/startify.vim @@ -0,0 +1,6 @@ + +function! devicons#plugins#startify#init() abort + exec ":function! StartifyEntryFormat() abort \n return 'WebDevIconsGetFileTypeSymbol(absolute_path) .\" \". entry_path' \n endfunction" +endfunction + +" vim: tabstop=2 softtabstop=2 shiftwidth=2 expandtab: diff --git a/.vim/pack/vendor/start/vim-devicons/autoload/devicons/plugins/unite.vim b/.vim/pack/vendor/start/vim-devicons/autoload/devicons/plugins/unite.vim new file mode 100644 index 0000000..c40924a --- /dev/null +++ b/.vim/pack/vendor/start/vim-devicons/autoload/devicons/plugins/unite.vim @@ -0,0 +1,37 @@ +function! devicons#plugins#unite#init() abort + let s:filters = { + \ 'name': 'devicons_unite_converter' + \ } + + function! s:filters.filter(candidates, context) abort + for candidate in a:candidates + + if has_key(candidate, 'action__buffer_nr') + let bufname = bufname(candidate.action__buffer_nr) + let filename = fnamemodify(bufname, ':p:t') + let path = fnamemodify(bufname, ':p:h') + elseif has_key(candidate, 'word') && has_key(candidate, 'action__path') + let path = candidate.action__path + let filename = candidate.word + endif + + let icon = WebDevIconsGetFileTypeSymbol(filename, isdirectory(filename)) + + " prevent filenames of buffers getting 'lost' + if filename != path + let path = printf('%s', filename) + endif + + " Customize output format. + let candidate.abbr = printf('%s %s', icon, path) + endfor + return a:candidates + endfunction + + call unite#define_filter(s:filters) + unlet s:filters + + call unite#custom#source('file,file_rec,buffer,file_rec/async,file_rec/neovim,file_rec/neovim2,file_rec/git', 'converters', 'devicons_unite_converter') +endfunction + +" vim: tabstop=2 softtabstop=2 shiftwidth=2 expandtab: diff --git a/.vim/pack/vendor/start/vim-devicons/autoload/devicons/plugins/vimfiler.vim b/.vim/pack/vendor/start/vim-devicons/autoload/devicons/plugins/vimfiler.vim new file mode 100644 index 0000000..62e6c3d --- /dev/null +++ b/.vim/pack/vendor/start/vim-devicons/autoload/devicons/plugins/vimfiler.vim @@ -0,0 +1,8 @@ +function! devicons#plugins#vimfiler#init() abort + call vimfiler#custom#profile('default', 'context', { + \ 'columns': 'devicons:size:time', + \ 'explorer_columns': 'devicons' + \ }) +endfunction + +" vim: tabstop=2 softtabstop=2 shiftwidth=2 expandtab: -- cgit v1.2.3