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 --- .../extensions/tabline/formatters/webdevicons.vim | 14 + .../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 + .../autoload/vimfiler/columns/devicons.vim | 80 ++ .../vendor/start/vim-devicons/doc/webdevicons.txt | 1078 ++++++++++++++++++++ .../vim-devicons/nerdtree_plugin/webdevicons.vim | 389 +++++++ .../start/vim-devicons/plugin/webdevicons.vim | 703 +++++++++++++ .../vim-devicons/pythonx/vim_devicons/__init__.py | 2 + .../pythonx/vim_devicons/powerline/__init__.py | 2 + .../pythonx/vim_devicons/powerline/segments.py | 28 + .../denite/filter/devicons_denite_converter.py | 31 + .vim/pack/vendor/start/vim-devicons/test/.themisrc | 1 + .../start/vim-devicons/test/default_setting.vim | 39 + .../vendor/start/vim-devicons/test/fileformat.vim | 29 + .../vendor/start/vim-devicons/test/filetype.vim | 344 +++++++ 19 files changed, 2846 insertions(+) create mode 100644 .vim/pack/vendor/start/vim-devicons/autoload/airline/extensions/tabline/formatters/webdevicons.vim 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 create mode 100644 .vim/pack/vendor/start/vim-devicons/autoload/vimfiler/columns/devicons.vim create mode 100644 .vim/pack/vendor/start/vim-devicons/doc/webdevicons.txt create mode 100644 .vim/pack/vendor/start/vim-devicons/nerdtree_plugin/webdevicons.vim create mode 100644 .vim/pack/vendor/start/vim-devicons/plugin/webdevicons.vim create mode 100644 .vim/pack/vendor/start/vim-devicons/pythonx/vim_devicons/__init__.py create mode 100644 .vim/pack/vendor/start/vim-devicons/pythonx/vim_devicons/powerline/__init__.py create mode 100644 .vim/pack/vendor/start/vim-devicons/pythonx/vim_devicons/powerline/segments.py create mode 100644 .vim/pack/vendor/start/vim-devicons/rplugin/python3/denite/filter/devicons_denite_converter.py create mode 100644 .vim/pack/vendor/start/vim-devicons/test/.themisrc create mode 100644 .vim/pack/vendor/start/vim-devicons/test/default_setting.vim create mode 100644 .vim/pack/vendor/start/vim-devicons/test/fileformat.vim create mode 100644 .vim/pack/vendor/start/vim-devicons/test/filetype.vim (limited to '.vim/pack/vendor/start/vim-devicons') diff --git a/.vim/pack/vendor/start/vim-devicons/autoload/airline/extensions/tabline/formatters/webdevicons.vim b/.vim/pack/vendor/start/vim-devicons/autoload/airline/extensions/tabline/formatters/webdevicons.vim new file mode 100644 index 0000000..c298025 --- /dev/null +++ b/.vim/pack/vendor/start/vim-devicons/autoload/airline/extensions/tabline/formatters/webdevicons.vim @@ -0,0 +1,14 @@ +" Version: 0.11.0 +" Webpage: https://github.com/ryanoasis/vim-devicons +" Maintainer: Ryan McIntyre +" License: see LICENSE + +function! airline#extensions#tabline#formatters#webdevicons#format(bufnr, buffers) abort + " Call original formatter. + let originalFormatter = airline#extensions#tabline#formatters#{g:_webdevicons_airline_orig_formatter}#format(a:bufnr, a:buffers) + return originalFormatter . g:WebDevIconsTabAirLineBeforeGlyphPadding . + \ WebDevIconsGetFileTypeSymbol(bufname(a:bufnr)) . g:WebDevIconsTabAirLineAfterGlyphPadding +endfunction + +" modeline syntax: +" vim: fdm=marker tabstop=2 softtabstop=2 shiftwidth=2 expandtab: 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: diff --git a/.vim/pack/vendor/start/vim-devicons/autoload/vimfiler/columns/devicons.vim b/.vim/pack/vendor/start/vim-devicons/autoload/vimfiler/columns/devicons.vim new file mode 100644 index 0000000..d11ee22 --- /dev/null +++ b/.vim/pack/vendor/start/vim-devicons/autoload/vimfiler/columns/devicons.vim @@ -0,0 +1,80 @@ +"============================================================================= +" FILE: devicons.vim +" Version: 0.11.0 +" Webpage: https://github.com/ryanoasis/vim-devicons +" Maintainer: Ryan McIntyre +" License: MIT license {{{ +" Permission is hereby granted, free of charge, to any person obtaining +" a copy of this software and associated documentation files (the +" "Software"), to deal in the Software without restriction, including +" without limitation the rights to use, copy, modify, merge, publish, +" distribute, sublicense, and/or sell copies of the Software, and to +" permit persons to whom the Software is furnished to do so, subject to +" the following conditions: +" +" The above copyright notice and this permission notice shall be included +" in all copies or substantial portions of the Software. +" +" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +" IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +" CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +" TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +" SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +" }}} +"============================================================================= + +let s:save_cpo = &cpo +set cpo&vim + +function! vimfiler#columns#devicons#define() abort + return s:column +endfunction + +let s:column = { + \ 'name' : 'devicons', + \ 'description' : 'get devicon glyph', + \ 'syntax' : 'vimfilerColumn__devicons', + \ } + +function! s:column.length(files, context) abort + return 3 +endfunction + +function! s:column.define_syntax(context) abort "{{{ + syntax match vimfilerColumn__TypeText '\[T\]' + \ contained containedin=vimfilerColumn__Type + syntax match vimfilerColumn__TypeImage '\[I\]' + \ contained containedin=vimfilerColumn__Type + syntax match vimfilerColumn__TypeArchive '\[A\]' + \ contained containedin=vimfilerColumn__Type + syntax match vimfilerColumn__TypeExecute '\[X\]' + \ contained containedin=vimfilerColumn__Type + syntax match vimfilerColumn__TypeMultimedia '\[M\]' + \ contained containedin=vimfilerColumn__Type + syntax match vimfilerColumn__TypeDirectory '\[do\]' + \ contained containedin=vimfilerColumn__Type + syntax match vimfilerColumn__TypeSystem '\[S\]' + \ contained containedin=vimfilerColumn__Type + syntax match vimfilerColumn__TypeLink '\[L\]' + \ contained containedin=vimfilerColumn__Type + + highlight def link vimfilerColumn__TypeText Constant + highlight def link vimfilerColumn__TypeImage Type + highlight def link vimfilerColumn__TypeArchive Special + highlight def link vimfilerColumn__TypeExecute Statement + highlight def link vimfilerColumn__TypeMultimedia Identifier + highlight def link vimfilerColumn__TypeDirectory Preproc + highlight def link vimfilerColumn__TypeSystem Comment + highlight def link vimfilerColumn__TypeLink Comment +endfunction"}}} + +function! s:column.get(file, context) abort + return WebDevIconsGetFileTypeSymbol(strpart(a:file.action__path, strridx(a:file.action__path, '/')), a:file.vimfiler__is_directory) +endfunction + +let &cpo = s:save_cpo +unlet s:save_cpo + +" vim: foldmethod=marker diff --git a/.vim/pack/vendor/start/vim-devicons/doc/webdevicons.txt b/.vim/pack/vendor/start/vim-devicons/doc/webdevicons.txt new file mode 100644 index 0000000..c1f5db1 --- /dev/null +++ b/.vim/pack/vendor/start/vim-devicons/doc/webdevicons.txt @@ -0,0 +1,1078 @@ +*devicons* + +=============================================================================== +Contents ~ + + 1. Introduction |devicons-introduction| + 2. Features |devicons-features| + 3. Installation |devicons-installation| + 4. Developers |devicons-developers| + 5. Troubleshooting |devicons-troubleshooting| + 6. Contributing |devicons-contributing| + 1. Code of Conduct [22] |devicons-code-of-conduct-22| + 2. Contributing Guide [23] |devicons-contributing-guide-23| + 3. Promotion |devicons-promotion| + 7. Acknowledgments |devicons-acknowledgments| + 8. License |devicons-license| + 9. Detailed Installation |devicons-detailed-installation| + 1. Step 1 'Nerd Font' |Nerd-Font| + 2. Step 2 'VimDevIcons Plugin' |VimDevIcons-Plugin| + 1. Pathogen [38] |devicons-pathogen-38| + 2. NeoBundle [39] |devicons-neobundle-39| + 3. Vundle [40] |devicons-vundle-40| + 4. Manual |devicons-manual| + 3. Step 3 'Configure Vim' |Configure-Vim| + 1. Set Encoding |devicons-set-encoding| + 2. Set Font |devicons-set-font| + 3. vim-airline |devicons-vim-airline| + 4. vimrc examples |devicons-vimrc-examples| + 4. That's it! You're done. |devicons-thats-it-youre-done.| + 10. Usage |devicons-usage| + 1. NERDTree |devicons-nerdtree| + 2. Unite |devicons-unite| + 3. Denite |devicons-denite| + 4. Vimfiler |devicons-vimfiler| + 5. CtrlP |devicons-ctrlp| + 6. Airline |devicons-airline| + 7. Startify |devicons-startify| + 8. Lightline Setup |devicons-lightline-setup| + 9. Powerline Setup |devicons-powerline-setup| + 10. Flagship |devicons-flagship| + 11. Detailed Features |devicons-detailed-features| + 12. Extra Configuration |devicons-extra-configuration| + 1. Character Mappings |devicons-character-mappings| + 2. API |devicons-api| + 1. Public Methods |devicons-public-methods| + 2. API Examples |devicons-api-examples| + 1. Status line |devicons-status-line| + 2. Simple function call |devicons-simple-function-call| + 3. Integration with other plugins |devicons-integration-with-other-plugins| + 1. vim-startify |devicons-vim-startify| + 13. FAQ |devicons-faq| + 1. Why isn't it working? How come I don't see any icons? |devicons-why-isnt-it-working-how-come-i-dont-see-any-icons| + 2. How did you get color matching based on file type in NERDtree? |devicons-how-did-you-get-color-matching-based-on-file-type-in-nerdtree| + 3. How did you get color matching on just the glyph/icon in NERDtree? |devicons-how-did-you-get-color-matching-on-just-glyph-icon-in-nerdtree| + 4. How do I solve issues after re-sourcing my |vimrc|? + 5. Why do I have artifacts after (or instead) of icons? |devicons-why-do-i-have-artifacts-after-of-icons| + 6. Square brackets around icons |devicons-square-brackets-around-icons| + 1. from terminal |devicons-from-terminal| + 7. Do I have to use a patched font such as Nerd Fonts? |devicons-do-i-have-to-use-patched-font-such-as-nerd-fonts| + 8. Rationale: Why does this exist? How did this start? |devicons-rationale-why-does-this-exist-how-did-this-start| + 14. References |devicons-references| + +=============================================================================== + *devicons-introduction* +Introduction ~ +> + _ ___ ____ ____ + | | / (_____ ___ / __ \___ _ __/ _/________ ____ _____ + | | / / / __ `__ \/ / / / _ | | / // // ___/ __ \/ __ \/ ___/ + | |/ / / / / / / / /_/ / __| |/ _/ // /__/ /_/ / / / (__ ) + |___/_/_/ /_/ /_/_____/\___/|___/___/\___/\____/_/ /_/____/ +< +**VimDevIcons** + +Adds Icons to Your Plugins + +Supports plugins such as NERDTree [1], vim-airline [2], CtrlP [3], powerline +[4], denite [5], unite [6], lightline.vim [7], vim-startify [8], vimfiler [9], +vim-workspace [10] and flagship [11]. + +See Screenshots [12] for more. + +=============================================================================== + *devicons-features* +Features ~ + +- Adds filetype glyphs (icons) to various vim plugins. +- Supports byte order marker (BOM). +- Customizable and extendable glyphs settings. +- Supports a wide range of file type extensions. +- Supports popular full filenames, like '.gitignore', 'node_modules', + '.vimrc'. +- Works with patched fonts, especially Nerd Fonts [13]. + +See Detailed Features [14] for more. + +See Configuration [15] for a list of configuration and customization options. + +=============================================================================== + *devicons-installation* +Installation ~ + +1. Install a Nerd Font compatible font [16] or patch your own [17]. Then set + your terminal font (or 'guifont' if you are using GUI version of Vim). + +2. Install the Vim plugin with your favorite plugin manager, e.g. vim-plug + [18]: + + "vim Plug 'ryanoasis/vim-devicons'" + + Always load the vim-devicons as the very last one. + +3. Configure Vim + + 'vim set encoding=UTF-8' + + No need to set explicitly under Neovim: always uses UTF-8 as the default + encoding. + +See Installation [19] for detailed setup instructions + +Use ':help devicons' for further configuration. + +=============================================================================== + *devicons-developers* +Developers ~ + +See DEVELOPER [20] for how to use the API. + +=============================================================================== + *devicons-troubleshooting* +Troubleshooting ~ + +See FAQ [21]. + +=============================================================================== + *devicons-contributing* +Contributing ~ + +------------------------------------------------------------------------------- + *devicons-code-of-conduct-22* +Code of Conduct [22] ~ + +This project has adopted a Code of Conduct that we expect project participants +to adhere to. Check out code of conduct [22] for further details. + +------------------------------------------------------------------------------- + *devicons-contributing-guide-23* +Contributing Guide [23] ~ + +Read our contributing [23] guide to learn about how to send pull requests, +creating issues properly. + +------------------------------------------------------------------------------- + *devicons-promotion* +Promotion ~ + +You can help us by simply giving a star or voting on vim.org. It will ensure +continued development going forward. + +- Star this repository on GitHub [24]. +- Vote for it on vim.org [25]. + +=============================================================================== + *devicons-acknowledgments* +Acknowledgments ~ + +Thanks goes to these people for inspiration and helping with sending PRs. + +- vim-airline [2] +- nerdtree [1] +- nerdtree-git-plugin [26] by @Xuyuanp [27] +- seti-ui [28] by @jesseweed [29] +- devicons [30] by @vorillaz [31] +- development.svg.icons [32] by @benatespina [33] +- Learn Vimscript the Hard Way [34] book by Steve Losh [35] +- All contributors [36] + +=============================================================================== + *devicons-license* +License ~ + +MIT [37] + +=============================================================================== + *devicons-detailed-installation* +Detailed Installation ~ + +------------------------------------------------------------------------------- + *Nerd-Font* +Step 1 'Nerd Font' ~ + +Get a **Nerd Font!** [16] or patch your own. [17] Without this, things break + +------------------------------------------------------------------------------- + *VimDevIcons-Plugin* +Step 2 'VimDevIcons Plugin' ~ + +**Set VimDevIcons to load _after_ these plugins!** + +NERDTree [1] | vim-airline [2] | CtrlP [3] | powerline [4] | Denite [5] | unite +[6] | lightline.vim [7] | vim-startify [8] | vimfiler [9] | flagship [11] + +Choose your favorite plugin manager + +------------------------------------------------------------------------------- + *devicons-pathogen-38* +Pathogen [38] ~ + +- 'git clone https://github.com/ryanoasis/vim-devicons ~/.vim/bundle/vim- + devicons' + +------------------------------------------------------------------------------- + *devicons-neobundle-39* +NeoBundle [39] ~ + +- Add to vimrc: + + "vim NeoBundle 'ryanoasis/vim-devicons'" * And install it: + + 'vim :so ~/.vimrc :NeoBundleInstall' + +------------------------------------------------------------------------------- + *devicons-vundle-40* +Vundle [40] ~ + +- Add to vimrc: + + "vim Plugin 'ryanoasis/vim-devicons'" * And install it: + + 'vim :so ~/.vimrc :PlugInstall' + +------------------------------------------------------------------------------- + *devicons-manual* +Manual ~ + +- copy all of the files into your '~/.vim' directory + +------------------------------------------------------------------------------- + *Configure-Vim* +Step 3 'Configure Vim' ~ + +Add the following in your '.vimrc' or '.gvimrc': + +------------------------------------------------------------------------------- + *devicons-set-encoding* +Set Encoding ~ + +**Set encoding to UTF-8 to show glyphs** + +'vim set encoding=utf8' + +------------------------------------------------------------------------------- + *devicons-set-font* +Set Font ~ + +**Set Vim font to a Nerd Font** + +Linux 'vim set guifont=' +> + set guifont=DroidSansMono\ Nerd\ Font\ 11 +< +macOS (OS X) and Windows +> + set guifont=:h +< + +> + set guifont=DroidSansMono\ Nerd\ Font:h11 + " or: + set guifont=DroidSansMono_Nerd_Font:h11 +< +**Note:** if you don't set 'guifont' then you'll have to set your terminal's +font, else things break! + +------------------------------------------------------------------------------- + *devicons-vim-airline* +vim-airline ~ + +**If you use vim-airline you need this:** + +'vim let g:airline_powerline_fonts = 1' + +------------------------------------------------------------------------------- + *devicons-vimrc-examples* +vimrc examples ~ + +- Sample Windows vimrc configuration 1 [41] +- Sample Linux vimrc configuration 1 [42] + +------------------------------------------------------------------------------- + *devicons-thats-it-youre-done.* +That's it! You're done. ~ + +=============================================================================== + *devicons-usage* +Usage ~ + +If you installed and setup things correctly you should now see icons in the +supported plugins! + +**Notes on include order:** _for support of these plugins: NERDTree [1], vim- +airline [2], CtrlP [3], powerline [4], Denite [5], unite [6], vimfiler [9], +flagship [11] you **must** configure vim to load those plugins__before_ vim- +devicons loads. for better nerdtree-git-plugin [26] support, you _should_ +configure vim to load nerdtree-git-plugin **_before_** VimDevIcons loads. * if +you are lazy loading Denite [5] using the Dein plugin manager, you will need to +source VimDevIcons before Denite loads. + +Lightline Setup and Powerline Setup require some extra setup as shown below: + +------------------------------------------------------------------------------- + *devicons-nerdtree* +NERDTree ~ + +Should work "out of the box", no particular configuration should be needed. +> + " Can be enabled or disabled + let g:webdevicons_enable_nerdtree = 1 +< + +> + " whether or not to show the nerdtree brackets around flags + let g:webdevicons_conceal_nerdtree_brackets = 1 +< +------------------------------------------------------------------------------- + *devicons-unite* +Unite ~ + +Should work "out of the box", no particular configuration should be needed. +> + " Can be enabled or disabled + " adding the custom source to unite + let g:webdevicons_enable_unite = 1 +< +------------------------------------------------------------------------------- + *devicons-denite* +Denite ~ + +Should work "out of the box", no particular configuration should be needed. +> + " Can be enabled or disabled + " Adding the custom source to denite + let g:webdevicons_enable_denite = 1 +< +------------------------------------------------------------------------------- + *devicons-vimfiler* +Vimfiler ~ + +Should work "out of the box", no particular configuration should be needed. +> + " Can be enabled or disabled + " adding the column to vimfiler + let g:webdevicons_enable_vimfiler = 1 +< +------------------------------------------------------------------------------- + *devicons-ctrlp* +CtrlP ~ + +Should work "out of the box", no particular configuration should be needed. +> + " Can be enabled or disabled + " add glyphs to all modes + let g:webdevicons_enable_ctrlp = 1 +< +------------------------------------------------------------------------------- + *devicons-airline* +Airline ~ + +Should work "out of the box", no particular configuration should be needed. +> + " adding to vim-airline's tabline + let g:webdevicons_enable_airline_tabline = 1 +< + +> + " adding to vim-airline's statusline + let g:webdevicons_enable_airline_statusline = 1 +< +------------------------------------------------------------------------------- + *devicons-startify* +Startify ~ + +Should work "out of the box", no particular configuration should be needed. +> + " Can be enabled or disabled + " adding to vim-startify screen + let g:webdevicons_enable_startify = 1 +< +------------------------------------------------------------------------------- + *devicons-lightline-setup* +Lightline Setup ~ + +To add the appropriate icon to lightline [7], call the function +'WebDevIconsGetFileTypeSymbol()' and/or 'WebDevIconsGetFileFormatSymbol()' in +your '.vimrc'. For example, you could set your sections to: +> + let g:lightline = { + \ 'component_function': { + \ 'filetype': 'MyFiletype', + \ 'fileformat': 'MyFileformat', + \ } + \ } + + function! MyFiletype() + return winwidth(0) > 70 ? (strlen(&filetype) ? &filetype . ' ' . WebDevIconsGetFileTypeSymbol() : 'no ft') : '' + endfunction + + function! MyFileformat() + return winwidth(0) > 70 ? (&fileformat . ' ' . WebDevIconsGetFileFormatSymbol()) : '' + endfunction +< +------------------------------------------------------------------------------- + *devicons-powerline-setup* +Powerline Setup ~ + +- _Note this is for the current Powerline [4] not the deprecated vim- + powerline [43]_ + +To enable for Powerline [4] some |vimrc| and powerline configuration changes +are needed: + +|vimrc| changes (only required if you don't already have powerline setup for +vim): +> + set rtp+=$HOME/.local/lib/python2.7/site-packages/powerline/bindings/vim/ + + " Always show statusline + set laststatus=2 + + " Use 256 colours (Use this setting only if your terminal supports 256 colours) + set t_Co=256 +< +powerline configuration changes: + +file type segment +> + { + "function": "vim_devicons.powerline.segments.webdevicons", + "priority": 10, + "draw_soft_divider": false, + "after": " " + } +< +file format segment +> + { + "function": "vim_devicons.powerline.segments.webdevicons_file_format", + "draw_soft_divider": false, + "exclude_modes": ["nc"], + "priority": 90 + } +< +for full example see sample file [44] + +------------------------------------------------------------------------------- + *devicons-flagship* +Flagship ~ + +Should work "out of the box", no particular configuration should be needed. +> + " Can be enabled or disabled + " adding to flagship's statusline + let g:webdevicons_enable_flagship_statusline = 1 +< +=============================================================================== + *devicons-detailed-features* +Detailed Features ~ + +- Adds filetype glyphs (icons) to various vim plugins, currently supports: + +- NERDTree [1] + + - Using the version hosted on vimscripts [45] in favor of GitHub will + lead to a outdated message, and icons will fail to show. + +- vim-airline [2] (statusline and tabline) + +- CtrlP [3] (All modes now supported) + + - Using the version hosted on vimscripts [46] in favor of GitHub will + lead to a outdated message, and icons will fail to show. + +- powerline [4] (statusline) + + - see: powerline setup + +- Denite [5] + + - Currently supports 'file_rec', 'file_old', 'buffer', and + 'directory_rec' + +- unite [6] + + - Currently supports 'file', 'file_rec', 'buffer', 'file_rec/async', and + 'file_rec/neovim' + +- lightline.vim [7] (statusline) + + - see: lightline setup + +- vim-startify [8] + +- vimfiler [9] + +- flagship [11] + + - Support is **experimental** because the API may be changing [47] + +- vim-workspace [10] + +- Supports byte order marker (BOM) + +- Customizable and extendable glyphs (icons) settings + +- ability to override defaults and use your own characters or glyphs + +- Supports a wide range of file type extensions by default: + +- 'styl, sass, scss, htm, html, slim, ejs, css, less, md, rmd, json, js, jsx, + rb, php, py, pyc, pyd, pyo, coffee, mustache, hbs, conf, ini, yml, yaml, + bat, jpg, jpeg, bmp, png, gif, twig, cpp, c++, cxx, cc, cp, c, h, hpp, hxx, + hs, lhs, lua, java, sh, bash, zsh, ksh, csh, awk, ps1, fish, diff, db, clj, + cljs, edn, scala, go, dart, xul, sln, suo, pl, pm, t, rss, f#, fsscript, + fsx, fs, fsi, rs, rlib, d, erl, hrl, vim, ai, psd, psb, ts, jl, pp, vue, + swift, eex, ex, exs' + +- Supports a few full filename matches, by default: + +- 'gruntfile.coffee, gruntfile.js, gruntfile.ls, gulpfile.coffee, + gulpfile.js, gulpfile.ls, dropbox, .ds_store, .gitconfig, .gitignore, + .bashrc, .zshrc, .vimrc, .bashprofile, favicon.ico, license, node_modules, + react.jsx, procfile' + +- Supports a few library pattern matches, by default: + +- 'jquery, angular, backbone, requirejs, materialize, mootools, Vagrantfile' + +- Works with patched fonts, especially Nerd Fonts [13] + +=============================================================================== + *devicons-extra-configuration* +Extra Configuration ~ + +- These options can be defined in your |vimrc| or 'gvimrc' + +- Most options are enabled **'1'** by default but can be disabled with + **'0'** + +- You _should_**not** need to configure anything, however, the following + options are provided for customizing or changing the defaults: +> + " loading the plugin + let g:webdevicons_enable = 1 +< + +> + " adding the flags to NERDTree + let g:webdevicons_enable_nerdtree = 1 +< + +> + " adding the custom source to unite + let g:webdevicons_enable_unite = 1 +< + +> + " adding the column to vimfiler + let g:webdevicons_enable_vimfiler = 1 +< + +> + " adding to vim-airline's tabline + let g:webdevicons_enable_airline_tabline = 1 +< + +> + " adding to vim-airline's statusline + let g:webdevicons_enable_airline_statusline = 1 +< + +> + " ctrlp glyphs + let g:webdevicons_enable_ctrlp = 1 +< + +> + " adding to vim-startify screen + let g:webdevicons_enable_startify = 1 +< + +> + " adding to flagship's statusline + let g:webdevicons_enable_flagship_statusline = 1 +< + +> + " turn on/off file node glyph decorations (not particularly useful) + let g:WebDevIconsUnicodeDecorateFileNodes = 1 +< + +> + " use double-width(1) or single-width(0) glyphs + " only manipulates padding, has no effect on terminal or set(guifont) font + let g:WebDevIconsUnicodeGlyphDoubleWidth = 1 +< + +> + " whether or not to show the nerdtree brackets around flags + let g:webdevicons_conceal_nerdtree_brackets = 1 +< + +> + " the amount of space to use after the glyph character (default ' ') + let g:WebDevIconsNerdTreeAfterGlyphPadding = ' ' +< + +> + " Force extra padding in NERDTree so that the filetype icons line up vertically + let g:WebDevIconsNerdTreeGitPluginForceVAlign = 1 +< + +> + " Adding the custom source to denite + let g:webdevicons_enable_denite = 1 + + + + " the amount of space to use after the glyph character in vim-airline + tabline(default '') + let g:WebDevIconsTabAirLineAfterGlyphPadding = ' ' + + + + " the amount of space to use before the glyph character in vim-airline + tabline(default ' ') + let g:WebDevIconsTabAirLineBeforeGlyphPadding = ' ' +< +------------------------------------------------------------------------------- + *devicons-character-mappings* +Character Mappings ~ + +- 'ƛ' is used as an example below, substitute for the glyph you **actually** + want to use +> + " change the default character when no match found + let g:WebDevIconsUnicodeDecorateFileNodesDefaultSymbol = 'ƛ' +< + +> + " set a byte character marker (BOM) utf-8 symbol when retrieving file encoding + " disabled by default with no value + let g:WebDevIconsUnicodeByteOrderMarkerDefaultSymbol = '' +< + +> + " enable folder/directory glyph flag (disabled by default with 0) + let g:WebDevIconsUnicodeDecorateFolderNodes = 1 +< + +> + " enable open and close folder/directory glyph flags (disabled by default with 0) + let g:DevIconsEnableFoldersOpenClose = 1 +< + +> + " enable pattern matching glyphs on folder/directory (enabled by default with 1) + let g:DevIconsEnableFolderPatternMatching = 1 +< + +> + " enable file extension pattern matching glyphs on folder/directory (disabled by default with 0) + let g:DevIconsEnableFolderExtensionPatternMatching = 0 +< + +> + " disable showing the distribution for unix file encoding (enabled by default with 1) + let g:DevIconsEnableDistro = 0 +< + +> + " enable custom folder/directory glyph exact matching + " (enabled by default when g:WebDevIconsUnicodeDecorateFolderNodes is set to 1) + let WebDevIconsUnicodeDecorateFolderNodesExactMatches = 1 +< + +> + " change the default folder/directory glyph/icon + let g:WebDevIconsUnicodeDecorateFolderNodesDefaultSymbol = 'ƛ' +< + +> + " change the default open folder/directory glyph/icon (default is '') + let g:DevIconsDefaultFolderOpenSymbol = 'ƛ' +< + +> + " change the default dictionary mappings for file extension matches + + let g:WebDevIconsUnicodeDecorateFileNodesExtensionSymbols = {} " needed + let g:WebDevIconsUnicodeDecorateFileNodesExtensionSymbols['js'] = 'ƛ' +< + +> + " change the default dictionary mappings for exact file node matches + + let g:WebDevIconsUnicodeDecorateFileNodesExactSymbols = {} " needed + let g:WebDevIconsUnicodeDecorateFileNodesExactSymbols['MyReallyCoolFile.okay'] = 'ƛ' +< + +> + " add or override individual additional filetypes + + let g:WebDevIconsUnicodeDecorateFileNodesExtensionSymbols = {} " needed + let g:WebDevIconsUnicodeDecorateFileNodesExtensionSymbols['myext'] = 'ƛ' +< + +> + " add or override pattern matches for filetypes + " these take precedence over the file extensions + + let g:WebDevIconsUnicodeDecorateFileNodesPatternSymbols = {} " needed + let g:WebDevIconsUnicodeDecorateFileNodesPatternSymbols['.*jquery.*\.js$'] = 'ƛ' +< +specify OS to decide an icon for unix fileformat (_not_ defined by default) - +this is useful for avoiding unnecessary 'system()' call. see #135 [48] for +further details. +> + let g:WebDevIconsOS = 'Darwin' +< +------------------------------------------------------------------------------- + *devicons-api* +API ~ +> + " returns the font character that represents the icon + " parameters: a:1 (filename), a:2 (isDirectory) + " both parameters optional + " by default without parameters uses buffer name + WebDevIconsGetFileTypeSymbol(...) + + " returns the font character that represents + " the file format as an icon (windows, linux, mac) + WebDevIconsGetFileFormatSymbol() +< +------------------------------------------------------------------------------- + *devicons-public-methods* +Public Methods ~ +> + " Returns the current version of the plugin + webdevicons#version() +< + +> + " Calls webdevicons#softRefresh() + " basically a backwards compatibility convenience + webdevicons#refresh() +< + +> + " Does a 'hard' refresh of NERDTree + " resets vim-devicons syntax and closes and reopens NERDTree + webdevicons#hardRefresh() +< + +> + " Does a 'soft' refresh of NERDTree + " resets vim-devicons syntax and toggles NERDTree to the same state + webdevicons#softRefresh() +< +------------------------------------------------------------------------------- + *devicons-api-examples* +API Examples ~ + +------------------------------------------------------------------------------- + *devicons-status-line* +Status line ~ + +Custom vim status line (not relying on vim-airline or lightline): +> + set statusline=%f\ %{WebDevIconsGetFileTypeSymbol()}\ %h%w%m%r\ %=%(%l,%c%V\ %Y\ %=\ %P%) +< +------------------------------------------------------------------------------- + *devicons-simple-function-call* +Simple function call ~ +> + echo WebDevIconsGetFileFormatSymbol() +< +------------------------------------------------------------------------------- + *devicons-integration-with-other-plugins* +Integration with other plugins ~ + +------------------------------------------------------------------------------- + *devicons-vim-startify* +vim-startify ~ +> + let entry_format = "' ['. index .']'. repeat(' ', (3 - strlen(index)))" + + if exists('*WebDevIconsGetFileTypeSymbol') " support for vim-devicons + let entry_format .= ". WebDevIconsGetFileTypeSymbol(entry_path) .' '. entry_path" + else + let entry_format .= '. entry_path' + endif +< +=============================================================================== + *devicons-faq* +FAQ ~ + +**Table of Contents:** + +**It's not working at all:** + +- **Why isn't it working? How come I don't see any icons?** + +**Syntax or color highlighting:** + +- **How did you get color matching based on file type in NERDtree?** +- **How did you get color matching on just the glyph/icon in NERDtree?** + +**Re-sourcing |vimrc|:** + +- **How do I solve issues after re-sourcing my |vimrc|?** + +**Weird artifacts after/on the glyphs:** + +- **Why do I have artifacts after (or instead) of icons?** +- **Square brackets around icons?** + +**Fonts:** + +- **Do I have to use a patched font such as Nerd Fonts?** + +**Why does this exist? How did this start?** + +------------------------------------------------------------------------------- + *devicons-why-isnt-it-working-how-come-i-dont-see-any-icons* +Why isn't it working? How come I don't see any icons? ~ + +- Are you using the patched font provided in the separate repo (Nerd Fonts + [13]) or are you patching your own? + +- _NOTE:_ if running vim and no font set it will default to the terminal font + that is set + +- check what the vim/gvim font is set to, from ex mode: + + 'vim :set guifont?' + +- check if the plugin is loaded (should give '1'), from ex mode: + + 'vim :echo loaded_webdevicons' + +- check if the plugin is enabled (should give '1'), from ex mode: + + 'vim :echo g:webdevicons_enable' + +- check if the plugin is enabled for NERDTree (should give '1'), from ex + mode: + + - this should _NOT_ need to be set under normal circumstances + + 'vim :echo g:webdevicons_enable_nerdtree' + +- check if you are able to see the characters, from ex mode: + + 'vim :echo g:WebDevIconsUnicodeDecorateFileNodesDefaultSymbol' + +- if all this looks correct you may try this to see if any files show flags + + - last resort, see if you can even set the default symbol and have it + display anywhere (NERDTree, vim-airline's statusline, vim-airlines's + tabline), from ex mode: + + "vim :let g:WebDevIconsUnicodeDecorateFileNodesDefaultSymbol='x'" + +------------------------------------------------------------------------------- + *devicons-how-did-you-get-color-matching-based-on-file-type-in-nerdtree* +How did you get color matching based on file type in NERDtree? ~ + +- You can either use this additional plugin: vim-nerdtree-syntax-highlight + [49] created by @tiagofumo [50] + +- Or you can use my current settings from: + https://github.com/scrooloose/nerdtree/issues/201#issuecomment-9954740 + + ```vim " NERDTress File highlighting function! + NERDTreeHighlightFile(extension, fg, bg, guifg, guibg) exec 'autocmd + FileType nerdtree highlight ' . a:extension .' ctermbg='. a:bg .' + ctermfg='. a:fg .' guibg='. a:guibg .' guifg='. a:guifg exec 'autocmd + FileType nerdtree syn match ' . a:extension .' #^\s+.*'. a:extension .'$#' + endfunction + + call NERDTreeHighlightFile('jade', 'green', 'none', 'green', '#151515') + call NERDTreeHighlightFile('ini', 'yellow', 'none', 'yellow', '#151515') + call NERDTreeHighlightFile('md', 'blue', 'none', '#3366FF', '#151515') call + NERDTreeHighlightFile('yml', 'yellow', 'none', 'yellow', '#151515') call + NERDTreeHighlightFile('config', 'yellow', 'none', 'yellow', '#151515') call + NERDTreeHighlightFile('conf', 'yellow', 'none', 'yellow', '#151515') call + NERDTreeHighlightFile('json', 'yellow', 'none', 'yellow', '#151515') call + NERDTreeHighlightFile('html', 'yellow', 'none', 'yellow', '#151515') call + NERDTreeHighlightFile('styl', 'cyan', 'none', 'cyan', '#151515') call + NERDTreeHighlightFile('css', 'cyan', 'none', 'cyan', '#151515') call + NERDTreeHighlightFile('coffee', 'Red', 'none', 'red', '#151515') call + NERDTreeHighlightFile('js', 'Red', 'none', '#ffa500', '#151515') call + NERDTreeHighlightFile('php', 'Magenta', 'none', '#ff00ff', '#151515') call + NERDTreeHighlightFile('ds_store', 'Gray', 'none', '#686868', '#151515') + call NERDTreeHighlightFile('gitconfig', 'Gray', 'none', '#686868', + '#151515') call NERDTreeHighlightFile('gitignore', 'Gray', 'none', + '#686868', '#151515') call NERDTreeHighlightFile('bashrc', 'Gray', 'none', + '#686868', '#151515') call NERDTreeHighlightFile('bashprofile', 'Gray', + 'none', '#686868', '#151515') 'Note: If the colors still are not + highlighting, try invoking such as:' autocmd VimEnter * call + NERDTreeHighlightFile('jade', 'green', 'none', 'green', '#151515') ``` per: + https://github.com/ryanoasis/vim-devicons/issues/49#issuecomment-101753558 + +------------------------------------------------------------------------------- + *devicons-how-did-you-get-color-matching-on-just-glyph-icon-in-nerdtree* +How did you get color matching on just the glyph/icon in NERDtree? ~ + +- You can add something like this to your |vimrc| + + ```vim " NERDTress File highlighting only the glyph/icon " test highlight + just the glyph (icons) in nerdtree: autocmd filetype nerdtree highlight + haskell_icon ctermbg=none ctermfg=Red guifg=#ffa500 autocmd filetype + nerdtree highlight html_icon ctermbg=none ctermfg=Red guifg=#ffa500 autocmd + filetype nerdtree highlight go_icon ctermbg=none ctermfg=Red guifg=#ffa500 + + autocmd filetype nerdtree syn match haskell_icon ## + containedin=NERDTreeFile " if you are using another syn highlight for a + given line (e.g. " NERDTreeHighlightFile) need to give that name in the + 'containedin' for this " other highlight to work with it autocmd filetype + nerdtree syn match html_icon ## containedin=NERDTreeFile,html autocmd + filetype nerdtree syn match go_icon ## containedin=NERDTreeFile ``` + +------------------------------------------------------------------------------- +How do I solve issues after re-sourcing my *vimrc*? + +- Try adding this to the bottom of your |vimrc| + + 'vim if exists("g:loaded_webdevicons") call webdevicons#refresh() endif' + +------------------------------------------------------------------------------- + *devicons-why-do-i-have-artifacts-after-of-icons* +Why do I have artifacts after (or instead) of icons? ~ + +- Dots after icons in NERDTree (on GVim), try: + +'vim autocmd FileType nerdtree setlocal nolist' + +source: Issue #110 [51] + +- Newly created files in NERDTree are slow to show the glyph (icon) +- check your current setting of ':updatetime?' +- try setting 'updatetime' in your |vimrc| to a lower value like '250', for + more info see: Issue #153 [52] + +------------------------------------------------------------------------------- + *devicons-square-brackets-around-icons* +Square brackets around icons ~ + +- By default if your Vim supports conceal you should not see these, debug + steps: + + - Check if the plugin feature is set (should be '1'): + + 'vim echo g:webdevicons_conceal_nerdtree_brackets' + + - Check that your vim was compiled with the 'conceal' feature (should be + '+conceal'): + + ```shell + +------------------------------------------------------------------------------- + *devicons-from-terminal* + from terminal ~ + + vim --version | grep conceal ``` + + - Check the 'conceallevel' (should be '3'): + + 'vim set conceallevel?' + +------------------------------------------------------------------------------- + *devicons-do-i-have-to-use-patched-font-such-as-nerd-fonts* +Do I have to use a patched font such as Nerd Fonts? ~ + +VimDevIcons was desired to work with Nerd Fonts [13], however you do _not_ have +to use a patched font or even Nerd Fonts specified glyphs. You have 2 main +options: + +fontconfig fallback + +1. Install the NERD Font symbol fonts: + +2. Symbols Nerd Font:style=1000-em [53] + +3. Symbols Nerd Font:style=2048-em [54] + +4. Install 10-nerd-font-symbols.conf [55] for Fontconfig + +5. for additional information see: Issue #124 [56] and [Nerd Fonts + 'fontconfig'] + +Use your own glyph codepoints + +- specify your own glyphs and/or use your own font (see: Character Mappings + [57]) + +------------------------------------------------------------------------------- + *devicons-rationale-why-does-this-exist-how-did-this-start* +Rationale: Why does this exist? How did this start? ~ + +After seeing the awesome theme for Atom (seti-ui) and the awesome plugins work +done for NERDTree and vim-airline and wanting something like this for Vim I +decided to create my first plugin. + +=============================================================================== + *devicons-references* +References ~ + +[1] https://github.com/scrooloose/nerdtree +[2] https://github.com/vim-airline/vim-airline +[3] https://github.com/ctrlpvim/ctrlp.vim +[4] https://github.com/powerline/powerline +[5] https://github.com/Shougo/denite.nvim +[6] https://github.com/Shougo/unite.vim +[7] https://github.com/itchyny/lightline.vim +[8] https://github.com/mhinz/vim-startify +[9] https://github.com/Shougo/vimfiler.vim +[10] https://github.com/bagrat/vim-workspace +[11] https://github.com/tpope/vim-flagship +[12] https://github.com/ryanoasis/vim-devicons/wiki/screenshots +[13] https://github.com/ryanoasis/nerd-fonts +[14] https://github.com/ryanoasis/vim-devicons/wiki/Detailed-Features +[15] https://github.com/ryanoasis/vim-devicons/wiki/Extra-Configuration +[16] https://github.com/ryanoasis/nerd-fonts#font-installation +[17] https://github.com/ryanoasis/nerd-fonts#font-patcher +[18] https://github.com/junegunn/vim-plug +[19] https://github.com/ryanoasis/vim-devicons/wiki/Installation +[20] DEVELOPER.md +[21] https://github.com/ryanoasis/vim-devicons/wiki/FAQ-&-Troubleshooting +[22] CODE_OF_CONDUCT.md +[23] CONTRIBUTING.md +[24] https://github.com/ryanoasis/vim-devicons +[25] http://www.vim.org/scripts/script.php?script_id=5114 +[26] https://github.com/Xuyuanp/nerdtree-git-plugin +[27] https://github.com/Xuyuanp +[28] https://atom.io/themes/seti-ui +[29] https://github.com/jesseweed +[30] http://vorillaz.github.io/devicons +[31] https://github.com/vorillaz +[32] https://github.com/benatespina/development.svg.icons +[33] https://github.com/benatespina +[34] http://learnvimscriptthehardway.stevelosh.com/ +[35] http://stevelosh.com/ +[36] https://github.com/ryanoasis/vim-devicons/graphs/contributors +[37] LICENSE +[38] https://github.com/tpope/vim-pathogen +[39] https://github.com/Shougo/neobundle.vim +[40] https://github.com/gmarik/vundle +[41] https://github.com/ryanoasis/vim-devicons/wiki/samples/v0.10.x/.vimrc-windows-1 +[42] https://github.com/ryanoasis/vim-devicons/wiki/samples/v0.10.x/.vimrc-linux-1 +[43] https://github.com/Lokaltog/vim-powerline +[44] https://github.com/ryanoasis/vim-devicons/wiki/samples/v0.10.x/powerline/themes/vim/default.json +[45] http://www.vim.org/scripts/script.php?script_id=1658 +[46] http://www.vim.org/scripts/script.php?script_id=3736 +[47] https://github.com/tpope/vim-flagship/issues/6#issuecomment-116121220 +[48] https://github.com/ryanoasis/vim-devicons/pull/135 +[49] https://github.com/tiagofumo/vim-nerdtree-syntax-highlight +[50] https://github.com/tiagofumo +[51] https://github.com/ryanoasis/vim-devicons/issues/110#issue-103801335 +[52] https://github.com/ryanoasis/vim-devicons/issues/153 +[53] https://github.com/ryanoasis/nerd-fonts/blob/master/src/glyphs/Symbols-1000-em%20Nerd%20Font%20Complete.ttf +[54] https://github.com/ryanoasis/nerd-fonts/blob/master/src/glyphs/Symbols-2048-em%20Nerd%20Font%20Complete.ttf +[55] https://github.com/ryanoasis/nerd-fonts/blob/master/10-nerd-font-symbols.conf +[56] https://github.com/ryanoasis/vim-devicons/issues/124 +[57] https://github.com/ryanoasis/vim-devicons#character-mappings + +vim: ft=help diff --git a/.vim/pack/vendor/start/vim-devicons/nerdtree_plugin/webdevicons.vim b/.vim/pack/vendor/start/vim-devicons/nerdtree_plugin/webdevicons.vim new file mode 100644 index 0000000..7c1f9f7 --- /dev/null +++ b/.vim/pack/vendor/start/vim-devicons/nerdtree_plugin/webdevicons.vim @@ -0,0 +1,389 @@ +" Version: 0.11.0 +" Webpage: https://github.com/ryanoasis/vim-devicons +" Maintainer: Ryan McIntyre +" License: see LICENSE + +" @todo fix duplicate global variable initialize here: +if !exists('g:webdevicons_enable') + let g:webdevicons_enable = 1 +endif + +if !exists('g:webdevicons_enable_nerdtree') + let g:webdevicons_enable_nerdtree = 1 +endif + +if !exists('g:DevIconsEnableFoldersOpenClose') + let g:DevIconsEnableFoldersOpenClose = 0 +endif + +if !exists('g:DevIconsEnableFolderPatternMatching') + let g:DevIconsEnableFolderPatternMatching = 1 +endif + +if !exists('g:DevIconsEnableFolderExtensionPatternMatching') + let g:DevIconsEnableFolderExtensionPatternMatching = 0 +endif + +" end @todo duplicate global variables + +" Temporary (hopefully) fix for glyph issues in gvim (proper fix is with the +" actual font patcher) +if !exists('g:webdevicons_gui_glyph_fix') + if has('gui_running') + let g:webdevicons_gui_glyph_fix = 1 + else + let g:webdevicons_gui_glyph_fix = 0 + endif +endif + +if !exists('g:DevIconsEnableNERDTreeRedraw') + if has('gui_running') + let g:DevIconsEnableNERDTreeRedraw = 1 + else + let g:DevIconsEnableNERDTreeRedraw = 0 + endif +endif + +if g:webdevicons_enable_nerdtree == 1 + if !exists('g:loaded_nerd_tree') + echohl WarningMsg | + \ echomsg 'vim-webdevicons requires NERDTree to be loaded before vim-webdevicons.' + endif + + if exists('g:loaded_nerd_tree') && g:loaded_nerd_tree == 1 && !exists('g:NERDTreePathNotifier') + let g:webdevicons_enable_nerdtree = 0 + echohl WarningMsg | + \ echomsg 'vim-webdevicons requires a newer version of NERDTree to show glyphs in NERDTree - consider updating NERDTree.' + endif + + " @todo I don't even want this to execute UNLESS the user has the + " 'nerdtree-git-plugin' INSTALLED (not LOADED) + " As it currently functions this warning will display even if the user does + " not have nerdtree-git-plugin not just if it isn't loaded yet + " (not what we want) + "if !exists('g:loaded_nerdtree_git_status') + " echohl WarningMsg | + " \ echomsg 'vim-webdevicons works better when 'nerdtree-git-plugin' is loaded before vim-webdevicons (small refresh issues otherwise).' + "endif +endif + +if !exists('g:webdevicons_enable_airline_tabline') + let g:webdevicons_enable_airline_tabline = 1 +endif + +if !exists('g:webdevicons_enable_airline_statusline') + let g:webdevicons_enable_airline_statusline = 1 +endif + +function! s:SetupListeners() + call g:NERDTreePathNotifier.AddListener('init', 'NERDTreeWebDevIconsRefreshListener') + call g:NERDTreePathNotifier.AddListener('refresh', 'NERDTreeWebDevIconsRefreshListener') + call g:NERDTreePathNotifier.AddListener('refreshFlags', 'NERDTreeWebDevIconsRefreshListener') +endfunction + +" util like helpers +" scope: local +function! s:Refresh() + call b:NERDTree.root.refreshFlags() + call NERDTreeRender() +endfunction + +" Temporary (hopefully) fix for glyph issues in gvim (proper fix is with the +" actual font patcher) + +" NERDTree-C +" scope: global +function! WebDevIconsNERDTreeChangeRootHandler(node) + call b:NERDTree.changeRoot(a:node) + call NERDTreeRender() + call a:node.putCursorHere(0, 0) + if g:DevIconsEnableNERDTreeRedraw ==# 1 + redraw! + endif +endfunction + +" NERDTree-u +" scope: global +function! WebDevIconsNERDTreeUpDirCurrentRootClosedHandler() + call nerdtree#ui_glue#upDir(0) + if g:DevIconsEnableNERDTreeRedraw ==# 1 + redraw! + endif +endfunction + +function! WebDevIconsNERDTreeDirUpdateFlags(node, glyph) + let path = a:node.path + let isOpen = a:node.isOpen + let postPadding = g:WebDevIconsNerdTreeAfterGlyphPadding + let prePadding = g:WebDevIconsNerdTreeBeforeGlyphPadding + let hasGitFlags = (len(path.flagSet._flagsForScope('git')) > 0) + let hasGitNerdTreePlugin = (exists('g:loaded_nerdtree_git_status') == 1) + let collapsesToSameLine = (exists('g:NERDTreeCascadeSingleChildDir') == 1) + let dirHasOnlyOneChildDir = 0 + + if collapsesToSameLine + " need to call to determin children: + call a:node._initChildren(1) + let dirHasOnlyOneChildDir = (a:node.getChildCount() ==# 1 && a:node.children[0].path.isDirectory) + endif + + " properly set collapsed/combined directory display to opened glyph + if collapsesToSameLine && dirHasOnlyOneChildDir + call WebDevIconsNERDTreeDirOpen(a:node.children[0]) + endif + + " align vertically at the same level: non git-flag nodes with git-flag nodes + if g:WebDevIconsNerdTreeGitPluginForceVAlign && !hasGitFlags && hasGitNerdTreePlugin + let prePadding .= ' ' + endif + + let flag = prePadding . a:glyph . postPadding + + call a:node.path.flagSet.clearFlags('webdevicons') + + if flag !=? '' + call a:node.path.flagSet.addFlag('webdevicons', flag) + "echom "added flag of " . flag + call a:node.path.refreshFlags(b:NERDTree) + "echom "flagset is now " . string(a:node.path.flagSet) + endif +endfunction + +function! WebDevIconsNERDTreeDirClose(node) + let a:node.path.isOpen = 0 + let glyph = g:WebDevIconsUnicodeDecorateFolderNodesDefaultSymbol + call WebDevIconsNERDTreeDirUpdateFlags(a:node, glyph) +endfunction + +function! WebDevIconsNERDTreeDirOpen(node) + let a:node.path.isOpen = 1 + let glyph = g:DevIconsDefaultFolderOpenSymbol + call WebDevIconsNERDTreeDirUpdateFlags(a:node, glyph) +endfunction + +function! WebDevIconsNERDTreeDirOpenRecursively(node) + call WebDevIconsNERDTreeDirOpen(a:node) + for i in a:node.children + if i.path.isDirectory ==# 1 + call WebDevIconsNERDTreeDirOpenRecursively(i) + endif + endfor +endfunction + +function! WebDevIconsNERDTreeDirCloseRecursively(node) + call WebDevIconsNERDTreeDirClose(a:node) + for i in a:node.children + if i.path.isDirectory ==# 1 + call WebDevIconsNERDTreeDirCloseRecursively(i) + endif + endfor +endfunction + +function! WebDevIconsNERDTreeDirCloseChildren(node) + for i in a:node.children + if i.path.isDirectory ==# 1 + call WebDevIconsNERDTreeDirClose(i) + endif + endfor +endfunction + +" NERDTreeMapActivateNode and <2-LeftMouse> +" handle the user activating a tree node +" scope: global +function! WebDevIconsNERDTreeMapActivateNode(node) + let isOpen = a:node.isOpen + if isOpen + let glyph = g:WebDevIconsUnicodeDecorateFolderNodesDefaultSymbol + else + let glyph = g:DevIconsDefaultFolderOpenSymbol + endif + let a:node.path.isOpen = !isOpen + call WebDevIconsNERDTreeDirUpdateFlags(a:node, glyph) + " continue with normal activate logic + call a:node.activate() + " glyph change possible artifact clean-up + if g:DevIconsEnableNERDTreeRedraw ==# 1 + redraw! + endif +endfunction + +" NERDTreeMapActivateNodeSingleMode +" handle the user activating a tree node if NERDTreeMouseMode is setted to 3 +" scope: global +function! WebDevIconsNERDTreeMapActivateNodeSingleMode(node) + if g:NERDTreeMouseMode == 3 + let isOpen = a:node.isOpen + if isOpen + let glyph = g:WebDevIconsUnicodeDecorateFolderNodesDefaultSymbol + else + let glyph = g:DevIconsDefaultFolderOpenSymbol + endif + let a:node.path.isOpen = !isOpen + call WebDevIconsNERDTreeDirUpdateFlags(a:node, glyph) + " continue with normal activate logic + call a:node.activate() + " glyph change possible artifact clean-up + if g:DevIconsEnableNERDTreeRedraw ==# 1 + redraw! + endif + endif +endfunction + +function! WebDevIconsNERDTreeMapOpenRecursively(node) + " normal original logic: + call nerdtree#echo('Recursively opening node. Please wait...') + call WebDevIconsNERDTreeDirOpenRecursively(a:node) + call a:node.openRecursively() + " continue with normal original logic: + call b:NERDTree.render() + " glyph change possible artifact clean-up + if g:DevIconsEnableNERDTreeRedraw ==# 1 + redraw! + endif + call nerdtree#echo('Recursively opening node. Please wait... DONE') +endfunction + +function! WebDevIconsNERDTreeMapCloseChildren(node) + " close children but not current node: + call WebDevIconsNERDTreeDirCloseChildren(a:node) + " continue with normal original logic: + call a:node.closeChildren() + call b:NERDTree.render() + call a:node.putCursorHere(0, 0) + " glyph change possible artifact clean-up + if g:DevIconsEnableNERDTreeRedraw ==# 1 + redraw! + endif +endfunction + +function! WebDevIconsNERDTreeMapCloseDir(node) + " continue with normal original logic: + let parent = a:node.parent + while g:NERDTreeCascadeOpenSingleChildDir && !parent.isRoot() + let childNodes = parent.getVisibleChildren() + if len(childNodes) == 1 && childNodes[0].path.isDirectory + let parent = parent.parent + else + break + endif + endwhile + if parent ==# {} || parent.isRoot() + call nerdtree#echo('cannot close tree root') + else + call parent.close() + " update the glyph + call WebDevIconsNERDTreeDirClose(parent) + call b:NERDTree.render() + call parent.putCursorHere(0, 0) + " glyph change possible artifact clean-up + if g:DevIconsEnableNERDTreeRedraw ==# 1 + redraw! + endif + endif +endfunction + +function! WebDevIconsNERDTreeMapUpdirKeepOpen() + call WebDevIconsNERDTreeDirOpen(b:NERDTree.root) + " continue with normal logic: + call nerdtree#ui_glue#upDir(1) + call s:Refresh() + " glyph change possible artifact clean-up + if g:DevIconsEnableNERDTreeRedraw ==# 1 + redraw! + endif +endfunction + +if g:webdevicons_enable == 1 && g:webdevicons_enable_nerdtree == 1 + call s:SetupListeners() + + if g:DevIconsEnableFoldersOpenClose + + " These overrides are needed because we cannot + " simply use AddListener for reliably updating + " the folder open/close glyphs because the event + " path has no access to the 'isOpen' property + " some of these are a little more brittle/fragile + " than others + " TODO FIXME better way to reliably update + " open/close glyphs in NERDTreeWebDevIconsRefreshListener + + " NERDTreeMapActivateNode + call NERDTreeAddKeyMap({ + \ 'key': g:NERDTreeMapActivateNode, + \ 'callback': 'WebDevIconsNERDTreeMapActivateNode', + \ 'override': 1, + \ 'scope': 'DirNode' }) + + " NERDTreeMapCustomOpen + call NERDTreeAddKeyMap({ + \ 'key': g:NERDTreeMapCustomOpen, + \ 'callback': 'WebDevIconsNERDTreeMapActivateNode', + \ 'override': 1, + \ 'scope': 'DirNode' }) + + " NERDTreeMapOpenRecursively + call NERDTreeAddKeyMap({ + \ 'key': g:NERDTreeMapOpenRecursively, + \ 'callback': 'WebDevIconsNERDTreeMapOpenRecursively', + \ 'override': 1, + \ 'scope': 'DirNode' }) + + " NERDTreeMapCloseChildren + call NERDTreeAddKeyMap({ + \ 'key': g:NERDTreeMapCloseChildren, + \ 'callback': 'WebDevIconsNERDTreeMapCloseChildren', + \ 'override': 1, + \ 'scope': 'DirNode' }) + + " NERDTreeMapCloseChildren + call NERDTreeAddKeyMap({ + \ 'key': g:NERDTreeMapCloseDir, + \ 'callback': 'WebDevIconsNERDTreeMapCloseDir', + \ 'override': 1, + \ 'scope': 'Node' }) + + " <2-LeftMouse> + call NERDTreeAddKeyMap({ + \ 'key': '<2-LeftMouse>', + \ 'callback': 'WebDevIconsNERDTreeMapActivateNode', + \ 'override': 1, + \ 'scope': 'DirNode' }) + + " + call NERDTreeAddKeyMap({ + \ 'key': '', + \ 'callback': 'WebDevIconsNERDTreeMapActivateNodeSingleMode', + \ 'override': 1, + \ 'scope': 'DirNode' }) + + " NERDTreeMapUpdirKeepOpen + call NERDTreeAddKeyMap({ + \ 'key': g:NERDTreeMapUpdirKeepOpen, + \ 'callback': 'WebDevIconsNERDTreeMapUpdirKeepOpen', + \ 'override': 1, + \ 'scope': 'all' }) + + endif + + " Temporary (hopefully) fix for glyph issues in gvim (proper fix is with the + " actual font patcher) + if g:webdevicons_gui_glyph_fix ==# 1 + call NERDTreeAddKeyMap({ + \ 'key': g:NERDTreeMapChangeRoot, + \ 'callback': 'WebDevIconsNERDTreeChangeRootHandler', + \ 'override': 1, + \ 'quickhelpText': "change tree root to the\n\" selected dir\n\" plus devicons redraw\n\" hack fix", + \ 'scope': 'Node' }) + + call NERDTreeAddKeyMap({ + \ 'key': g:NERDTreeMapUpdir, + \ 'callback': 'WebDevIconsNERDTreeUpDirCurrentRootClosedHandler', + \ 'override': 1, + \ 'quickhelpText': "move tree root up a dir\n\" plus devicons redraw\n\" hack fix", + \ 'scope': 'all' }) + endif + +endif + +" modeline syntax: +" vim: fdm=marker tabstop=2 softtabstop=2 shiftwidth=2 expandtab: diff --git a/.vim/pack/vendor/start/vim-devicons/plugin/webdevicons.vim b/.vim/pack/vendor/start/vim-devicons/plugin/webdevicons.vim new file mode 100644 index 0000000..596ec68 --- /dev/null +++ b/.vim/pack/vendor/start/vim-devicons/plugin/webdevicons.vim @@ -0,0 +1,703 @@ +" Version: 0.11.0 +" Webpage: https://github.com/ryanoasis/vim-devicons +" Maintainer: Ryan McIntyre +" License: see LICENSE + +let s:version = '0.11.0' +let s:plugin_home = expand(':p:h:h') + +" set scriptencoding after 'encoding' and when using multibyte chars +scriptencoding utf-8 + +" standard fix/safety: line continuation (avoiding side effects) {{{1 +"======================================================================== +let s:save_cpo = &cpo +set cpo&vim + +" standard loading / not loading {{{1 +"======================================================================== + +if exists('g:loaded_webdevicons') + finish +endif + +let g:loaded_webdevicons = 1 + +" config enable / disable settings {{{1 +"======================================================================== + +"" +" Set the variable to the default value, only if variable is not defined. +" +" @param {string} var Variable name with its scope. +" @param {*} default Default value for variable. +"" +function! s:set(var, default) abort + if !exists(a:var) + if type(a:default) + execute 'let' a:var '=' string(a:default) + else + execute 'let' a:var '=' a:default + endif + endif +endfunction + +call s:set('g:webdevicons_enable', 1) +call s:set('g:webdevicons_enable_nerdtree', 1) +call s:set('g:webdevicons_enable_unite ', 1) +call s:set('g:webdevicons_enable_denite', 1) +call s:set('g:webdevicons_enable_vimfiler', 1) +call s:set('g:webdevicons_enable_ctrlp', 1) +call s:set('g:webdevicons_enable_airline_tabline', 1) +call s:set('g:webdevicons_enable_airline_statusline', 1) +call s:set('g:webdevicons_enable_airline_statusline_fileformat_symbols', 1) +call s:set('g:webdevicons_enable_flagship_statusline', 1) +call s:set('g:webdevicons_enable_flagship_statusline_fileformat_symbols', 1) +call s:set('g:webdevicons_enable_startify', 1) +call s:set('g:webdevicons_conceal_nerdtree_brackets', 1) +call s:set('g:DevIconsAppendArtifactFix', has('gui_running') ? 1 : 0) +call s:set('g:DevIconsArtifactFixChar', ' ') + +" config options {{{1 +"======================================================================== + +call s:set('g:WebDevIconsUnicodeDecorateFileNodes', 1) +call s:set('g:WebDevIconsUnicodeDecorateFolderNodes', 1) +call s:set('g:DevIconsEnableFoldersOpenClose', 0) +call s:set('g:DevIconsEnableFolderPatternMatching', 1) +call s:set('g:DevIconsEnableFolderExtensionPatternMatching', 0) +call s:set('g:DevIconsEnableDistro', 1) +call s:set('g:WebDevIconsUnicodeDecorateFolderNodesExactMatches', 1) +call s:set('g:WebDevIconsUnicodeGlyphDoubleWidth', 1) +call s:set('g:WebDevIconsNerdTreeBeforeGlyphPadding', ' ') +call s:set('g:WebDevIconsNerdTreeAfterGlyphPadding', ' ') +call s:set('g:WebDevIconsNerdTreeGitPluginForceVAlign', 1) +call s:set('g:NERDTreeUpdateOnCursorHold', 1) " Obsolete: For backward compatibility +call s:set('g:NERDTreeGitStatusUpdateOnCursorHold', 1) +call s:set('g:WebDevIconsTabAirLineBeforeGlyphPadding', ' ') +call s:set('g:WebDevIconsTabAirLineAfterGlyphPadding', '') + +" config defaults {{{1 +"======================================================================== + +call s:set('g:WebDevIconsUnicodeDecorateFileNodesDefaultSymbol', '') +call s:set('g:WebDevIconsUnicodeByteOrderMarkerDefaultSymbol', '') +call s:set('g:WebDevIconsUnicodeDecorateFolderNodesDefaultSymbol', g:DevIconsEnableFoldersOpenClose ? '' : '') +call s:set('g:WebDevIconsUnicodeDecorateFolderNodesSymlinkSymbol', '') +call s:set('g:DevIconsDefaultFolderOpenSymbol', '') + +" functions {{{1 +"======================================================================== + +" local functions {{{2 +"======================================================================== + +" scope: local +function s:getDistro() + if exists('s:distro') + return s:distro + endif + + if has('bsd') + let s:distro = '' + return s:distro + endif + + if g:DevIconsEnableDistro && executable('lsb_release') + let s:lsb = system('lsb_release -i') + if s:lsb =~# 'Arch' + let s:distro = '' + elseif s:lsb =~# 'Gentoo' + let s:distro = '' + elseif s:lsb =~# 'Ubuntu' + let s:distro = '' + elseif s:lsb =~# 'Cent' + let s:distro = '' + elseif s:lsb =~# 'Debian' + let s:distro = '' + elseif s:lsb =~# 'Dock' + let s:distro = '' + else + let s:distro = '' + endif + return s:distro + endif + + let s:distro = '' + return s:distro +endfunction + +" scope: local +function s:isDarwin() + if exists('s:is_darwin') + return s:is_darwin + endif + + if exists('g:WebDevIconsOS') + let s:is_darwin = g:WebDevIconsOS ==? 'Darwin' + return s:is_darwin + endif + + if has('macunix') + let s:is_darwin = 1 + return s:is_darwin + endif + + if ! has('unix') + let s:is_darwin = 0 + return s:is_darwin + endif + + if system('uname -s') ==# "Darwin\n" + let s:is_darwin = 1 + else + let s:is_darwin = 0 + endif + + return s:is_darwin +endfunction + +" scope: local +function! s:strip(input) + return substitute(a:input, '^\s*\(.\{-}\)\s*$', '\1', '') +endfunction + +" scope: local +function! s:setDictionaries() + + let s:file_node_extensions = { + \ 'styl' : '', + \ 'sass' : '', + \ 'scss' : '', + \ 'htm' : '', + \ 'html' : '', + \ 'slim' : '', + \ 'haml' : '', + \ 'ejs' : '', + \ 'css' : '', + \ 'less' : '', + \ 'md' : '', + \ 'mdx' : '', + \ 'markdown' : '', + \ 'rmd' : '', + \ 'json' : '', + \ 'webmanifest' : '', + \ 'js' : '', + \ 'mjs' : '', + \ 'jsx' : '', + \ 'rb' : '', + \ 'gemspec' : '', + \ 'rake' : '', + \ 'php' : '', + \ 'py' : '', + \ 'pyc' : '', + \ 'pyo' : '', + \ 'pyd' : '', + \ 'coffee' : '', + \ 'mustache' : '', + \ 'hbs' : '', + \ 'conf' : '', + \ 'ini' : '', + \ 'yml' : '', + \ 'yaml' : '', + \ 'toml' : '', + \ 'bat' : '', + \ 'mk' : '', + \ 'jpg' : '', + \ 'jpeg' : '', + \ 'bmp' : '', + \ 'png' : '', + \ 'webp' : '', + \ 'gif' : '', + \ 'ico' : '', + \ 'twig' : '', + \ 'cpp' : '', + \ 'c++' : '', + \ 'cxx' : '', + \ 'cc' : '', + \ 'cp' : '', + \ 'c' : '', + \ 'cs' : '', + \ 'h' : '', + \ 'hh' : '', + \ 'hpp' : '', + \ 'hxx' : '', + \ 'hs' : '', + \ 'lhs' : '', + \ 'nix' : '', + \ 'lua' : '', + \ 'java' : '', + \ 'sh' : '', + \ 'fish' : '', + \ 'bash' : '', + \ 'zsh' : '', + \ 'ksh' : '', + \ 'csh' : '', + \ 'awk' : '', + \ 'ps1' : '', + \ 'ml' : 'λ', + \ 'mli' : 'λ', + \ 'diff' : '', + \ 'db' : '', + \ 'sql' : '', + \ 'dump' : '', + \ 'clj' : '', + \ 'cljc' : '', + \ 'cljs' : '', + \ 'edn' : '', + \ 'scala' : '', + \ 'go' : '', + \ 'dart' : '', + \ 'xul' : '', + \ 'sln' : '', + \ 'suo' : '', + \ 'pl' : '', + \ 'pm' : '', + \ 't' : '', + \ 'rss' : '', + \ 'f#' : '', + \ 'fsscript' : '', + \ 'fsx' : '', + \ 'fs' : '', + \ 'fsi' : '', + \ 'rs' : '', + \ 'rlib' : '', + \ 'd' : '', + \ 'erl' : '', + \ 'hrl' : '', + \ 'ex' : '', + \ 'exs' : '', + \ 'eex' : '', + \ 'leex' : '', + \ 'heex' : '', + \ 'vim' : '', + \ 'ai' : '', + \ 'psd' : '', + \ 'psb' : '', + \ 'ts' : '', + \ 'tsx' : '', + \ 'jl' : '', + \ 'pp' : '', + \ 'vue' : '﵂', + \ 'elm' : '', + \ 'swift' : '', + \ 'xcplayground' : '', + \ 'tex' : 'ﭨ', + \ 'r' : 'ﳒ', + \ 'rproj' : '鉶', + \ 'sol' : 'ﲹ', + \ 'pem' : '' + \} + + let s:file_node_exact_matches = { + \ 'exact-match-case-sensitive-1.txt' : '1', + \ 'exact-match-case-sensitive-2' : '2', + \ 'gruntfile.coffee' : '', + \ 'gruntfile.js' : '', + \ 'gruntfile.ls' : '', + \ 'gulpfile.coffee' : '', + \ 'gulpfile.js' : '', + \ 'gulpfile.ls' : '', + \ 'mix.lock' : '', + \ 'dropbox' : '', + \ '.ds_store' : '', + \ '.gitconfig' : '', + \ '.gitignore' : '', + \ '.gitattributes' : '', + \ '.gitlab-ci.yml' : '', + \ '.bashrc' : '', + \ '.zshrc' : '', + \ '.zshenv' : '', + \ '.zprofile' : '', + \ '.vimrc' : '', + \ '.gvimrc' : '', + \ '_vimrc' : '', + \ '_gvimrc' : '', + \ '.bashprofile' : '', + \ 'favicon.ico' : '', + \ 'license' : '', + \ 'node_modules' : '', + \ 'react.jsx' : '', + \ 'procfile' : '', + \ 'dockerfile' : '', + \ 'docker-compose.yml' : '', + \ 'rakefile' : '', + \ 'config.ru' : '', + \ 'gemfile' : '', + \ 'makefile' : '', + \ 'cmakelists.txt' : '', + \ 'robots.txt' : 'ﮧ' + \} + + let s:file_node_pattern_matches = { + \ '.*jquery.*\.js$' : '', + \ '.*angular.*\.js$' : '', + \ '.*backbone.*\.js$' : '', + \ '.*require.*\.js$' : '', + \ '.*materialize.*\.js$' : '', + \ '.*materialize.*\.css$' : '', + \ '.*mootools.*\.js$' : '', + \ '.*vimrc.*' : '', + \ 'Vagrantfile$' : '' + \} + + if !exists('g:WebDevIconsUnicodeDecorateFileNodesExtensionSymbols') + let g:WebDevIconsUnicodeDecorateFileNodesExtensionSymbols = {} + endif + + if !exists('g:WebDevIconsUnicodeDecorateFileNodesExactSymbols') + " do not remove: exact-match-case-sensitive-* + let g:WebDevIconsUnicodeDecorateFileNodesExactSymbols = {} + endif + + if !exists('g:WebDevIconsUnicodeDecorateFileNodesPatternSymbols') + let g:WebDevIconsUnicodeDecorateFileNodesPatternSymbols = {} + endif + + " iterate to fix allow user overriding of specific individual keys in vimrc (only gvimrc was working previously) + for [key, val] in items(s:file_node_extensions) + if !has_key(g:WebDevIconsUnicodeDecorateFileNodesExtensionSymbols, key) + let g:WebDevIconsUnicodeDecorateFileNodesExtensionSymbols[key] = val + endif + endfor + + " iterate to fix allow user overriding of specific individual keys in vimrc (only gvimrc was working previously) + for [key, val] in items(s:file_node_exact_matches) + if !has_key(g:WebDevIconsUnicodeDecorateFileNodesExactSymbols, key) + let g:WebDevIconsUnicodeDecorateFileNodesExactSymbols[key] = val + endif + endfor + + " iterate to fix allow user overriding of specific individual keys in vimrc (only gvimrc was working previously) + for [key, val] in items(s:file_node_pattern_matches) + if !has_key(g:WebDevIconsUnicodeDecorateFileNodesPatternSymbols, key) + let g:WebDevIconsUnicodeDecorateFileNodesPatternSymbols[key] = val + endif + endfor + +endfunction + +" scope: local +function! s:setSyntax() + if g:webdevicons_enable_nerdtree == 1 && g:webdevicons_conceal_nerdtree_brackets == 1 + augroup webdevicons_conceal_nerdtree_brackets + au! + autocmd FileType nerdtree syntax match hideBracketsInNerdTree "\]" contained conceal containedin=NERDTreeFlags + autocmd FileType nerdtree syntax match hideBracketsInNerdTree "\[" contained conceal containedin=NERDTreeFlags + autocmd FileType nerdtree syntax match hideBracketsInNerdTree "\]" contained conceal containedin=NERDTreeLinkFile + autocmd FileType nerdtree syntax match hideBracketsInNerdTree "\]" contained conceal containedin=NERDTreeLinkDir + autocmd FileType nerdtree syntax match hideBracketsInNerdTree "\[" contained conceal containedin=NERDTreeLinkFile + autocmd FileType nerdtree syntax match hideBracketsInNerdTree "\[" contained conceal containedin=NERDTreeLinkDir + autocmd FileType nerdtree setlocal conceallevel=3 + autocmd FileType nerdtree setlocal concealcursor=nvic + augroup END + endif +endfunction + +" scope: local +" stole solution/idea from nerdtree-git-plugin :) +function! s:setCursorHold() + if g:webdevicons_enable_nerdtree + augroup webdevicons_cursor_hold + autocmd CursorHold * silent! call s:CursorHoldUpdate() + augroup END + endif +endfunction + +" scope: local +" stole solution/idea from nerdtree-git-plugin :) +function! s:CursorHoldUpdate() + if g:NERDTreeUpdateOnCursorHold != 1 || g:NERDTreeGitStatusUpdateOnCursorHold != 1 + return + endif + + if !exists('g:NERDTree') || !g:NERDTree.IsOpen() + return + endif + + " Do not update when a special buffer is selected + if !empty(&l:buftype) + return + endif + + " winnr need to make focus go to opened file + " CursorToTreeWin needed to avoid error on opening file + let l:winnr = winnr() + let l:altwinnr = winnr('#') + + call g:NERDTree.CursorToTreeWin() + call b:NERDTree.root.refreshFlags() + call NERDTreeRender() + + exec l:altwinnr . 'wincmd w' + exec l:winnr . 'wincmd w' +endfunction + +" scope: local +function! s:hardRefreshNerdTree() + if g:webdevicons_enable_nerdtree == 1 && g:webdevicons_conceal_nerdtree_brackets == 1 && g:NERDTree.IsOpen() + NERDTreeClose + NERDTree + endif +endfunction + +" scope: local +function! s:softRefreshNerdTree() + if g:webdevicons_enable_nerdtree == 1 && exists('g:NERDTree') && g:NERDTree.IsOpen() + NERDTreeToggle + NERDTreeToggle + endif +endfunction + +" local initialization {{{2 +"======================================================================== + +" scope: local +function! s:initialize() + call s:setDictionaries() + call s:setSyntax() + call s:setCursorHold() + + if exists('g:loaded_flagship') | call devicons#plugins#flagship#init() | endif + if exists('g:loaded_unite') && g:webdevicons_enable_unite | call devicons#plugins#unite#init() | endif + if exists('g:loaded_denite') && g:webdevicons_enable_denite | call devicons#plugins#denite#init() | endif + if exists('g:loaded_vimfiler') && g:webdevicons_enable_vimfiler | call devicons#plugins#vimfiler#init() | endif + if exists('g:loaded_ctrlp') && g:webdevicons_enable_ctrlp | call devicons#plugins#ctrlp#init() | endif + if exists('g:loaded_startify') && g:webdevicons_enable_startify | call devicons#plugins#startify#init() | endif +endfunction + + +" public functions {{{2 +"======================================================================== + +" scope: public +function! webdevicons#version() + return s:version +endfunction + +" scope: public +function! webdevicons#pluginHome() + return s:plugin_home +endfunction + +" scope: public +" allow the first version of refresh to now call softRefresh +function! webdevicons#refresh() + call webdevicons#softRefresh() +endfunction + +" scope: public +function! webdevicons#hardRefresh() + call s:setSyntax() + call s:hardRefreshNerdTree() +endfunction + +" scope: public +function! webdevicons#softRefresh() + call s:setSyntax() + call s:softRefreshNerdTree() +endfunction + +" a:1 (bufferName), a:2 (isDirectory) +" scope: public +function! WebDevIconsGetFileTypeSymbol(...) abort + if a:0 == 0 + let fileNodeExtension = !empty(expand('%:e')) ? expand('%:e') : &filetype + let fileNode = expand('%:t') + let isDirectory = 0 + else + let fileNodeExtension = fnamemodify(a:1, ':e') + let fileNode = fnamemodify(a:1, ':t') + if a:0 > 1 + let isDirectory = a:2 + else + let isDirectory = 0 + endif + endif + + if isDirectory == 0 || g:DevIconsEnableFolderPatternMatching + + let symbol = g:WebDevIconsUnicodeDecorateFileNodesDefaultSymbol + let fileNodeExtension = tolower(fileNodeExtension) + let fileNode = tolower(fileNode) + + for [pattern, glyph] in items(g:WebDevIconsUnicodeDecorateFileNodesPatternSymbols) + if match(fileNode, pattern) != -1 + let symbol = glyph + break + endif + endfor + + if symbol == g:WebDevIconsUnicodeDecorateFileNodesDefaultSymbol + if has_key(g:WebDevIconsUnicodeDecorateFileNodesExactSymbols, fileNode) + let symbol = g:WebDevIconsUnicodeDecorateFileNodesExactSymbols[fileNode] + elseif ((isDirectory == 1 && g:DevIconsEnableFolderExtensionPatternMatching) || isDirectory == 0) && has_key(g:WebDevIconsUnicodeDecorateFileNodesExtensionSymbols, fileNodeExtension) + let symbol = g:WebDevIconsUnicodeDecorateFileNodesExtensionSymbols[fileNodeExtension] + elseif isDirectory == 1 + let symbol = g:WebDevIconsUnicodeDecorateFolderNodesDefaultSymbol + endif + endif + + else + let symbol = g:WebDevIconsUnicodeDecorateFolderNodesDefaultSymbol + endif + + let artifactFix = s:DevIconsGetArtifactFix() + + return symbol . artifactFix + +endfunction + +" scope: local +" Temporary (hopefully) fix for glyph issues in gvim (proper fix is with the +" actual font patcher) +function! s:DevIconsGetArtifactFix() + if g:DevIconsAppendArtifactFix == 1 + let artifactFix = g:DevIconsArtifactFixChar + else + let artifactFix = '' + endif + + return artifactFix +endfunction + +" scope: public +function! WebDevIconsGetFileFormatSymbol(...) + let fileformat = '' + let bomb = '' + + if (&bomb && g:WebDevIconsUnicodeByteOrderMarkerDefaultSymbol !=? '') + let bomb = g:WebDevIconsUnicodeByteOrderMarkerDefaultSymbol . ' ' + endif + + if &fileformat ==? 'dos' + let fileformat = '' + elseif &fileformat ==? 'unix' + let fileformat = s:isDarwin() ? '' : s:getDistro() + elseif &fileformat ==? 'mac' + let fileformat = '' + endif + + let artifactFix = s:DevIconsGetArtifactFix() + + return bomb . fileformat . artifactFix +endfunction + +" for airline plugin {{{3 +"======================================================================== + +" scope: public +function! AirlineWebDevIcons(...) + let w:airline_section_x = get(w:, 'airline_section_x', + \ get(g:, 'airline_section_x', '')) + let w:airline_section_x .= ' %{WebDevIconsGetFileTypeSymbol()} ' + let hasFileFormatEncodingPart = airline#parts#ffenc() !=? '' + if g:webdevicons_enable_airline_statusline_fileformat_symbols && hasFileFormatEncodingPart + let w:airline_section_y = ' %{&fenc . " " . WebDevIconsGetFileFormatSymbol()} ' + endif +endfunction + +if g:webdevicons_enable == 1 && exists('g:loaded_airline') && g:loaded_airline == 1 && g:webdevicons_enable_airline_statusline + call airline#add_statusline_func('AirlineWebDevIcons') +endif + +if g:webdevicons_enable == 1 && g:webdevicons_enable_airline_tabline + " Store original formatter. + let g:_webdevicons_airline_orig_formatter = get(g:, 'airline#extensions#tabline#formatter', 'default') + let g:airline#extensions#tabline#formatter = 'webdevicons' +endif + +" for nerdtree plugin {{{3 +"======================================================================== + +" scope: public +function! NERDTreeWebDevIconsRefreshListener(event) + let path = a:event.subject + let postPadding = g:WebDevIconsNerdTreeAfterGlyphPadding + let prePadding = g:WebDevIconsNerdTreeBeforeGlyphPadding + let hasGitFlags = (len(path.flagSet._flagsForScope('git')) > 0) + let hasGitNerdTreePlugin = (exists('g:loaded_nerdtree_git_status') == 1) + let artifactFix = s:DevIconsGetArtifactFix() + + " align vertically at the same level: non git-flag nodes with git-flag nodes + if g:WebDevIconsNerdTreeGitPluginForceVAlign && !hasGitFlags && hasGitNerdTreePlugin + let prePadding .= ' ' + endif + + if !path.isDirectory + " Hey we got a regular file, lets get it's proper icon + let flag = prePadding . WebDevIconsGetFileTypeSymbol(path.str()) . postPadding + + elseif path.isDirectory && g:WebDevIconsUnicodeDecorateFolderNodes == 1 + " Ok we got a directory, some more tests and checks + let directoryOpened = 0 + + if g:DevIconsEnableFoldersOpenClose && len(path.flagSet._flagsForScope('webdevicons')) > 0 + " did the user set different icons for open and close? + + " isOpen is not available on the path listener directly + " but we added one via overriding particular keymappings for NERDTree + if has_key(path, 'isOpen') && path.isOpen == 1 + let directoryOpened = 1 + endif + endif + + if g:WebDevIconsUnicodeDecorateFolderNodesExactMatches == 1 + " Did the user enable exact matching of folder type/names + " think node_modules + if g:DevIconsEnableFoldersOpenClose && directoryOpened + " the folder is open + let flag = prePadding . g:DevIconsDefaultFolderOpenSymbol . artifactFix . postPadding + else + " the folder is not open + if path.isSymLink + " We have a symlink + let flag = prePadding . g:WebDevIconsUnicodeDecorateFolderNodesSymlinkSymbol . artifactFix . postPadding + else + " We have a regular folder + let flag = prePadding . WebDevIconsGetFileTypeSymbol(path.str(), path.isDirectory) . postPadding + endif + endif + + else + " the user did not enable exact matching + if g:DevIconsEnableFoldersOpenClose && directoryOpened + " the folder is open + let flag = prePadding . g:DevIconsDefaultFolderOpenSymbol . artifactFix . postPadding + else + " the folder is not open + if path.isSymLink + " We have a symlink + let flag = prePadding . g:WebDevIconsUnicodeDecorateFolderNodesSymlinkSymbol . artifactFix . postPadding + else + " We have a regular folder + let flag = prePadding . g:WebDevIconsUnicodeDecorateFolderNodesDefaultSymbol . artifactFix . postPadding + endif + endif + + endif + + else + let flag = prePadding . ' ' . artifactFix . postPadding + endif + + call path.flagSet.clearFlags('webdevicons') + + if flag !=? '' + call path.flagSet.addFlag('webdevicons', flag) + endif + +endfunction + +" call setup after processing all the functions (to avoid errors) {{{1 +"======================================================================== +" had some issues with VimEnter, for now using: +call s:initialize() + +" standard fix/safety: line continuation (avoiding side effects) {{{1 +"======================================================================== +let &cpo = s:save_cpo +unlet s:save_cpo + +" modeline syntax: +" vim: fdm=marker tabstop=2 softtabstop=2 shiftwidth=2 expandtab: diff --git a/.vim/pack/vendor/start/vim-devicons/pythonx/vim_devicons/__init__.py b/.vim/pack/vendor/start/vim-devicons/pythonx/vim_devicons/__init__.py new file mode 100644 index 0000000..ece379c --- /dev/null +++ b/.vim/pack/vendor/start/vim-devicons/pythonx/vim_devicons/__init__.py @@ -0,0 +1,2 @@ +import pkg_resources +pkg_resources.declare_namespace(__name__) diff --git a/.vim/pack/vendor/start/vim-devicons/pythonx/vim_devicons/powerline/__init__.py b/.vim/pack/vendor/start/vim-devicons/pythonx/vim_devicons/powerline/__init__.py new file mode 100644 index 0000000..ece379c --- /dev/null +++ b/.vim/pack/vendor/start/vim-devicons/pythonx/vim_devicons/powerline/__init__.py @@ -0,0 +1,2 @@ +import pkg_resources +pkg_resources.declare_namespace(__name__) diff --git a/.vim/pack/vendor/start/vim-devicons/pythonx/vim_devicons/powerline/segments.py b/.vim/pack/vendor/start/vim-devicons/pythonx/vim_devicons/powerline/segments.py new file mode 100644 index 0000000..f92f4ee --- /dev/null +++ b/.vim/pack/vendor/start/vim-devicons/pythonx/vim_devicons/powerline/segments.py @@ -0,0 +1,28 @@ +# -*- coding: utf-8 -*- +# vim:se fenc=utf8 noet: +from __future__ import (unicode_literals, division, absolute_import, print_function) + +try: + import vim +except ImportError: + vim = {} + +from powerline.bindings.vim import (vim_get_func, buffer_name) +from powerline.theme import requires_segment_info + +@requires_segment_info +def webdevicons(pl, segment_info): + webdevicons = vim_get_func('WebDevIconsGetFileTypeSymbol') + name = buffer_name(segment_info) + return [] if not webdevicons else [{ + 'contents': webdevicons(name), + 'highlight_groups': ['webdevicons', 'file_name'], + }] + +@requires_segment_info +def webdevicons_file_format(pl, segment_info): + webdevicons_file_format = vim_get_func('WebDevIconsGetFileFormatSymbol') + return [] if not webdevicons_file_format else [{ + 'contents': webdevicons_file_format(), + 'highlight_groups': ['webdevicons_file_format', 'file_format'], + }] diff --git a/.vim/pack/vendor/start/vim-devicons/rplugin/python3/denite/filter/devicons_denite_converter.py b/.vim/pack/vendor/start/vim-devicons/rplugin/python3/denite/filter/devicons_denite_converter.py new file mode 100644 index 0000000..6768009 --- /dev/null +++ b/.vim/pack/vendor/start/vim-devicons/rplugin/python3/denite/filter/devicons_denite_converter.py @@ -0,0 +1,31 @@ +# -*- coding: utf-8 -*- +# vim:se fenc=utf8 noet: +from .base import Base +from os.path import isdir + + +class Filter(Base): + + def __init__(self, vim): + super().__init__(vim) + self.name = 'devicons_denite_converter' + self.description = 'add devicons in front of candidates' + + def filter(self, context): + for candidate in context['candidates']: + + if 'bufnr' in candidate: + bufname = self.vim.funcs.bufname(candidate['bufnr']) + filename = self.vim.funcs.fnamemodify(bufname, ':p:t') + elif 'word' in candidate and 'action__path' in candidate: + filename = candidate['word'] + + icon = self.vim.funcs.WebDevIconsGetFileTypeSymbol( + filename, isdir(filename)) + + # Customize output format if not done already. + if icon not in candidate.get('abbr', '')[:10]: + candidate['abbr'] = ' {} {}'.format( + icon, candidate.get('abbr', candidate['word'])) + + return context['candidates'] diff --git a/.vim/pack/vendor/start/vim-devicons/test/.themisrc b/.vim/pack/vendor/start/vim-devicons/test/.themisrc new file mode 100644 index 0000000..f59497a --- /dev/null +++ b/.vim/pack/vendor/start/vim-devicons/test/.themisrc @@ -0,0 +1 @@ +filetype plugin on diff --git a/.vim/pack/vendor/start/vim-devicons/test/default_setting.vim b/.vim/pack/vendor/start/vim-devicons/test/default_setting.vim new file mode 100644 index 0000000..b379948 --- /dev/null +++ b/.vim/pack/vendor/start/vim-devicons/test/default_setting.vim @@ -0,0 +1,39 @@ +scriptencoding utf-8 + +let s:suite = themis#suite('Webdevicons-default-value') +let s:assert = themis#helper('assert') + +function! s:suite.ExtensionConfig() + call s:assert.equals(g:webdevicons_enable, 1) + call s:assert.equals(g:webdevicons_enable_nerdtree, 1) + call s:assert.equals(g:webdevicons_enable_unite, 1) + call s:assert.equals(g:webdevicons_enable_denite, 1) + call s:assert.equals(g:webdevicons_enable_vimfiler, 1) + call s:assert.equals(g:webdevicons_enable_ctrlp, 1) + call s:assert.equals(g:webdevicons_enable_airline_tabline, 1) + call s:assert.equals(g:webdevicons_enable_airline_statusline, 1) + call s:assert.equals(g:webdevicons_enable_airline_statusline_fileformat_symbols, 1) + call s:assert.equals(g:webdevicons_enable_flagship_statusline, 1) + call s:assert.equals(g:webdevicons_enable_flagship_statusline_fileformat_symbols, 1) + call s:assert.equals(g:webdevicons_enable_startify, 1) + call s:assert.equals(g:webdevicons_conceal_nerdtree_brackets, 1) +endfunction + +function! s:suite.ConfigOptions() + call s:assert.equals(g:DevIconsAppendArtifactFix, 0) + call s:assert.equals(g:DevIconsArtifactFixChar, ' ') + call s:assert.equals(g:WebDevIconsUnicodeDecorateFileNodes, 1) + call s:assert.equals(g:WebDevIconsUnicodeDecorateFolderNodes, 1) + call s:assert.equals(g:DevIconsEnableFoldersOpenClose, 0) + call s:assert.equals(g:DevIconsEnableFolderPatternMatching, 1) + call s:assert.equals(g:DevIconsEnableFolderExtensionPatternMatching, 0) + call s:assert.equals(1, g:WebDevIconsUnicodeDecorateFolderNodesExactMatches, 1) + call s:assert.equals(1, g:WebDevIconsUnicodeGlyphDoubleWidth, 1) + call s:assert.equals(g:WebDevIconsNerdTreeBeforeGlyphPadding, ' ') + call s:assert.equals(g:WebDevIconsNerdTreeAfterGlyphPadding, ' ') + call s:assert.equals(g:WebDevIconsNerdTreeGitPluginForceVAlign, 1) + call s:assert.equals(g:NERDTreeUpdateOnCursorHold, 1) " Obsolete: for backward compatibility + call s:assert.equals(g:NERDTreeGitStatusUpdateOnCursorHold, 1) + call s:assert.equals(g:WebDevIconsTabAirLineBeforeGlyphPadding, ' ') + call s:assert.equals(g:WebDevIconsTabAirLineAfterGlyphPadding, '') +endfunction diff --git a/.vim/pack/vendor/start/vim-devicons/test/fileformat.vim b/.vim/pack/vendor/start/vim-devicons/test/fileformat.vim new file mode 100644 index 0000000..170a27b --- /dev/null +++ b/.vim/pack/vendor/start/vim-devicons/test/fileformat.vim @@ -0,0 +1,29 @@ +scriptencoding utf-8 + +" Please use nerd-font if you watch icon-font + +let s:suite = themis#suite('WebDevIconsGetFileFormatSymbol') +let s:assert = themis#helper('assert') + +function! s:suite.UnixIcon() + set fileformat=unix + let os = system('uname -a') + if os =~# 'Darwin' + call s:assert.equals(WebDevIconsGetFileFormatSymbol(), '') + " It may return Ubuntu because github-actions's OS is Ubuntu + elseif os =~# 'Ubuntu' + call s:assert.equals(WebDevIconsGetFileFormatSymbol(), '') + else + call s:assert.skip('Skip testing except for Ubuntu and Mac.') + endif +endfunction + +function! s:suite.WindowsIcon() + set fileformat=dos + call s:assert.equals(WebDevIconsGetFileFormatSymbol(), '') +endfunction + +function! s:suite.MacIcon() + set fileformat=mac + call s:assert.equals(WebDevIconsGetFileFormatSymbol(), '') +endfunction diff --git a/.vim/pack/vendor/start/vim-devicons/test/filetype.vim b/.vim/pack/vendor/start/vim-devicons/test/filetype.vim new file mode 100644 index 0000000..3669ad9 --- /dev/null +++ b/.vim/pack/vendor/start/vim-devicons/test/filetype.vim @@ -0,0 +1,344 @@ +scriptencoding utf-8 + +" Please use nerd-font if you watch icon-font + +let s:suite = themis#suite('WebDevIconsGetFileTypeSymbol') +let s:assert = themis#helper('assert') + +function! s:Assert(filename, icon) + call s:assert.equals(WebDevIconsGetFileTypeSymbol(a:filename), a:icon) +endfunction + +function! s:suite.NoArgument_GetDefaultIcon() + call s:assert.equals(WebDevIconsGetFileTypeSymbol(), '') +endfunction + +function! s:suite.__OneArgument_VimIcon__() + let targetfilenames = ['.vimrc', 'vimrc', '.gvimrc', '_gvimrc', 'test.vim'] + let expecticon = '' + let child = themis#suite('OneArgument_VimIcon') + + for targetfilename in targetfilenames + let child[targetfilename] = funcref('s:Assert', [targetfilename, expecticon]) + endfor +endfunction + +function! s:suite.__OneArgument_RubyIcon__() + let targetfilenames = ['test.rb', 'rakefile', 'RAKEFILE', 'Gemfile', 'config.ru'] + let expecticon = '' + let child = themis#suite('OneArgument_RubyIcon') + + for targetfilename in targetfilenames + let child[targetfilename] = funcref('s:Assert', [targetfilename, expecticon]) + endfor +endfunction + +function! s:suite.__OneArgument_MarkDownIcon__() + let targetfilenames = ['test.md', 'test.markdown', 'test.mdx', 'test.rmd'] + let expecticon = '' + let child = themis#suite('OneArgument_MarkDownIcon') + + for targetfilename in targetfilenames + let child[targetfilename] = funcref('s:Assert', [targetfilename, expecticon]) + endfor +endfunction + +function! s:suite.__OneArgument_PythonIcon__() + let targetfilenames = ['test.py', 'test.pyc', 'test.pyo', 'test.pyd'] + let expecticon = '' + let child = themis#suite('OneArgument_PythonIcon') + + for targetfilename in targetfilenames + let child[targetfilename] = funcref('s:Assert', [targetfilename, expecticon]) + endfor +endfunction + +function! s:suite.__OneArgument_ShellIcon__() + let targetfilenames = ['test.sh', 'test.fish', 'test.bash', 'test.ksh', 'test.csh', 'test.awk', 'test.ps1'] + let expecticon = '' + let child = themis#suite('OneArgument_ShellIcon') + + for targetfilename in targetfilenames + let child[targetfilename] = funcref('s:Assert', [targetfilename, expecticon]) + endfor +endfunction + +function! s:suite.__OneArgument_DBIcon__() + let targetfilenames = ['test.db', 'test.sql', 'test.dump'] + let expecticon = '' + let child = themis#suite('OneArgument_DBIcon') + + for targetfilename in targetfilenames + let child[targetfilename] = funcref('s:Assert', [targetfilename, expecticon]) + endfor +endfunction + +function! s:suite.__OneArgument_RustIcon__() + let targetfilenames = ['test.rs', 'test.rlib'] + let expecticon = '' + let child = themis#suite('OneArgument_RustIcon') + + for targetfilename in targetfilenames + let child[targetfilename] = funcref('s:Assert', [targetfilename, expecticon]) + endfor +endfunction + +function! s:suite.__OneArgument_DockerIcon__() + let targetfilenames = ['Dockerfile', 'docker-compose.yml'] + let expecticon = '' + let child = themis#suite('OneArgument_DockerIcon') + + for targetfilename in targetfilenames + let child[targetfilename] = funcref('s:Assert', [targetfilename, expecticon]) + endfor +endfunction + +function! s:suite.__OneArgument_JavaScriptIcon__() + let targetfilenames = ['test.js', 'test.mjs'] + let expecticon = '' + let child = themis#suite('OneArgument_JavaScriptIcon') + + for targetfilename in targetfilenames + let child[targetfilename] = funcref('s:Assert', [targetfilename, expecticon]) + endfor +endfunction + +function! s:suite.__OneArgument_ReactIcon__() + let targetfilenames = ['test.jsx', 'test.tsx', 'react.jsx'] + let expecticon = '' + let child = themis#suite('OneArgument_ReactIcon') + + for targetfilename in targetfilenames + let child[targetfilename] = funcref('s:Assert', [targetfilename, expecticon]) + endfor +endfunction + +function! s:suite.__OneArgument_JsonIcon__() + let targetfilenames = ['test.json', 'test.webmanifest'] + let expecticon = '' + let child = themis#suite('OneArgument_JsonIcon') + + for targetfilename in targetfilenames + let child[targetfilename] = funcref('s:Assert', [targetfilename, expecticon]) + endfor +endfunction + +function! s:suite.__OneArgument_GearIcon__() + let targetfilenames = ['.DS_Store', 'Makefile', 'test.mk', '.bashrc', '.zshrc', '.gitignore', '.gitattributes', 'cmakelists.txt', 'test.yaml', 'test.yml', 'test.toml', 'test.bat'] + let expecticon = '' + let child = themis#suite('OneArgument_GearIcon') + + for targetfilename in targetfilenames + let child[targetfilename] = funcref('s:Assert', [targetfilename, expecticon]) + endfor +endfunction + +function! s:suite.__OneArgument_ErlangIcon__() + let targetfilenames = ['test.erl', 'test.hrl'] + let expecticon = '' + let child = themis#suite('OneArgument_ErlangIcon') + + for targetfilename in targetfilenames + let child[targetfilename] = funcref('s:Assert', [targetfilename, expecticon]) + endfor +endfunction + +function! s:suite.__OneArgument_SwiftIcon__() + let targetfilenames = ['test.swift', 'test.xcplayground'] + let expecticon = '' + let child = themis#suite('OneArgument_SwiftIcon') + + for targetfilename in targetfilenames + let child[targetfilename] = funcref('s:Assert', [targetfilename, expecticon]) + endfor +endfunction + +function! s:suite.__OneArgument_HaskellIcon__() + let targetfilenames = ['test.hs', 'test.lhs'] + let expecticon = '' + let child = themis#suite('OneArgument_HaskellIcon') + + for targetfilename in targetfilenames + let child[targetfilename] = funcref('s:Assert', [targetfilename, expecticon]) + endfor +endfunction + +function! s:suite.__OneArgument_CppIcon__() + let targetfilenames = ['test.cpp', 'test.c++', 'test.cp', 'test.cxx', 'test.cc'] + let expecticon = '' + let child = themis#suite('OneArgument_C++Icon') + + for targetfilename in targetfilenames + let child[targetfilename] = funcref('s:Assert', [targetfilename, expecticon]) + endfor +endfunction + +function! s:suite.__OneArgument_ElixirIcon__() + let targetfilenames = ['test.ex', 'test.exs', 'test.eex', 'test.leex', 'test.heex'] + let expecticon = '' + let child = themis#suite('OneArgument_ElixirIcon') + + for targetfilename in targetfilenames + let child[targetfilename] = funcref('s:Assert', [targetfilename, expecticon]) + endfor +endfunction + +function! s:suite.__OneArgument_PerlIcon__() + let targetfilenames = ['test.pl', 'test.pm', 'test.t'] + let expecticon = '' + let child = themis#suite('OneArgument_PerlIcon') + + for targetfilename in targetfilenames + let child[targetfilename] = funcref('s:Assert', [targetfilename, expecticon]) + endfor +endfunction + +function! s:suite.__OneArgument_FSharpIcon__() + let targetfilenames = ['test.fs', 'test.fsx', 'test.fsi', 'test.fsscript'] + let expecticon = '' + let child = themis#suite('OneArgument_FSharpIcon') + + for targetfilename in targetfilenames + let child[targetfilename] = funcref('s:Assert', [targetfilename, expecticon]) + endfor +endfunction + +function! s:suite.OneArgument_GetTypeScriptIcon() + call s:assert.equals(WebDevIconsGetFileTypeSymbol('test.ts'), '') +endfunction + +function! s:suite.OneArgument_GetVueIcon() + call s:assert.equals(WebDevIconsGetFileTypeSymbol('test.vue'), '﵂') +endfunction + +function! s:suite.OneArgument_GetNodeModuleIcon() + call s:assert.equals(WebDevIconsGetFileTypeSymbol('node_modules'), '') +endfunction + +function! s:suite.OneArgument_GetDropboxIcon() + call s:assert.equals(WebDevIconsGetFileTypeSymbol('Dropbox'), '') +endfunction + +function! s:suite.OneArgument_GetRIcon() + call s:assert.equals(WebDevIconsGetFileTypeSymbol('test.r'), 'ﳒ') +endfunction + +function! s:suite.OneArgument_GetLuaIcon() + call s:assert.equals(WebDevIconsGetFileTypeSymbol('test.lua'), '') +endfunction + +function! s:suite.OneArgument_GetJavaIcon() + call s:assert.equals(WebDevIconsGetFileTypeSymbol('test.java'), '') +endfunction + +function! s:suite.OneArgument_GetCIcon() + call s:assert.equals(WebDevIconsGetFileTypeSymbol('test.c'), '') +endfunction + +function! s:suite.OneArgument_GetCSSIcon() + call s:assert.equals(WebDevIconsGetFileTypeSymbol('test.cs'), '') +endfunction + +function! s:suite.OneArgument_GetCSharpIcon() + call s:assert.equals(WebDevIconsGetFileTypeSymbol('test.cs'), '') +endfunction + +function! s:suite.OneArgument_GetElmIcon() + call s:assert.equals(WebDevIconsGetFileTypeSymbol('test.elm'), '') +endfunction + +function! s:suite.OneArgument_GetRssIcon() + call s:assert.equals(WebDevIconsGetFileTypeSymbol('test.rss'), '') +endfunction + +function! s:suite.OneArgument_GetDartIcon() + call s:assert.equals(WebDevIconsGetFileTypeSymbol('test.dart'), '') +endfunction + +function! s:suite.OneArgument_GetSolidityIcon() + call s:assert.equals(WebDevIconsGetFileTypeSymbol('test.sol'), 'ﲹ') +endfunction + +function! s:suite.OneArgument_GetGoIcon() + call s:assert.equals(WebDevIconsGetFileTypeSymbol('test.go'), '') +endfunction + +function! s:suite.OneArgument_GetPhpIcon() + call s:assert.equals(WebDevIconsGetFileTypeSymbol('test.php'),'') +endfunction + +function! s:suite.OneArgument_GetScalaIcon() + call s:assert.equals( WebDevIconsGetFileTypeSymbol('test.scala'), '') +endfunction + +function! s:suite.OneArgument_GetTexIcon() + call s:assert.equals( WebDevIconsGetFileTypeSymbol('test.tex'), 'ﭨ') +endfunction + +function! s:suite.OneArgument_GetLicenseIcon() + call s:assert.equals( WebDevIconsGetFileTypeSymbol('LICENSE'), '') +endfunction + +function! s:suite.OneArgument_GetRobotIcon() + call s:assert.equals( WebDevIconsGetFileTypeSymbol('robots.txt'), 'ﮧ') +endfunction + +function! s:suite.OneArgument_PemIcon() + call s:assert.equals( WebDevIconsGetFileTypeSymbol('test.pem'), '') +endfunction + +function! s:suite.TwoArgument_zero_GetFileIcon() + call s:assert.equals( WebDevIconsGetFileTypeSymbol('test.vim', 0), '') +endfunction + +function! s:suite.TwoArgument_one_GetFolderIcon() + call s:assert.equals( WebDevIconsGetFileTypeSymbol('test.vim', 1), '') +endfunction + +function! s:suite.TwoArgument_two_GetDefaultIcon() + call s:assert.equals( WebDevIconsGetFileTypeSymbol('test.vim', 2), '') +endfunction + +function! s:suite.TwoArgument_string_GetFileTypeIcon() + call s:assert.equals( WebDevIconsGetFileTypeSymbol('test.php', 'test.vim'), '') +endfunction + +function! s:suite.NoArgument_OverWriteFileType_GetVimIcon() + set ft=vim + call s:assert.equals(WebDevIconsGetFileTypeSymbol(), '') +endfunction + +function! s:suite.NoArgument_EditVimFile_GetVimIcon() + edit! test.vim + call s:assert.equals(WebDevIconsGetFileTypeSymbol(), '') +endfunction + +function! s:suite.NoArgument_Editvimrc_GetVimIcon() + edit! vimrc + call s:assert.equals(WebDevIconsGetFileTypeSymbol(), '') +endfunction + +function! s:suite.NoArgument_EditPythonFile_GetPythonIcon() + edit! test.py + call s:assert.equals(WebDevIconsGetFileTypeSymbol(), '') +endfunction + +function! s:suite.NoArgument_EditjavaScriptFile_GetjavaScriptIcon() + edit! test.js + call s:assert.equals(WebDevIconsGetFileTypeSymbol(), '') +endfunction + +function! s:suite.NoArgument_EditRustFile_GetRustIcon() + edit! test.rs + call s:assert.equals(WebDevIconsGetFileTypeSymbol(), '') +endfunction + +function! s:suite.NoArgument_EditMKFile_GetGearIcon() + edit! test.mk + call s:assert.equals(WebDevIconsGetFileTypeSymbol(), '') +endfunction + +function! s:suite.OneArgument_EditPythonFile_GetRubyIcon() + edit! test.py + call s:assert.equals(WebDevIconsGetFileTypeSymbol('test.rb'), '') +endfunction -- cgit v1.2.3