diff options
Diffstat (limited to '.vim/pack/vendor/start/vim-devicons')
19 files changed, 2846 insertions, 0 deletions
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 @@ | |||
| 1 | " Version: 0.11.0 | ||
| 2 | " Webpage: https://github.com/ryanoasis/vim-devicons | ||
| 3 | " Maintainer: Ryan McIntyre <ryanoasis@gmail.com> | ||
| 4 | " License: see LICENSE | ||
| 5 | |||
| 6 | function! airline#extensions#tabline#formatters#webdevicons#format(bufnr, buffers) abort | ||
| 7 | " Call original formatter. | ||
| 8 | let originalFormatter = airline#extensions#tabline#formatters#{g:_webdevicons_airline_orig_formatter}#format(a:bufnr, a:buffers) | ||
| 9 | return originalFormatter . g:WebDevIconsTabAirLineBeforeGlyphPadding . | ||
| 10 | \ WebDevIconsGetFileTypeSymbol(bufname(a:bufnr)) . g:WebDevIconsTabAirLineAfterGlyphPadding | ||
| 11 | endfunction | ||
| 12 | |||
| 13 | " modeline syntax: | ||
| 14 | " 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 @@ | |||
| 1 | " Initialize for up to date ctrlp fork: ctrlpvim/ctrlp.vim | ||
| 2 | " Support for kien/ctrlp.vim deprecated since v0.7.0 | ||
| 3 | " @TODO implementation for CtrlP buffer and find file mode | ||
| 4 | |||
| 5 | function! devicons#plugins#ctrlp#init() abort | ||
| 6 | 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' | ||
| 7 | let l:ctrlp_warned_file = webdevicons#pluginHome() . '/status_warned_ctrlp' | ||
| 8 | |||
| 9 | if exists('g:loaded_ctrlp') && g:webdevicons_enable_ctrlp | ||
| 10 | let l:forkedCtrlp = exists('g:ctrlp_mruf_map_string') | ||
| 11 | |||
| 12 | if l:forkedCtrlp | ||
| 13 | if !exists('g:ctrlp_formatline_func') | ||
| 14 | " logic for ctrlpvim/ctrlp.vim: | ||
| 15 | let g:ctrlp_formatline_func = 's:formatline(s:curtype() == "buf" ? v:val : WebDevIconsGetFileTypeSymbol(v:val) . " " . v:val) ' | ||
| 16 | endif | ||
| 17 | elseif empty(glob(l:ctrlp_warned_file)) | ||
| 18 | " logic for kien/ctrlp.vim: | ||
| 19 | echohl WarningMsg | | ||
| 20 | \ echomsg l:ctrlp_warning_message | ||
| 21 | " only warn first time, do not warn again: | ||
| 22 | try | ||
| 23 | execute writefile(['File automatically generated after warning about CtrlP once', l:ctrlp_warning_message], l:ctrlp_warned_file) | ||
| 24 | catch | ||
| 25 | endtry | ||
| 26 | endif | ||
| 27 | endif | ||
| 28 | endfunction | ||
| 29 | |||
| 30 | " 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 @@ | |||
| 1 | function! devicons#plugins#denite#init() abort | ||
| 2 | let s:denite_ver = (exists('*denite#get_status_mode') ? 2 : 3) | ||
| 3 | if s:denite_ver == 3 | ||
| 4 | call denite#custom#source('file,file/rec,file_mru,file/old,buffer,directory/rec,directory_mru', 'converters', ['devicons_denite_converter']) | ||
| 5 | else | ||
| 6 | call denite#custom#source('file,file_rec,file_mru,file_old,buffer,directory_rec,directory_mru', 'converters', ['devicons_denite_converter']) | ||
| 7 | endif | ||
| 8 | endfunction | ||
| 9 | |||
| 10 | " 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 @@ | |||
| 1 | function! devicons#plugins#flagship#init() abort | ||
| 2 | if g:webdevicons_enable_flagship_statusline | ||
| 3 | augroup webdevicons_flagship_filetype | ||
| 4 | autocmd User Flags call Hoist('buffer', 'WebDevIconsGetFileTypeSymbol') | ||
| 5 | augroup END | ||
| 6 | endif | ||
| 7 | |||
| 8 | if g:webdevicons_enable_flagship_statusline_fileformat_symbols | ||
| 9 | augroup webdevicons_flagship_filesymbol | ||
| 10 | autocmd User Flags call Hoist('buffer', 'WebDevIconsGetFileFormatSymbol') | ||
| 11 | augroup END | ||
| 12 | endif | ||
| 13 | endfunction | ||
| 14 | |||
| 15 | " 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 @@ | |||
| 1 | |||
| 2 | function! devicons#plugins#startify#init() abort | ||
| 3 | exec ":function! StartifyEntryFormat() abort \n return 'WebDevIconsGetFileTypeSymbol(absolute_path) .\" \". entry_path' \n endfunction" | ||
| 4 | endfunction | ||
| 5 | |||
| 6 | " 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 @@ | |||
| 1 | function! devicons#plugins#unite#init() abort | ||
| 2 | let s:filters = { | ||
| 3 | \ 'name': 'devicons_unite_converter' | ||
| 4 | \ } | ||
| 5 | |||
| 6 | function! s:filters.filter(candidates, context) abort | ||
| 7 | for candidate in a:candidates | ||
| 8 | |||
| 9 | if has_key(candidate, 'action__buffer_nr') | ||
| 10 | let bufname = bufname(candidate.action__buffer_nr) | ||
| 11 | let filename = fnamemodify(bufname, ':p:t') | ||
| 12 | let path = fnamemodify(bufname, ':p:h') | ||
| 13 | elseif has_key(candidate, 'word') && has_key(candidate, 'action__path') | ||
| 14 | let path = candidate.action__path | ||
| 15 | let filename = candidate.word | ||
| 16 | endif | ||
| 17 | |||
| 18 | let icon = WebDevIconsGetFileTypeSymbol(filename, isdirectory(filename)) | ||
| 19 | |||
| 20 | " prevent filenames of buffers getting 'lost' | ||
| 21 | if filename != path | ||
| 22 | let path = printf('%s', filename) | ||
| 23 | endif | ||
| 24 | |||
| 25 | " Customize output format. | ||
| 26 | let candidate.abbr = printf('%s %s', icon, path) | ||
| 27 | endfor | ||
| 28 | return a:candidates | ||
| 29 | endfunction | ||
| 30 | |||
| 31 | call unite#define_filter(s:filters) | ||
| 32 | unlet s:filters | ||
| 33 | |||
| 34 | call unite#custom#source('file,file_rec,buffer,file_rec/async,file_rec/neovim,file_rec/neovim2,file_rec/git', 'converters', 'devicons_unite_converter') | ||
| 35 | endfunction | ||
| 36 | |||
| 37 | " 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 @@ | |||
| 1 | function! devicons#plugins#vimfiler#init() abort | ||
| 2 | call vimfiler#custom#profile('default', 'context', { | ||
| 3 | \ 'columns': 'devicons:size:time', | ||
| 4 | \ 'explorer_columns': 'devicons' | ||
| 5 | \ }) | ||
| 6 | endfunction | ||
| 7 | |||
| 8 | " 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 @@ | |||
| 1 | "============================================================================= | ||
| 2 | " FILE: devicons.vim | ||
| 3 | " Version: 0.11.0 | ||
| 4 | " Webpage: https://github.com/ryanoasis/vim-devicons | ||
| 5 | " Maintainer: Ryan McIntyre <ryanoasis@gmail.com> | ||
| 6 | " License: MIT license {{{ | ||
| 7 | " Permission is hereby granted, free of charge, to any person obtaining | ||
| 8 | " a copy of this software and associated documentation files (the | ||
| 9 | " "Software"), to deal in the Software without restriction, including | ||
| 10 | " without limitation the rights to use, copy, modify, merge, publish, | ||
| 11 | " distribute, sublicense, and/or sell copies of the Software, and to | ||
| 12 | " permit persons to whom the Software is furnished to do so, subject to | ||
| 13 | " the following conditions: | ||
| 14 | " | ||
| 15 | " The above copyright notice and this permission notice shall be included | ||
| 16 | " in all copies or substantial portions of the Software. | ||
| 17 | " | ||
| 18 | " THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS | ||
| 19 | " OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF | ||
| 20 | " MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. | ||
| 21 | " IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY | ||
| 22 | " CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, | ||
| 23 | " TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE | ||
| 24 | " SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | ||
| 25 | " }}} | ||
| 26 | "============================================================================= | ||
| 27 | |||
| 28 | let s:save_cpo = &cpo | ||
| 29 | set cpo&vim | ||
| 30 | |||
| 31 | function! vimfiler#columns#devicons#define() abort | ||
| 32 | return s:column | ||
| 33 | endfunction | ||
| 34 | |||
| 35 | let s:column = { | ||
| 36 | \ 'name' : 'devicons', | ||
| 37 | \ 'description' : 'get devicon glyph', | ||
| 38 | \ 'syntax' : 'vimfilerColumn__devicons', | ||
| 39 | \ } | ||
| 40 | |||
| 41 | function! s:column.length(files, context) abort | ||
| 42 | return 3 | ||
| 43 | endfunction | ||
| 44 | |||
| 45 | function! s:column.define_syntax(context) abort "{{{ | ||
| 46 | syntax match vimfilerColumn__TypeText '\[T\]' | ||
| 47 | \ contained containedin=vimfilerColumn__Type | ||
| 48 | syntax match vimfilerColumn__TypeImage '\[I\]' | ||
| 49 | \ contained containedin=vimfilerColumn__Type | ||
| 50 | syntax match vimfilerColumn__TypeArchive '\[A\]' | ||
| 51 | \ contained containedin=vimfilerColumn__Type | ||
| 52 | syntax match vimfilerColumn__TypeExecute '\[X\]' | ||
| 53 | \ contained containedin=vimfilerColumn__Type | ||
| 54 | syntax match vimfilerColumn__TypeMultimedia '\[M\]' | ||
| 55 | \ contained containedin=vimfilerColumn__Type | ||
| 56 | syntax match vimfilerColumn__TypeDirectory '\[do\]' | ||
| 57 | \ contained containedin=vimfilerColumn__Type | ||
| 58 | syntax match vimfilerColumn__TypeSystem '\[S\]' | ||
| 59 | \ contained containedin=vimfilerColumn__Type | ||
| 60 | syntax match vimfilerColumn__TypeLink '\[L\]' | ||
| 61 | \ contained containedin=vimfilerColumn__Type | ||
| 62 | |||
| 63 | highlight def link vimfilerColumn__TypeText Constant | ||
| 64 | highlight def link vimfilerColumn__TypeImage Type | ||
| 65 | highlight def link vimfilerColumn__TypeArchive Special | ||
| 66 | highlight def link vimfilerColumn__TypeExecute Statement | ||
| 67 | highlight def link vimfilerColumn__TypeMultimedia Identifier | ||
| 68 | highlight def link vimfilerColumn__TypeDirectory Preproc | ||
| 69 | highlight def link vimfilerColumn__TypeSystem Comment | ||
| 70 | highlight def link vimfilerColumn__TypeLink Comment | ||
| 71 | endfunction"}}} | ||
| 72 | |||
| 73 | function! s:column.get(file, context) abort | ||
| 74 | return WebDevIconsGetFileTypeSymbol(strpart(a:file.action__path, strridx(a:file.action__path, '/')), a:file.vimfiler__is_directory) | ||
| 75 | endfunction | ||
| 76 | |||
| 77 | let &cpo = s:save_cpo | ||
| 78 | unlet s:save_cpo | ||
| 79 | |||
| 80 | " 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 @@ | |||
| 1 | *devicons* | ||
| 2 | |||
| 3 | =============================================================================== | ||
| 4 | Contents ~ | ||
| 5 | |||
| 6 | 1. Introduction |devicons-introduction| | ||
| 7 | 2. Features |devicons-features| | ||
| 8 | 3. Installation |devicons-installation| | ||
| 9 | 4. Developers |devicons-developers| | ||
| 10 | 5. Troubleshooting |devicons-troubleshooting| | ||
| 11 | 6. Contributing |devicons-contributing| | ||
| 12 | 1. Code of Conduct [22] |devicons-code-of-conduct-22| | ||
| 13 | 2. Contributing Guide [23] |devicons-contributing-guide-23| | ||
| 14 | 3. Promotion |devicons-promotion| | ||
| 15 | 7. Acknowledgments |devicons-acknowledgments| | ||
| 16 | 8. License |devicons-license| | ||
| 17 | 9. Detailed Installation |devicons-detailed-installation| | ||
| 18 | 1. Step 1 'Nerd Font' |Nerd-Font| | ||
| 19 | 2. Step 2 'VimDevIcons Plugin' |VimDevIcons-Plugin| | ||
| 20 | 1. Pathogen [38] |devicons-pathogen-38| | ||
| 21 | 2. NeoBundle [39] |devicons-neobundle-39| | ||
| 22 | 3. Vundle [40] |devicons-vundle-40| | ||
| 23 | 4. Manual |devicons-manual| | ||
| 24 | 3. Step 3 'Configure Vim' |Configure-Vim| | ||
| 25 | 1. Set Encoding |devicons-set-encoding| | ||
| 26 | 2. Set Font |devicons-set-font| | ||
| 27 | 3. vim-airline |devicons-vim-airline| | ||
| 28 | 4. vimrc examples |devicons-vimrc-examples| | ||
| 29 | 4. That's it! You're done. |devicons-thats-it-youre-done.| | ||
| 30 | 10. Usage |devicons-usage| | ||
| 31 | 1. NERDTree |devicons-nerdtree| | ||
| 32 | 2. Unite |devicons-unite| | ||
| 33 | 3. Denite |devicons-denite| | ||
| 34 | 4. Vimfiler |devicons-vimfiler| | ||
| 35 | 5. CtrlP |devicons-ctrlp| | ||
| 36 | 6. Airline |devicons-airline| | ||
| 37 | 7. Startify |devicons-startify| | ||
| 38 | 8. Lightline Setup |devicons-lightline-setup| | ||
| 39 | 9. Powerline Setup |devicons-powerline-setup| | ||
| 40 | 10. Flagship |devicons-flagship| | ||
| 41 | 11. Detailed Features |devicons-detailed-features| | ||
| 42 | 12. Extra Configuration |devicons-extra-configuration| | ||
| 43 | 1. Character Mappings |devicons-character-mappings| | ||
| 44 | 2. API |devicons-api| | ||
| 45 | 1. Public Methods |devicons-public-methods| | ||
| 46 | 2. API Examples |devicons-api-examples| | ||
| 47 | 1. Status line |devicons-status-line| | ||
| 48 | 2. Simple function call |devicons-simple-function-call| | ||
| 49 | 3. Integration with other plugins |devicons-integration-with-other-plugins| | ||
| 50 | 1. vim-startify |devicons-vim-startify| | ||
| 51 | 13. FAQ |devicons-faq| | ||
| 52 | 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| | ||
| 53 | 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| | ||
| 54 | 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| | ||
| 55 | 4. How do I solve issues after re-sourcing my |vimrc|? | ||
| 56 | 5. Why do I have artifacts after (or instead) of icons? |devicons-why-do-i-have-artifacts-after-of-icons| | ||
| 57 | 6. Square brackets around icons |devicons-square-brackets-around-icons| | ||
| 58 | 1. from terminal |devicons-from-terminal| | ||
| 59 | 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| | ||
| 60 | 8. Rationale: Why does this exist? How did this start? |devicons-rationale-why-does-this-exist-how-did-this-start| | ||
| 61 | 14. References |devicons-references| | ||
| 62 | |||
| 63 | =============================================================================== | ||
| 64 | *devicons-introduction* | ||
| 65 | Introduction ~ | ||
| 66 | > | ||
| 67 | _ ___ ____ ____ | ||
| 68 | | | / (_____ ___ / __ \___ _ __/ _/________ ____ _____ | ||
| 69 | | | / / / __ `__ \/ / / / _ | | / // // ___/ __ \/ __ \/ ___/ | ||
| 70 | | |/ / / / / / / / /_/ / __| |/ _/ // /__/ /_/ / / / (__ ) | ||
| 71 | |___/_/_/ /_/ /_/_____/\___/|___/___/\___/\____/_/ /_/____/ | ||
| 72 | < | ||
| 73 | **VimDevIcons** | ||
| 74 | |||
| 75 | Adds Icons to Your Plugins | ||
| 76 | |||
| 77 | Supports plugins such as NERDTree [1], vim-airline [2], CtrlP [3], powerline | ||
| 78 | [4], denite [5], unite [6], lightline.vim [7], vim-startify [8], vimfiler [9], | ||
| 79 | vim-workspace [10] and flagship [11]. | ||
| 80 | |||
| 81 | See Screenshots [12] for more. | ||
| 82 | |||
| 83 | =============================================================================== | ||
| 84 | *devicons-features* | ||
| 85 | Features ~ | ||
| 86 | |||
| 87 | - Adds filetype glyphs (icons) to various vim plugins. | ||
| 88 | - Supports byte order marker (BOM). | ||
| 89 | - Customizable and extendable glyphs settings. | ||
| 90 | - Supports a wide range of file type extensions. | ||
| 91 | - Supports popular full filenames, like '.gitignore', 'node_modules', | ||
| 92 | '.vimrc'. | ||
| 93 | - Works with patched fonts, especially Nerd Fonts [13]. | ||
| 94 | |||
| 95 | See Detailed Features [14] for more. | ||
| 96 | |||
| 97 | See Configuration [15] for a list of configuration and customization options. | ||
| 98 | |||
| 99 | =============================================================================== | ||
| 100 | *devicons-installation* | ||
| 101 | Installation ~ | ||
| 102 | |||
| 103 | 1. Install a Nerd Font compatible font [16] or patch your own [17]. Then set | ||
| 104 | your terminal font (or 'guifont' if you are using GUI version of Vim). | ||
| 105 | |||
| 106 | 2. Install the Vim plugin with your favorite plugin manager, e.g. vim-plug | ||
| 107 | [18]: | ||
| 108 | |||
| 109 | "vim Plug 'ryanoasis/vim-devicons'" | ||
| 110 | |||
| 111 | Always load the vim-devicons as the very last one. | ||
| 112 | |||
| 113 | 3. Configure Vim | ||
| 114 | |||
| 115 | 'vim set encoding=UTF-8' | ||
| 116 | |||
| 117 | No need to set explicitly under Neovim: always uses UTF-8 as the default | ||
| 118 | encoding. | ||
| 119 | |||
| 120 | See Installation [19] for detailed setup instructions | ||
| 121 | |||
| 122 | Use ':help devicons' for further configuration. | ||
| 123 | |||
| 124 | =============================================================================== | ||
| 125 | *devicons-developers* | ||
| 126 | Developers ~ | ||
| 127 | |||
| 128 | See DEVELOPER [20] for how to use the API. | ||
| 129 | |||
| 130 | =============================================================================== | ||
| 131 | *devicons-troubleshooting* | ||
| 132 | Troubleshooting ~ | ||
| 133 | |||
| 134 | See FAQ [21]. | ||
| 135 | |||
| 136 | =============================================================================== | ||
| 137 | *devicons-contributing* | ||
| 138 | Contributing ~ | ||
| 139 | |||
| 140 | ------------------------------------------------------------------------------- | ||
| 141 | *devicons-code-of-conduct-22* | ||
| 142 | Code of Conduct [22] ~ | ||
| 143 | |||
| 144 | This project has adopted a Code of Conduct that we expect project participants | ||
| 145 | to adhere to. Check out code of conduct [22] for further details. | ||
| 146 | |||
| 147 | ------------------------------------------------------------------------------- | ||
| 148 | *devicons-contributing-guide-23* | ||
| 149 | Contributing Guide [23] ~ | ||
| 150 | |||
| 151 | Read our contributing [23] guide to learn about how to send pull requests, | ||
| 152 | creating issues properly. | ||
| 153 | |||
| 154 | ------------------------------------------------------------------------------- | ||
| 155 | *devicons-promotion* | ||
| 156 | Promotion ~ | ||
| 157 | |||
| 158 | You can help us by simply giving a star or voting on vim.org. It will ensure | ||
| 159 | continued development going forward. | ||
| 160 | |||
| 161 | - Star this repository on GitHub [24]. | ||
| 162 | - Vote for it on vim.org [25]. | ||
| 163 | |||
| 164 | =============================================================================== | ||
| 165 | *devicons-acknowledgments* | ||
| 166 | Acknowledgments ~ | ||
| 167 | |||
| 168 | Thanks goes to these people for inspiration and helping with sending PRs. | ||
| 169 | |||
| 170 | - vim-airline [2] | ||
| 171 | - nerdtree [1] | ||
| 172 | - nerdtree-git-plugin [26] by @Xuyuanp [27] | ||
| 173 | - seti-ui [28] by @jesseweed [29] | ||
| 174 | - devicons [30] by @vorillaz [31] | ||
| 175 | - development.svg.icons [32] by @benatespina [33] | ||
| 176 | - Learn Vimscript the Hard Way [34] book by Steve Losh [35] | ||
| 177 | - All contributors [36] | ||
| 178 | |||
| 179 | =============================================================================== | ||
| 180 | *devicons-license* | ||
| 181 | License ~ | ||
| 182 | |||
| 183 | MIT [37] | ||
| 184 | |||
| 185 | =============================================================================== | ||
| 186 | *devicons-detailed-installation* | ||
| 187 | Detailed Installation ~ | ||
| 188 | |||
| 189 | ------------------------------------------------------------------------------- | ||
| 190 | *Nerd-Font* | ||
| 191 | Step 1 'Nerd Font' ~ | ||
| 192 | |||
| 193 | Get a **Nerd Font!** [16] or patch your own. [17] Without this, things break | ||
| 194 | |||
| 195 | ------------------------------------------------------------------------------- | ||
| 196 | *VimDevIcons-Plugin* | ||
| 197 | Step 2 'VimDevIcons Plugin' ~ | ||
| 198 | |||
| 199 | **Set VimDevIcons to load _after_ these plugins!** | ||
| 200 | |||
| 201 | NERDTree [1] | vim-airline [2] | CtrlP [3] | powerline [4] | Denite [5] | unite | ||
| 202 | [6] | lightline.vim [7] | vim-startify [8] | vimfiler [9] | flagship [11] | ||
| 203 | |||
| 204 | Choose your favorite plugin manager | ||
| 205 | |||
| 206 | ------------------------------------------------------------------------------- | ||
| 207 | *devicons-pathogen-38* | ||
| 208 | Pathogen [38] ~ | ||
| 209 | |||
| 210 | - 'git clone https://github.com/ryanoasis/vim-devicons ~/.vim/bundle/vim- | ||
| 211 | devicons' | ||
| 212 | |||
| 213 | ------------------------------------------------------------------------------- | ||
| 214 | *devicons-neobundle-39* | ||
| 215 | NeoBundle [39] ~ | ||
| 216 | |||
| 217 | - Add to vimrc: | ||
| 218 | |||
| 219 | "vim NeoBundle 'ryanoasis/vim-devicons'" * And install it: | ||
| 220 | |||
| 221 | 'vim :so ~/.vimrc :NeoBundleInstall' | ||
| 222 | |||
| 223 | ------------------------------------------------------------------------------- | ||
| 224 | *devicons-vundle-40* | ||
| 225 | Vundle [40] ~ | ||
| 226 | |||
| 227 | - Add to vimrc: | ||
| 228 | |||
| 229 | "vim Plugin 'ryanoasis/vim-devicons'" * And install it: | ||
| 230 | |||
| 231 | 'vim :so ~/.vimrc :PlugInstall' | ||
| 232 | |||
| 233 | ------------------------------------------------------------------------------- | ||
| 234 | *devicons-manual* | ||
| 235 | Manual ~ | ||
| 236 | |||
| 237 | - copy all of the files into your '~/.vim' directory | ||
| 238 | |||
| 239 | ------------------------------------------------------------------------------- | ||
| 240 | *Configure-Vim* | ||
| 241 | Step 3 'Configure Vim' ~ | ||
| 242 | |||
| 243 | Add the following in your '.vimrc' or '.gvimrc': | ||
| 244 | |||
| 245 | ------------------------------------------------------------------------------- | ||
| 246 | *devicons-set-encoding* | ||
| 247 | Set Encoding ~ | ||
| 248 | |||
| 249 | **Set encoding to UTF-8 to show glyphs** | ||
| 250 | |||
| 251 | 'vim set encoding=utf8' | ||
| 252 | |||
| 253 | ------------------------------------------------------------------------------- | ||
| 254 | *devicons-set-font* | ||
| 255 | Set Font ~ | ||
| 256 | |||
| 257 | **Set Vim font to a Nerd Font** | ||
| 258 | |||
| 259 | Linux 'vim set guifont=' | ||
| 260 | > | ||
| 261 | set guifont=DroidSansMono\ Nerd\ Font\ 11 | ||
| 262 | < | ||
| 263 | macOS (OS X) and Windows | ||
| 264 | > | ||
| 265 | set guifont=:h | ||
| 266 | < | ||
| 267 | |||
| 268 | > | ||
| 269 | set guifont=DroidSansMono\ Nerd\ Font:h11 | ||
| 270 | " or: | ||
| 271 | set guifont=DroidSansMono_Nerd_Font:h11 | ||
| 272 | < | ||
| 273 | **Note:** if you don't set 'guifont' then you'll have to set your terminal's | ||
| 274 | font, else things break! | ||
| 275 | |||
| 276 | ------------------------------------------------------------------------------- | ||
| 277 | *devicons-vim-airline* | ||
| 278 | vim-airline ~ | ||
| 279 | |||
| 280 | **If you use vim-airline you need this:** | ||
| 281 | |||
| 282 | 'vim let g:airline_powerline_fonts = 1' | ||
| 283 | |||
| 284 | ------------------------------------------------------------------------------- | ||
| 285 | *devicons-vimrc-examples* | ||
| 286 | vimrc examples ~ | ||
| 287 | |||
| 288 | - Sample Windows vimrc configuration 1 [41] | ||
| 289 | - Sample Linux vimrc configuration 1 [42] | ||
| 290 | |||
| 291 | ------------------------------------------------------------------------------- | ||
| 292 | *devicons-thats-it-youre-done.* | ||
| 293 | That's it! You're done. ~ | ||
| 294 | |||
| 295 | =============================================================================== | ||
| 296 | *devicons-usage* | ||
| 297 | Usage ~ | ||
| 298 | |||
| 299 | If you installed and setup things correctly you should now see icons in the | ||
| 300 | supported plugins! | ||
| 301 | |||
| 302 | **Notes on include order:** _for support of these plugins: NERDTree [1], vim- | ||
| 303 | airline [2], CtrlP [3], powerline [4], Denite [5], unite [6], vimfiler [9], | ||
| 304 | flagship [11] you **must** configure vim to load those plugins__before_ vim- | ||
| 305 | devicons loads. for better nerdtree-git-plugin [26] support, you _should_ | ||
| 306 | configure vim to load nerdtree-git-plugin **_before_** VimDevIcons loads. * if | ||
| 307 | you are lazy loading Denite [5] using the Dein plugin manager, you will need to | ||
| 308 | source VimDevIcons before Denite loads. | ||
| 309 | |||
| 310 | Lightline Setup and Powerline Setup require some extra setup as shown below: | ||
| 311 | |||
| 312 | ------------------------------------------------------------------------------- | ||
| 313 | *devicons-nerdtree* | ||
| 314 | NERDTree ~ | ||
| 315 | |||
| 316 | Should work "out of the box", no particular configuration should be needed. | ||
| 317 | > | ||
| 318 | " Can be enabled or disabled | ||
| 319 | let g:webdevicons_enable_nerdtree = 1 | ||
| 320 | < | ||
| 321 | |||
| 322 | > | ||
| 323 | " whether or not to show the nerdtree brackets around flags | ||
| 324 | let g:webdevicons_conceal_nerdtree_brackets = 1 | ||
| 325 | < | ||
| 326 | ------------------------------------------------------------------------------- | ||
| 327 | *devicons-unite* | ||
| 328 | Unite ~ | ||
| 329 | |||
| 330 | Should work "out of the box", no particular configuration should be needed. | ||
| 331 | > | ||
| 332 | " Can be enabled or disabled | ||
| 333 | " adding the custom source to unite | ||
| 334 | let g:webdevicons_enable_unite = 1 | ||
| 335 | < | ||
| 336 | ------------------------------------------------------------------------------- | ||
| 337 | *devicons-denite* | ||
| 338 | Denite ~ | ||
| 339 | |||
| 340 | Should work "out of the box", no particular configuration should be needed. | ||
| 341 | > | ||
| 342 | " Can be enabled or disabled | ||
| 343 | " Adding the custom source to denite | ||
| 344 | let g:webdevicons_enable_denite = 1 | ||
| 345 | < | ||
| 346 | ------------------------------------------------------------------------------- | ||
| 347 | *devicons-vimfiler* | ||
| 348 | Vimfiler ~ | ||
| 349 | |||
| 350 | Should work "out of the box", no particular configuration should be needed. | ||
| 351 | > | ||
| 352 | " Can be enabled or disabled | ||
| 353 | " adding the column to vimfiler | ||
| 354 | let g:webdevicons_enable_vimfiler = 1 | ||
| 355 | < | ||
| 356 | ------------------------------------------------------------------------------- | ||
| 357 | *devicons-ctrlp* | ||
| 358 | CtrlP ~ | ||
| 359 | |||
| 360 | Should work "out of the box", no particular configuration should be needed. | ||
| 361 | > | ||
| 362 | " Can be enabled or disabled | ||
| 363 | " add glyphs to all modes | ||
| 364 | let g:webdevicons_enable_ctrlp = 1 | ||
| 365 | < | ||
| 366 | ------------------------------------------------------------------------------- | ||
| 367 | *devicons-airline* | ||
| 368 | Airline ~ | ||
| 369 | |||
| 370 | Should work "out of the box", no particular configuration should be needed. | ||
| 371 | > | ||
| 372 | " adding to vim-airline's tabline | ||
| 373 | let g:webdevicons_enable_airline_tabline = 1 | ||
| 374 | < | ||
| 375 | |||
| 376 | > | ||
| 377 | " adding to vim-airline's statusline | ||
| 378 | let g:webdevicons_enable_airline_statusline = 1 | ||
| 379 | < | ||
| 380 | ------------------------------------------------------------------------------- | ||
| 381 | *devicons-startify* | ||
| 382 | Startify ~ | ||
| 383 | |||
| 384 | Should work "out of the box", no particular configuration should be needed. | ||
| 385 | > | ||
| 386 | " Can be enabled or disabled | ||
| 387 | " adding to vim-startify screen | ||
| 388 | let g:webdevicons_enable_startify = 1 | ||
| 389 | < | ||
| 390 | ------------------------------------------------------------------------------- | ||
| 391 | *devicons-lightline-setup* | ||
| 392 | Lightline Setup ~ | ||
| 393 | |||
| 394 | To add the appropriate icon to lightline [7], call the function | ||
| 395 | 'WebDevIconsGetFileTypeSymbol()' and/or 'WebDevIconsGetFileFormatSymbol()' in | ||
| 396 | your '.vimrc'. For example, you could set your sections to: | ||
| 397 | > | ||
| 398 | let g:lightline = { | ||
| 399 | \ 'component_function': { | ||
| 400 | \ 'filetype': 'MyFiletype', | ||
| 401 | \ 'fileformat': 'MyFileformat', | ||
| 402 | \ } | ||
| 403 | \ } | ||
| 404 | |||
| 405 | function! MyFiletype() | ||
| 406 | return winwidth(0) > 70 ? (strlen(&filetype) ? &filetype . ' ' . WebDevIconsGetFileTypeSymbol() : 'no ft') : '' | ||
| 407 | endfunction | ||
| 408 | |||
| 409 | function! MyFileformat() | ||
| 410 | return winwidth(0) > 70 ? (&fileformat . ' ' . WebDevIconsGetFileFormatSymbol()) : '' | ||
| 411 | endfunction | ||
| 412 | < | ||
| 413 | ------------------------------------------------------------------------------- | ||
| 414 | *devicons-powerline-setup* | ||
| 415 | Powerline Setup ~ | ||
| 416 | |||
| 417 | - _Note this is for the current Powerline [4] not the deprecated vim- | ||
| 418 | powerline [43]_ | ||
| 419 | |||
| 420 | To enable for Powerline [4] some |vimrc| and powerline configuration changes | ||
| 421 | are needed: | ||
| 422 | |||
| 423 | |vimrc| changes (only required if you don't already have powerline setup for | ||
| 424 | vim): | ||
| 425 | > | ||
| 426 | set rtp+=$HOME/.local/lib/python2.7/site-packages/powerline/bindings/vim/ | ||
| 427 | |||
| 428 | " Always show statusline | ||
| 429 | set laststatus=2 | ||
| 430 | |||
| 431 | " Use 256 colours (Use this setting only if your terminal supports 256 colours) | ||
| 432 | set t_Co=256 | ||
| 433 | < | ||
| 434 | powerline configuration changes: | ||
| 435 | |||
| 436 | file type segment | ||
| 437 | > | ||
| 438 | { | ||
| 439 | "function": "vim_devicons.powerline.segments.webdevicons", | ||
| 440 | "priority": 10, | ||
| 441 | "draw_soft_divider": false, | ||
| 442 | "after": " " | ||
| 443 | } | ||
| 444 | < | ||
| 445 | file format segment | ||
| 446 | > | ||
| 447 | { | ||
| 448 | "function": "vim_devicons.powerline.segments.webdevicons_file_format", | ||
| 449 | "draw_soft_divider": false, | ||
| 450 | "exclude_modes": ["nc"], | ||
| 451 | "priority": 90 | ||
| 452 | } | ||
| 453 | < | ||
| 454 | for full example see sample file [44] | ||
| 455 | |||
| 456 | ------------------------------------------------------------------------------- | ||
| 457 | *devicons-flagship* | ||
| 458 | Flagship ~ | ||
| 459 | |||
| 460 | Should work "out of the box", no particular configuration should be needed. | ||
| 461 | > | ||
| 462 | " Can be enabled or disabled | ||
| 463 | " adding to flagship's statusline | ||
| 464 | let g:webdevicons_enable_flagship_statusline = 1 | ||
| 465 | < | ||
| 466 | =============================================================================== | ||
| 467 | *devicons-detailed-features* | ||
| 468 | Detailed Features ~ | ||
| 469 | |||
| 470 | - Adds filetype glyphs (icons) to various vim plugins, currently supports: | ||
| 471 | |||
| 472 | - NERDTree [1] | ||
| 473 | |||
| 474 | - Using the version hosted on vimscripts [45] in favor of GitHub will | ||
| 475 | lead to a outdated message, and icons will fail to show. | ||
| 476 | |||
| 477 | - vim-airline [2] (statusline and tabline) | ||
| 478 | |||
| 479 | - CtrlP [3] (All modes now supported) | ||
| 480 | |||
| 481 | - Using the version hosted on vimscripts [46] in favor of GitHub will | ||
| 482 | lead to a outdated message, and icons will fail to show. | ||
| 483 | |||
| 484 | - powerline [4] (statusline) | ||
| 485 | |||
| 486 | - see: powerline setup | ||
| 487 | |||
| 488 | - Denite [5] | ||
| 489 | |||
| 490 | - Currently supports 'file_rec', 'file_old', 'buffer', and | ||
| 491 | 'directory_rec' | ||
| 492 | |||
| 493 | - unite [6] | ||
| 494 | |||
| 495 | - Currently supports 'file', 'file_rec', 'buffer', 'file_rec/async', and | ||
| 496 | 'file_rec/neovim' | ||
| 497 | |||
| 498 | - lightline.vim [7] (statusline) | ||
| 499 | |||
| 500 | - see: lightline setup | ||
| 501 | |||
| 502 | - vim-startify [8] | ||
| 503 | |||
| 504 | - vimfiler [9] | ||
| 505 | |||
| 506 | - flagship [11] | ||
| 507 | |||
| 508 | - Support is **experimental** because the API may be changing [47] | ||
| 509 | |||
| 510 | - vim-workspace [10] | ||
| 511 | |||
| 512 | - Supports byte order marker (BOM) | ||
| 513 | |||
| 514 | - Customizable and extendable glyphs (icons) settings | ||
| 515 | |||
| 516 | - ability to override defaults and use your own characters or glyphs | ||
| 517 | |||
| 518 | - Supports a wide range of file type extensions by default: | ||
| 519 | |||
| 520 | - 'styl, sass, scss, htm, html, slim, ejs, css, less, md, rmd, json, js, jsx, | ||
| 521 | rb, php, py, pyc, pyd, pyo, coffee, mustache, hbs, conf, ini, yml, yaml, | ||
| 522 | bat, jpg, jpeg, bmp, png, gif, twig, cpp, c++, cxx, cc, cp, c, h, hpp, hxx, | ||
| 523 | hs, lhs, lua, java, sh, bash, zsh, ksh, csh, awk, ps1, fish, diff, db, clj, | ||
| 524 | cljs, edn, scala, go, dart, xul, sln, suo, pl, pm, t, rss, f#, fsscript, | ||
| 525 | fsx, fs, fsi, rs, rlib, d, erl, hrl, vim, ai, psd, psb, ts, jl, pp, vue, | ||
| 526 | swift, eex, ex, exs' | ||
| 527 | |||
| 528 | - Supports a few full filename matches, by default: | ||
| 529 | |||
| 530 | - 'gruntfile.coffee, gruntfile.js, gruntfile.ls, gulpfile.coffee, | ||
| 531 | gulpfile.js, gulpfile.ls, dropbox, .ds_store, .gitconfig, .gitignore, | ||
| 532 | .bashrc, .zshrc, .vimrc, .bashprofile, favicon.ico, license, node_modules, | ||
| 533 | react.jsx, procfile' | ||
| 534 | |||
| 535 | - Supports a few library pattern matches, by default: | ||
| 536 | |||
| 537 | - 'jquery, angular, backbone, requirejs, materialize, mootools, Vagrantfile' | ||
| 538 | |||
| 539 | - Works with patched fonts, especially Nerd Fonts [13] | ||
| 540 | |||
| 541 | =============================================================================== | ||
| 542 | *devicons-extra-configuration* | ||
| 543 | Extra Configuration ~ | ||
| 544 | |||
| 545 | - These options can be defined in your |vimrc| or 'gvimrc' | ||
| 546 | |||
| 547 | - Most options are enabled **'1'** by default but can be disabled with | ||
| 548 | **'0'** | ||
| 549 | |||
| 550 | - You _should_**not** need to configure anything, however, the following | ||
| 551 | options are provided for customizing or changing the defaults: | ||
| 552 | > | ||
| 553 | " loading the plugin | ||
| 554 | let g:webdevicons_enable = 1 | ||
| 555 | < | ||
| 556 | |||
| 557 | > | ||
| 558 | " adding the flags to NERDTree | ||
| 559 | let g:webdevicons_enable_nerdtree = 1 | ||
| 560 | < | ||
| 561 | |||
| 562 | > | ||
| 563 | " adding the custom source to unite | ||
| 564 | let g:webdevicons_enable_unite = 1 | ||
| 565 | < | ||
| 566 | |||
| 567 | > | ||
| 568 | " adding the column to vimfiler | ||
| 569 | let g:webdevicons_enable_vimfiler = 1 | ||
| 570 | < | ||
| 571 | |||
| 572 | > | ||
| 573 | " adding to vim-airline's tabline | ||
| 574 | let g:webdevicons_enable_airline_tabline = 1 | ||
| 575 | < | ||
| 576 | |||
| 577 | > | ||
| 578 | " adding to vim-airline's statusline | ||
| 579 | let g:webdevicons_enable_airline_statusline = 1 | ||
| 580 | < | ||
| 581 | |||
| 582 | > | ||
| 583 | " ctrlp glyphs | ||
| 584 | let g:webdevicons_enable_ctrlp = 1 | ||
| 585 | < | ||
| 586 | |||
| 587 | > | ||
| 588 | " adding to vim-startify screen | ||
| 589 | let g:webdevicons_enable_startify = 1 | ||
| 590 | < | ||
| 591 | |||
| 592 | > | ||
| 593 | " adding to flagship's statusline | ||
| 594 | let g:webdevicons_enable_flagship_statusline = 1 | ||
| 595 | < | ||
| 596 | |||
| 597 | > | ||
| 598 | " turn on/off file node glyph decorations (not particularly useful) | ||
| 599 | let g:WebDevIconsUnicodeDecorateFileNodes = 1 | ||
| 600 | < | ||
| 601 | |||
| 602 | > | ||
| 603 | " use double-width(1) or single-width(0) glyphs | ||
| 604 | " only manipulates padding, has no effect on terminal or set(guifont) font | ||
| 605 | let g:WebDevIconsUnicodeGlyphDoubleWidth = 1 | ||
| 606 | < | ||
| 607 | |||
| 608 | > | ||
| 609 | " whether or not to show the nerdtree brackets around flags | ||
| 610 | let g:webdevicons_conceal_nerdtree_brackets = 1 | ||
| 611 | < | ||
| 612 | |||
| 613 | > | ||
| 614 | " the amount of space to use after the glyph character (default ' ') | ||
| 615 | let g:WebDevIconsNerdTreeAfterGlyphPadding = ' ' | ||
| 616 | < | ||
| 617 | |||
| 618 | > | ||
| 619 | " Force extra padding in NERDTree so that the filetype icons line up vertically | ||
| 620 | let g:WebDevIconsNerdTreeGitPluginForceVAlign = 1 | ||
| 621 | < | ||
| 622 | |||
| 623 | > | ||
| 624 | " Adding the custom source to denite | ||
| 625 | let g:webdevicons_enable_denite = 1 | ||
| 626 | |||
| 627 | |||
| 628 | |||
| 629 | " the amount of space to use after the glyph character in vim-airline | ||
| 630 | tabline(default '') | ||
| 631 | let g:WebDevIconsTabAirLineAfterGlyphPadding = ' ' | ||
| 632 | |||
| 633 | |||
| 634 | |||
| 635 | " the amount of space to use before the glyph character in vim-airline | ||
| 636 | tabline(default ' ') | ||
| 637 | let g:WebDevIconsTabAirLineBeforeGlyphPadding = ' ' | ||
| 638 | < | ||
| 639 | ------------------------------------------------------------------------------- | ||
| 640 | *devicons-character-mappings* | ||
| 641 | Character Mappings ~ | ||
| 642 | |||
| 643 | - 'ƛ' is used as an example below, substitute for the glyph you **actually** | ||
| 644 | want to use | ||
| 645 | > | ||
| 646 | " change the default character when no match found | ||
| 647 | let g:WebDevIconsUnicodeDecorateFileNodesDefaultSymbol = 'ƛ' | ||
| 648 | < | ||
| 649 | |||
| 650 | > | ||
| 651 | " set a byte character marker (BOM) utf-8 symbol when retrieving file encoding | ||
| 652 | " disabled by default with no value | ||
| 653 | let g:WebDevIconsUnicodeByteOrderMarkerDefaultSymbol = '' | ||
| 654 | < | ||
| 655 | |||
| 656 | > | ||
| 657 | " enable folder/directory glyph flag (disabled by default with 0) | ||
| 658 | let g:WebDevIconsUnicodeDecorateFolderNodes = 1 | ||
| 659 | < | ||
| 660 | |||
| 661 | > | ||
| 662 | " enable open and close folder/directory glyph flags (disabled by default with 0) | ||
| 663 | let g:DevIconsEnableFoldersOpenClose = 1 | ||
| 664 | < | ||
| 665 | |||
| 666 | > | ||
| 667 | " enable pattern matching glyphs on folder/directory (enabled by default with 1) | ||
| 668 | let g:DevIconsEnableFolderPatternMatching = 1 | ||
| 669 | < | ||
| 670 | |||
| 671 | > | ||
| 672 | " enable file extension pattern matching glyphs on folder/directory (disabled by default with 0) | ||
| 673 | let g:DevIconsEnableFolderExtensionPatternMatching = 0 | ||
| 674 | < | ||
| 675 | |||
| 676 | > | ||
| 677 | " disable showing the distribution for unix file encoding (enabled by default with 1) | ||
| 678 | let g:DevIconsEnableDistro = 0 | ||
| 679 | < | ||
| 680 | |||
| 681 | > | ||
| 682 | " enable custom folder/directory glyph exact matching | ||
| 683 | " (enabled by default when g:WebDevIconsUnicodeDecorateFolderNodes is set to 1) | ||
| 684 | let WebDevIconsUnicodeDecorateFolderNodesExactMatches = 1 | ||
| 685 | < | ||
| 686 | |||
| 687 | > | ||
| 688 | " change the default folder/directory glyph/icon | ||
| 689 | let g:WebDevIconsUnicodeDecorateFolderNodesDefaultSymbol = 'ƛ' | ||
| 690 | < | ||
| 691 | |||
| 692 | > | ||
| 693 | " change the default open folder/directory glyph/icon (default is '') | ||
| 694 | let g:DevIconsDefaultFolderOpenSymbol = 'ƛ' | ||
| 695 | < | ||
| 696 | |||
| 697 | > | ||
| 698 | " change the default dictionary mappings for file extension matches | ||
| 699 | |||
| 700 | let g:WebDevIconsUnicodeDecorateFileNodesExtensionSymbols = {} " needed | ||
| 701 | let g:WebDevIconsUnicodeDecorateFileNodesExtensionSymbols['js'] = 'ƛ' | ||
| 702 | < | ||
| 703 | |||
| 704 | > | ||
| 705 | " change the default dictionary mappings for exact file node matches | ||
| 706 | |||
| 707 | let g:WebDevIconsUnicodeDecorateFileNodesExactSymbols = {} " needed | ||
| 708 | let g:WebDevIconsUnicodeDecorateFileNodesExactSymbols['MyReallyCoolFile.okay'] = 'ƛ' | ||
| 709 | < | ||
| 710 | |||
| 711 | > | ||
| 712 | " add or override individual additional filetypes | ||
| 713 | |||
| 714 | let g:WebDevIconsUnicodeDecorateFileNodesExtensionSymbols = {} " needed | ||
| 715 | let g:WebDevIconsUnicodeDecorateFileNodesExtensionSymbols['myext'] = 'ƛ' | ||
| 716 | < | ||
| 717 | |||
| 718 | > | ||
| 719 | " add or override pattern matches for filetypes | ||
| 720 | " these take precedence over the file extensions | ||
| 721 | |||
| 722 | let g:WebDevIconsUnicodeDecorateFileNodesPatternSymbols = {} " needed | ||
| 723 | let g:WebDevIconsUnicodeDecorateFileNodesPatternSymbols['.*jquery.*\.js$'] = 'ƛ' | ||
| 724 | < | ||
| 725 | specify OS to decide an icon for unix fileformat (_not_ defined by default) - | ||
| 726 | this is useful for avoiding unnecessary 'system()' call. see #135 [48] for | ||
| 727 | further details. | ||
| 728 | > | ||
| 729 | let g:WebDevIconsOS = 'Darwin' | ||
| 730 | < | ||
| 731 | ------------------------------------------------------------------------------- | ||
| 732 | *devicons-api* | ||
| 733 | API ~ | ||
| 734 | > | ||
| 735 | " returns the font character that represents the icon | ||
| 736 | " parameters: a:1 (filename), a:2 (isDirectory) | ||
| 737 | " both parameters optional | ||
| 738 | " by default without parameters uses buffer name | ||
| 739 | WebDevIconsGetFileTypeSymbol(...) | ||
| 740 | |||
| 741 | " returns the font character that represents | ||
| 742 | " the file format as an icon (windows, linux, mac) | ||
| 743 | WebDevIconsGetFileFormatSymbol() | ||
| 744 | < | ||
| 745 | ------------------------------------------------------------------------------- | ||
| 746 | *devicons-public-methods* | ||
| 747 | Public Methods ~ | ||
| 748 | > | ||
| 749 | " Returns the current version of the plugin | ||
| 750 | webdevicons#version() | ||
| 751 | < | ||
| 752 | |||
| 753 | > | ||
| 754 | " Calls webdevicons#softRefresh() | ||
| 755 | " basically a backwards compatibility convenience | ||
| 756 | webdevicons#refresh() | ||
| 757 | < | ||
| 758 | |||
| 759 | > | ||
| 760 | " Does a 'hard' refresh of NERDTree | ||
| 761 | " resets vim-devicons syntax and closes and reopens NERDTree | ||
| 762 | webdevicons#hardRefresh() | ||
| 763 | < | ||
| 764 | |||
| 765 | > | ||
| 766 | " Does a 'soft' refresh of NERDTree | ||
| 767 | " resets vim-devicons syntax and toggles NERDTree to the same state | ||
| 768 | webdevicons#softRefresh() | ||
| 769 | < | ||
| 770 | ------------------------------------------------------------------------------- | ||
| 771 | *devicons-api-examples* | ||
| 772 | API Examples ~ | ||
| 773 | |||
| 774 | ------------------------------------------------------------------------------- | ||
| 775 | *devicons-status-line* | ||
| 776 | Status line ~ | ||
| 777 | |||
| 778 | Custom vim status line (not relying on vim-airline or lightline): | ||
| 779 | > | ||
| 780 | set statusline=%f\ %{WebDevIconsGetFileTypeSymbol()}\ %h%w%m%r\ %=%(%l,%c%V\ %Y\ %=\ %P%) | ||
| 781 | < | ||
| 782 | ------------------------------------------------------------------------------- | ||
| 783 | *devicons-simple-function-call* | ||
| 784 | Simple function call ~ | ||
| 785 | > | ||
| 786 | echo WebDevIconsGetFileFormatSymbol() | ||
| 787 | < | ||
| 788 | ------------------------------------------------------------------------------- | ||
| 789 | *devicons-integration-with-other-plugins* | ||
| 790 | Integration with other plugins ~ | ||
| 791 | |||
| 792 | ------------------------------------------------------------------------------- | ||
| 793 | *devicons-vim-startify* | ||
| 794 | vim-startify ~ | ||
| 795 | > | ||
| 796 | let entry_format = "' ['. index .']'. repeat(' ', (3 - strlen(index)))" | ||
| 797 | |||
| 798 | if exists('*WebDevIconsGetFileTypeSymbol') " support for vim-devicons | ||
| 799 | let entry_format .= ". WebDevIconsGetFileTypeSymbol(entry_path) .' '. entry_path" | ||
| 800 | else | ||
| 801 | let entry_format .= '. entry_path' | ||
| 802 | endif | ||
| 803 | < | ||
| 804 | =============================================================================== | ||
| 805 | *devicons-faq* | ||
| 806 | FAQ ~ | ||
| 807 | |||
| 808 | **Table of Contents:** | ||
| 809 | |||
| 810 | **It's not working at all:** | ||
| 811 | |||
| 812 | - **Why isn't it working? How come I don't see any icons?** | ||
| 813 | |||
| 814 | **Syntax or color highlighting:** | ||
| 815 | |||
| 816 | - **How did you get color matching based on file type in NERDtree?** | ||
| 817 | - **How did you get color matching on just the glyph/icon in NERDtree?** | ||
| 818 | |||
| 819 | **Re-sourcing |vimrc|:** | ||
| 820 | |||
| 821 | - **How do I solve issues after re-sourcing my |vimrc|?** | ||
| 822 | |||
| 823 | **Weird artifacts after/on the glyphs:** | ||
| 824 | |||
| 825 | - **Why do I have artifacts after (or instead) of icons?** | ||
| 826 | - **Square brackets around icons?** | ||
| 827 | |||
| 828 | **Fonts:** | ||
| 829 | |||
| 830 | - **Do I have to use a patched font such as Nerd Fonts?** | ||
| 831 | |||
| 832 | **Why does this exist? How did this start?** | ||
| 833 | |||
| 834 | ------------------------------------------------------------------------------- | ||
| 835 | *devicons-why-isnt-it-working-how-come-i-dont-see-any-icons* | ||
| 836 | Why isn't it working? How come I don't see any icons? ~ | ||
| 837 | |||
| 838 | - Are you using the patched font provided in the separate repo (Nerd Fonts | ||
| 839 | [13]) or are you patching your own? | ||
| 840 | |||
| 841 | - _NOTE:_ if running vim and no font set it will default to the terminal font | ||
| 842 | that is set | ||
| 843 | |||
| 844 | - check what the vim/gvim font is set to, from ex mode: | ||
| 845 | |||
| 846 | 'vim :set guifont?' | ||
| 847 | |||
| 848 | - check if the plugin is loaded (should give '1'), from ex mode: | ||
| 849 | |||
| 850 | 'vim :echo loaded_webdevicons' | ||
| 851 | |||
| 852 | - check if the plugin is enabled (should give '1'), from ex mode: | ||
| 853 | |||
| 854 | 'vim :echo g:webdevicons_enable' | ||
| 855 | |||
| 856 | - check if the plugin is enabled for NERDTree (should give '1'), from ex | ||
| 857 | mode: | ||
| 858 | |||
| 859 | - this should _NOT_ need to be set under normal circumstances | ||
| 860 | |||
| 861 | 'vim :echo g:webdevicons_enable_nerdtree' | ||
| 862 | |||
| 863 | - check if you are able to see the characters, from ex mode: | ||
| 864 | |||
| 865 | 'vim :echo g:WebDevIconsUnicodeDecorateFileNodesDefaultSymbol' | ||
| 866 | |||
| 867 | - if all this looks correct you may try this to see if any files show flags | ||
| 868 | |||
| 869 | - last resort, see if you can even set the default symbol and have it | ||
| 870 | display anywhere (NERDTree, vim-airline's statusline, vim-airlines's | ||
| 871 | tabline), from ex mode: | ||
| 872 | |||
| 873 | "vim :let g:WebDevIconsUnicodeDecorateFileNodesDefaultSymbol='x'" | ||
| 874 | |||
| 875 | ------------------------------------------------------------------------------- | ||
| 876 | *devicons-how-did-you-get-color-matching-based-on-file-type-in-nerdtree* | ||
| 877 | How did you get color matching based on file type in NERDtree? ~ | ||
| 878 | |||
| 879 | - You can either use this additional plugin: vim-nerdtree-syntax-highlight | ||
| 880 | [49] created by @tiagofumo [50] | ||
| 881 | |||
| 882 | - Or you can use my current settings from: | ||
| 883 | https://github.com/scrooloose/nerdtree/issues/201#issuecomment-9954740 | ||
| 884 | |||
| 885 | ```vim " NERDTress File highlighting function! | ||
| 886 | NERDTreeHighlightFile(extension, fg, bg, guifg, guibg) exec 'autocmd | ||
| 887 | FileType nerdtree highlight ' . a:extension .' ctermbg='. a:bg .' | ||
| 888 | ctermfg='. a:fg .' guibg='. a:guibg .' guifg='. a:guifg exec 'autocmd | ||
| 889 | FileType nerdtree syn match ' . a:extension .' #^\s+.*'. a:extension .'$#' | ||
| 890 | endfunction | ||
| 891 | |||
| 892 | call NERDTreeHighlightFile('jade', 'green', 'none', 'green', '#151515') | ||
| 893 | call NERDTreeHighlightFile('ini', 'yellow', 'none', 'yellow', '#151515') | ||
| 894 | call NERDTreeHighlightFile('md', 'blue', 'none', '#3366FF', '#151515') call | ||
| 895 | NERDTreeHighlightFile('yml', 'yellow', 'none', 'yellow', '#151515') call | ||
| 896 | NERDTreeHighlightFile('config', 'yellow', 'none', 'yellow', '#151515') call | ||
| 897 | NERDTreeHighlightFile('conf', 'yellow', 'none', 'yellow', '#151515') call | ||
| 898 | NERDTreeHighlightFile('json', 'yellow', 'none', 'yellow', '#151515') call | ||
| 899 | NERDTreeHighlightFile('html', 'yellow', 'none', 'yellow', '#151515') call | ||
| 900 | NERDTreeHighlightFile('styl', 'cyan', 'none', 'cyan', '#151515') call | ||
| 901 | NERDTreeHighlightFile('css', 'cyan', 'none', 'cyan', '#151515') call | ||
| 902 | NERDTreeHighlightFile('coffee', 'Red', 'none', 'red', '#151515') call | ||
| 903 | NERDTreeHighlightFile('js', 'Red', 'none', '#ffa500', '#151515') call | ||
| 904 | NERDTreeHighlightFile('php', 'Magenta', 'none', '#ff00ff', '#151515') call | ||
| 905 | NERDTreeHighlightFile('ds_store', 'Gray', 'none', '#686868', '#151515') | ||
| 906 | call NERDTreeHighlightFile('gitconfig', 'Gray', 'none', '#686868', | ||
| 907 | '#151515') call NERDTreeHighlightFile('gitignore', 'Gray', 'none', | ||
| 908 | '#686868', '#151515') call NERDTreeHighlightFile('bashrc', 'Gray', 'none', | ||
| 909 | '#686868', '#151515') call NERDTreeHighlightFile('bashprofile', 'Gray', | ||
| 910 | 'none', '#686868', '#151515') 'Note: If the colors still are not | ||
| 911 | highlighting, try invoking such as:' autocmd VimEnter * call | ||
| 912 | NERDTreeHighlightFile('jade', 'green', 'none', 'green', '#151515') ``` per: | ||
| 913 | https://github.com/ryanoasis/vim-devicons/issues/49#issuecomment-101753558 | ||
| 914 | |||
| 915 | ------------------------------------------------------------------------------- | ||
| 916 | *devicons-how-did-you-get-color-matching-on-just-glyph-icon-in-nerdtree* | ||
| 917 | How did you get color matching on just the glyph/icon in NERDtree? ~ | ||
| 918 | |||
| 919 | - You can add something like this to your |vimrc| | ||
| 920 | |||
| 921 | ```vim " NERDTress File highlighting only the glyph/icon " test highlight | ||
| 922 | just the glyph (icons) in nerdtree: autocmd filetype nerdtree highlight | ||
| 923 | haskell_icon ctermbg=none ctermfg=Red guifg=#ffa500 autocmd filetype | ||
| 924 | nerdtree highlight html_icon ctermbg=none ctermfg=Red guifg=#ffa500 autocmd | ||
| 925 | filetype nerdtree highlight go_icon ctermbg=none ctermfg=Red guifg=#ffa500 | ||
| 926 | |||
| 927 | autocmd filetype nerdtree syn match haskell_icon ## | ||
| 928 | containedin=NERDTreeFile " if you are using another syn highlight for a | ||
| 929 | given line (e.g. " NERDTreeHighlightFile) need to give that name in the | ||
| 930 | 'containedin' for this " other highlight to work with it autocmd filetype | ||
| 931 | nerdtree syn match html_icon ## containedin=NERDTreeFile,html autocmd | ||
| 932 | filetype nerdtree syn match go_icon ## containedin=NERDTreeFile ``` | ||
| 933 | |||
| 934 | ------------------------------------------------------------------------------- | ||
| 935 | How do I solve issues after re-sourcing my *vimrc*? | ||
| 936 | |||
| 937 | - Try adding this to the bottom of your |vimrc| | ||
| 938 | |||
| 939 | 'vim if exists("g:loaded_webdevicons") call webdevicons#refresh() endif' | ||
| 940 | |||
| 941 | ------------------------------------------------------------------------------- | ||
| 942 | *devicons-why-do-i-have-artifacts-after-of-icons* | ||
| 943 | Why do I have artifacts after (or instead) of icons? ~ | ||
| 944 | |||
| 945 | - Dots after icons in NERDTree (on GVim), try: | ||
| 946 | |||
| 947 | 'vim autocmd FileType nerdtree setlocal nolist' | ||
| 948 | |||
| 949 | source: Issue #110 [51] | ||
| 950 | |||
| 951 | - Newly created files in NERDTree are slow to show the glyph (icon) | ||
| 952 | - check your current setting of ':updatetime?' | ||
| 953 | - try setting 'updatetime' in your |vimrc| to a lower value like '250', for | ||
| 954 | more info see: Issue #153 [52] | ||
| 955 | |||
| 956 | ------------------------------------------------------------------------------- | ||
| 957 | *devicons-square-brackets-around-icons* | ||
| 958 | Square brackets around icons ~ | ||
| 959 | |||
| 960 | - By default if your Vim supports conceal you should not see these, debug | ||
| 961 | steps: | ||
| 962 | |||
| 963 | - Check if the plugin feature is set (should be '1'): | ||
| 964 | |||
| 965 | 'vim echo g:webdevicons_conceal_nerdtree_brackets' | ||
| 966 | |||
| 967 | - Check that your vim was compiled with the 'conceal' feature (should be | ||
| 968 | '+conceal'): | ||
| 969 | |||
| 970 | ```shell | ||
| 971 | |||
| 972 | ------------------------------------------------------------------------------- | ||
| 973 | *devicons-from-terminal* | ||
| 974 | from terminal ~ | ||
| 975 | |||
| 976 | vim --version | grep conceal ``` | ||
| 977 | |||
| 978 | - Check the 'conceallevel' (should be '3'): | ||
| 979 | |||
| 980 | 'vim set conceallevel?' | ||
| 981 | |||
| 982 | ------------------------------------------------------------------------------- | ||
| 983 | *devicons-do-i-have-to-use-patched-font-such-as-nerd-fonts* | ||
| 984 | Do I have to use a patched font such as Nerd Fonts? ~ | ||
| 985 | |||
| 986 | VimDevIcons was desired to work with Nerd Fonts [13], however you do _not_ have | ||
| 987 | to use a patched font or even Nerd Fonts specified glyphs. You have 2 main | ||
| 988 | options: | ||
| 989 | |||
| 990 | fontconfig fallback | ||
| 991 | |||
| 992 | 1. Install the NERD Font symbol fonts: | ||
| 993 | |||
| 994 | 2. Symbols Nerd Font:style=1000-em [53] | ||
| 995 | |||
| 996 | 3. Symbols Nerd Font:style=2048-em [54] | ||
| 997 | |||
| 998 | 4. Install 10-nerd-font-symbols.conf [55] for Fontconfig | ||
| 999 | |||
| 1000 | 5. for additional information see: Issue #124 [56] and [Nerd Fonts | ||
| 1001 | 'fontconfig'] | ||
| 1002 | |||
| 1003 | Use your own glyph codepoints | ||
| 1004 | |||
| 1005 | - specify your own glyphs and/or use your own font (see: Character Mappings | ||
| 1006 | [57]) | ||
| 1007 | |||
| 1008 | ------------------------------------------------------------------------------- | ||
| 1009 | *devicons-rationale-why-does-this-exist-how-did-this-start* | ||
| 1010 | Rationale: Why does this exist? How did this start? ~ | ||
| 1011 | |||
| 1012 | After seeing the awesome theme for Atom (seti-ui) and the awesome plugins work | ||
| 1013 | done for NERDTree and vim-airline and wanting something like this for Vim I | ||
| 1014 | decided to create my first plugin. | ||
| 1015 | |||
| 1016 | =============================================================================== | ||
| 1017 | *devicons-references* | ||
| 1018 | References ~ | ||
| 1019 | |||
| 1020 | [1] https://github.com/scrooloose/nerdtree | ||
| 1021 | [2] https://github.com/vim-airline/vim-airline | ||
| 1022 | [3] https://github.com/ctrlpvim/ctrlp.vim | ||
| 1023 | [4] https://github.com/powerline/powerline | ||
| 1024 | [5] https://github.com/Shougo/denite.nvim | ||
| 1025 | [6] https://github.com/Shougo/unite.vim | ||
| 1026 | [7] https://github.com/itchyny/lightline.vim | ||
| 1027 | [8] https://github.com/mhinz/vim-startify | ||
| 1028 | [9] https://github.com/Shougo/vimfiler.vim | ||
| 1029 | [10] https://github.com/bagrat/vim-workspace | ||
| 1030 | [11] https://github.com/tpope/vim-flagship | ||
| 1031 | [12] https://github.com/ryanoasis/vim-devicons/wiki/screenshots | ||
| 1032 | [13] https://github.com/ryanoasis/nerd-fonts | ||
| 1033 | [14] https://github.com/ryanoasis/vim-devicons/wiki/Detailed-Features | ||
| 1034 | [15] https://github.com/ryanoasis/vim-devicons/wiki/Extra-Configuration | ||
| 1035 | [16] https://github.com/ryanoasis/nerd-fonts#font-installation | ||
| 1036 | [17] https://github.com/ryanoasis/nerd-fonts#font-patcher | ||
| 1037 | [18] https://github.com/junegunn/vim-plug | ||
| 1038 | [19] https://github.com/ryanoasis/vim-devicons/wiki/Installation | ||
| 1039 | [20] DEVELOPER.md | ||
| 1040 | [21] https://github.com/ryanoasis/vim-devicons/wiki/FAQ-&-Troubleshooting | ||
| 1041 | [22] CODE_OF_CONDUCT.md | ||
| 1042 | [23] CONTRIBUTING.md | ||
| 1043 | [24] https://github.com/ryanoasis/vim-devicons | ||
| 1044 | [25] http://www.vim.org/scripts/script.php?script_id=5114 | ||
| 1045 | [26] https://github.com/Xuyuanp/nerdtree-git-plugin | ||
| 1046 | [27] https://github.com/Xuyuanp | ||
| 1047 | [28] https://atom.io/themes/seti-ui | ||
| 1048 | [29] https://github.com/jesseweed | ||
| 1049 | [30] http://vorillaz.github.io/devicons | ||
| 1050 | [31] https://github.com/vorillaz | ||
| 1051 | [32] https://github.com/benatespina/development.svg.icons | ||
| 1052 | [33] https://github.com/benatespina | ||
| 1053 | [34] http://learnvimscriptthehardway.stevelosh.com/ | ||
| 1054 | [35] http://stevelosh.com/ | ||
| 1055 | [36] https://github.com/ryanoasis/vim-devicons/graphs/contributors | ||
| 1056 | [37] LICENSE | ||
| 1057 | [38] https://github.com/tpope/vim-pathogen | ||
| 1058 | [39] https://github.com/Shougo/neobundle.vim | ||
| 1059 | [40] https://github.com/gmarik/vundle | ||
| 1060 | [41] https://github.com/ryanoasis/vim-devicons/wiki/samples/v0.10.x/.vimrc-windows-1 | ||
| 1061 | [42] https://github.com/ryanoasis/vim-devicons/wiki/samples/v0.10.x/.vimrc-linux-1 | ||
| 1062 | [43] https://github.com/Lokaltog/vim-powerline | ||
| 1063 | [44] https://github.com/ryanoasis/vim-devicons/wiki/samples/v0.10.x/powerline/themes/vim/default.json | ||
| 1064 | [45] http://www.vim.org/scripts/script.php?script_id=1658 | ||
| 1065 | [46] http://www.vim.org/scripts/script.php?script_id=3736 | ||
| 1066 | [47] https://github.com/tpope/vim-flagship/issues/6#issuecomment-116121220 | ||
| 1067 | [48] https://github.com/ryanoasis/vim-devicons/pull/135 | ||
| 1068 | [49] https://github.com/tiagofumo/vim-nerdtree-syntax-highlight | ||
| 1069 | [50] https://github.com/tiagofumo | ||
| 1070 | [51] https://github.com/ryanoasis/vim-devicons/issues/110#issue-103801335 | ||
| 1071 | [52] https://github.com/ryanoasis/vim-devicons/issues/153 | ||
| 1072 | [53] https://github.com/ryanoasis/nerd-fonts/blob/master/src/glyphs/Symbols-1000-em%20Nerd%20Font%20Complete.ttf | ||
| 1073 | [54] https://github.com/ryanoasis/nerd-fonts/blob/master/src/glyphs/Symbols-2048-em%20Nerd%20Font%20Complete.ttf | ||
| 1074 | [55] https://github.com/ryanoasis/nerd-fonts/blob/master/10-nerd-font-symbols.conf | ||
| 1075 | [56] https://github.com/ryanoasis/vim-devicons/issues/124 | ||
| 1076 | [57] https://github.com/ryanoasis/vim-devicons#character-mappings | ||
| 1077 | |||
| 1078 | 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 @@ | |||
| 1 | " Version: 0.11.0 | ||
| 2 | " Webpage: https://github.com/ryanoasis/vim-devicons | ||
| 3 | " Maintainer: Ryan McIntyre <ryanoasis@gmail.com> | ||
| 4 | " License: see LICENSE | ||
| 5 | |||
| 6 | " @todo fix duplicate global variable initialize here: | ||
| 7 | if !exists('g:webdevicons_enable') | ||
| 8 | let g:webdevicons_enable = 1 | ||
| 9 | endif | ||
| 10 | |||
| 11 | if !exists('g:webdevicons_enable_nerdtree') | ||
| 12 | let g:webdevicons_enable_nerdtree = 1 | ||
| 13 | endif | ||
| 14 | |||
| 15 | if !exists('g:DevIconsEnableFoldersOpenClose') | ||
| 16 | let g:DevIconsEnableFoldersOpenClose = 0 | ||
| 17 | endif | ||
| 18 | |||
| 19 | if !exists('g:DevIconsEnableFolderPatternMatching') | ||
| 20 | let g:DevIconsEnableFolderPatternMatching = 1 | ||
| 21 | endif | ||
| 22 | |||
| 23 | if !exists('g:DevIconsEnableFolderExtensionPatternMatching') | ||
| 24 | let g:DevIconsEnableFolderExtensionPatternMatching = 0 | ||
| 25 | endif | ||
| 26 | |||
| 27 | " end @todo duplicate global variables | ||
| 28 | |||
| 29 | " Temporary (hopefully) fix for glyph issues in gvim (proper fix is with the | ||
| 30 | " actual font patcher) | ||
| 31 | if !exists('g:webdevicons_gui_glyph_fix') | ||
| 32 | if has('gui_running') | ||
| 33 | let g:webdevicons_gui_glyph_fix = 1 | ||
| 34 | else | ||
| 35 | let g:webdevicons_gui_glyph_fix = 0 | ||
| 36 | endif | ||
| 37 | endif | ||
| 38 | |||
| 39 | if !exists('g:DevIconsEnableNERDTreeRedraw') | ||
| 40 | if has('gui_running') | ||
| 41 | let g:DevIconsEnableNERDTreeRedraw = 1 | ||
| 42 | else | ||
| 43 | let g:DevIconsEnableNERDTreeRedraw = 0 | ||
| 44 | endif | ||
| 45 | endif | ||
| 46 | |||
| 47 | if g:webdevicons_enable_nerdtree == 1 | ||
| 48 | if !exists('g:loaded_nerd_tree') | ||
| 49 | echohl WarningMsg | | ||
| 50 | \ echomsg 'vim-webdevicons requires NERDTree to be loaded before vim-webdevicons.' | ||
| 51 | endif | ||
| 52 | |||
| 53 | if exists('g:loaded_nerd_tree') && g:loaded_nerd_tree == 1 && !exists('g:NERDTreePathNotifier') | ||
| 54 | let g:webdevicons_enable_nerdtree = 0 | ||
| 55 | echohl WarningMsg | | ||
| 56 | \ echomsg 'vim-webdevicons requires a newer version of NERDTree to show glyphs in NERDTree - consider updating NERDTree.' | ||
| 57 | endif | ||
| 58 | |||
| 59 | " @todo I don't even want this to execute UNLESS the user has the | ||
| 60 | " 'nerdtree-git-plugin' INSTALLED (not LOADED) | ||
| 61 | " As it currently functions this warning will display even if the user does | ||
| 62 | " not have nerdtree-git-plugin not just if it isn't loaded yet | ||
| 63 | " (not what we want) | ||
| 64 | "if !exists('g:loaded_nerdtree_git_status') | ||
| 65 | " echohl WarningMsg | | ||
| 66 | " \ echomsg 'vim-webdevicons works better when 'nerdtree-git-plugin' is loaded before vim-webdevicons (small refresh issues otherwise).' | ||
| 67 | "endif | ||
| 68 | endif | ||
| 69 | |||
| 70 | if !exists('g:webdevicons_enable_airline_tabline') | ||
| 71 | let g:webdevicons_enable_airline_tabline = 1 | ||
| 72 | endif | ||
| 73 | |||
| 74 | if !exists('g:webdevicons_enable_airline_statusline') | ||
| 75 | let g:webdevicons_enable_airline_statusline = 1 | ||
| 76 | endif | ||
| 77 | |||
| 78 | function! s:SetupListeners() | ||
| 79 | call g:NERDTreePathNotifier.AddListener('init', 'NERDTreeWebDevIconsRefreshListener') | ||
| 80 | call g:NERDTreePathNotifier.AddListener('refresh', 'NERDTreeWebDevIconsRefreshListener') | ||
| 81 | call g:NERDTreePathNotifier.AddListener('refreshFlags', 'NERDTreeWebDevIconsRefreshListener') | ||
| 82 | endfunction | ||
| 83 | |||
| 84 | " util like helpers | ||
| 85 | " scope: local | ||
| 86 | function! s:Refresh() | ||
| 87 | call b:NERDTree.root.refreshFlags() | ||
| 88 | call NERDTreeRender() | ||
| 89 | endfunction | ||
| 90 | |||
| 91 | " Temporary (hopefully) fix for glyph issues in gvim (proper fix is with the | ||
| 92 | " actual font patcher) | ||
| 93 | |||
| 94 | " NERDTree-C | ||
| 95 | " scope: global | ||
| 96 | function! WebDevIconsNERDTreeChangeRootHandler(node) | ||
| 97 | call b:NERDTree.changeRoot(a:node) | ||
| 98 | call NERDTreeRender() | ||
| 99 | call a:node.putCursorHere(0, 0) | ||
| 100 | if g:DevIconsEnableNERDTreeRedraw ==# 1 | ||
| 101 | redraw! | ||
| 102 | endif | ||
| 103 | endfunction | ||
| 104 | |||
| 105 | " NERDTree-u | ||
| 106 | " scope: global | ||
| 107 | function! WebDevIconsNERDTreeUpDirCurrentRootClosedHandler() | ||
| 108 | call nerdtree#ui_glue#upDir(0) | ||
| 109 | if g:DevIconsEnableNERDTreeRedraw ==# 1 | ||
| 110 | redraw! | ||
| 111 | endif | ||
| 112 | endfunction | ||
| 113 | |||
| 114 | function! WebDevIconsNERDTreeDirUpdateFlags(node, glyph) | ||
| 115 | let path = a:node.path | ||
| 116 | let isOpen = a:node.isOpen | ||
| 117 | let postPadding = g:WebDevIconsNerdTreeAfterGlyphPadding | ||
| 118 | let prePadding = g:WebDevIconsNerdTreeBeforeGlyphPadding | ||
| 119 | let hasGitFlags = (len(path.flagSet._flagsForScope('git')) > 0) | ||
| 120 | let hasGitNerdTreePlugin = (exists('g:loaded_nerdtree_git_status') == 1) | ||
| 121 | let collapsesToSameLine = (exists('g:NERDTreeCascadeSingleChildDir') == 1) | ||
| 122 | let dirHasOnlyOneChildDir = 0 | ||
| 123 | |||
| 124 | if collapsesToSameLine | ||
| 125 | " need to call to determin children: | ||
| 126 | call a:node._initChildren(1) | ||
| 127 | let dirHasOnlyOneChildDir = (a:node.getChildCount() ==# 1 && a:node.children[0].path.isDirectory) | ||
| 128 | endif | ||
| 129 | |||
| 130 | " properly set collapsed/combined directory display to opened glyph | ||
| 131 | if collapsesToSameLine && dirHasOnlyOneChildDir | ||
| 132 | call WebDevIconsNERDTreeDirOpen(a:node.children[0]) | ||
| 133 | endif | ||
| 134 | |||
| 135 | " align vertically at the same level: non git-flag nodes with git-flag nodes | ||
| 136 | if g:WebDevIconsNerdTreeGitPluginForceVAlign && !hasGitFlags && hasGitNerdTreePlugin | ||
| 137 | let prePadding .= ' ' | ||
| 138 | endif | ||
| 139 | |||
| 140 | let flag = prePadding . a:glyph . postPadding | ||
| 141 | |||
| 142 | call a:node.path.flagSet.clearFlags('webdevicons') | ||
| 143 | |||
| 144 | if flag !=? '' | ||
| 145 | call a:node.path.flagSet.addFlag('webdevicons', flag) | ||
| 146 | "echom "added flag of " . flag | ||
| 147 | call a:node.path.refreshFlags(b:NERDTree) | ||
| 148 | "echom "flagset is now " . string(a:node.path.flagSet) | ||
| 149 | endif | ||
| 150 | endfunction | ||
| 151 | |||
| 152 | function! WebDevIconsNERDTreeDirClose(node) | ||
| 153 | let a:node.path.isOpen = 0 | ||
| 154 | let glyph = g:WebDevIconsUnicodeDecorateFolderNodesDefaultSymbol | ||
| 155 | call WebDevIconsNERDTreeDirUpdateFlags(a:node, glyph) | ||
| 156 | endfunction | ||
| 157 | |||
| 158 | function! WebDevIconsNERDTreeDirOpen(node) | ||
| 159 | let a:node.path.isOpen = 1 | ||
| 160 | let glyph = g:DevIconsDefaultFolderOpenSymbol | ||
| 161 | call WebDevIconsNERDTreeDirUpdateFlags(a:node, glyph) | ||
| 162 | endfunction | ||
| 163 | |||
| 164 | function! WebDevIconsNERDTreeDirOpenRecursively(node) | ||
| 165 | call WebDevIconsNERDTreeDirOpen(a:node) | ||
| 166 | for i in a:node.children | ||
| 167 | if i.path.isDirectory ==# 1 | ||
| 168 | call WebDevIconsNERDTreeDirOpenRecursively(i) | ||
| 169 | endif | ||
| 170 | endfor | ||
| 171 | endfunction | ||
| 172 | |||
| 173 | function! WebDevIconsNERDTreeDirCloseRecursively(node) | ||
| 174 | call WebDevIconsNERDTreeDirClose(a:node) | ||
| 175 | for i in a:node.children | ||
| 176 | if i.path.isDirectory ==# 1 | ||
| 177 | call WebDevIconsNERDTreeDirCloseRecursively(i) | ||
| 178 | endif | ||
| 179 | endfor | ||
| 180 | endfunction | ||
| 181 | |||
| 182 | function! WebDevIconsNERDTreeDirCloseChildren(node) | ||
| 183 | for i in a:node.children | ||
| 184 | if i.path.isDirectory ==# 1 | ||
| 185 | call WebDevIconsNERDTreeDirClose(i) | ||
| 186 | endif | ||
| 187 | endfor | ||
| 188 | endfunction | ||
| 189 | |||
| 190 | " NERDTreeMapActivateNode and <2-LeftMouse> | ||
| 191 | " handle the user activating a tree node | ||
| 192 | " scope: global | ||
| 193 | function! WebDevIconsNERDTreeMapActivateNode(node) | ||
| 194 | let isOpen = a:node.isOpen | ||
| 195 | if isOpen | ||
| 196 | let glyph = g:WebDevIconsUnicodeDecorateFolderNodesDefaultSymbol | ||
| 197 | else | ||
| 198 | let glyph = g:DevIconsDefaultFolderOpenSymbol | ||
| 199 | endif | ||
| 200 | let a:node.path.isOpen = !isOpen | ||
| 201 | call WebDevIconsNERDTreeDirUpdateFlags(a:node, glyph) | ||
| 202 | " continue with normal activate logic | ||
| 203 | call a:node.activate() | ||
| 204 | " glyph change possible artifact clean-up | ||
| 205 | if g:DevIconsEnableNERDTreeRedraw ==# 1 | ||
| 206 | redraw! | ||
| 207 | endif | ||
| 208 | endfunction | ||
| 209 | |||
| 210 | " NERDTreeMapActivateNodeSingleMode | ||
| 211 | " handle the user activating a tree node if NERDTreeMouseMode is setted to 3 | ||
| 212 | " scope: global | ||
| 213 | function! WebDevIconsNERDTreeMapActivateNodeSingleMode(node) | ||
| 214 | if g:NERDTreeMouseMode == 3 | ||
| 215 | let isOpen = a:node.isOpen | ||
| 216 | if isOpen | ||
| 217 | let glyph = g:WebDevIconsUnicodeDecorateFolderNodesDefaultSymbol | ||
| 218 | else | ||
| 219 | let glyph = g:DevIconsDefaultFolderOpenSymbol | ||
| 220 | endif | ||
| 221 | let a:node.path.isOpen = !isOpen | ||
| 222 | call WebDevIconsNERDTreeDirUpdateFlags(a:node, glyph) | ||
| 223 | " continue with normal activate logic | ||
| 224 | call a:node.activate() | ||
| 225 | " glyph change possible artifact clean-up | ||
| 226 | if g:DevIconsEnableNERDTreeRedraw ==# 1 | ||
| 227 | redraw! | ||
| 228 | endif | ||
| 229 | endif | ||
| 230 | endfunction | ||
| 231 | |||
| 232 | function! WebDevIconsNERDTreeMapOpenRecursively(node) | ||
| 233 | " normal original logic: | ||
| 234 | call nerdtree#echo('Recursively opening node. Please wait...') | ||
| 235 | call WebDevIconsNERDTreeDirOpenRecursively(a:node) | ||
| 236 | call a:node.openRecursively() | ||
| 237 | " continue with normal original logic: | ||
| 238 | call b:NERDTree.render() | ||
| 239 | " glyph change possible artifact clean-up | ||
| 240 | if g:DevIconsEnableNERDTreeRedraw ==# 1 | ||
| 241 | redraw! | ||
| 242 | endif | ||
| 243 | call nerdtree#echo('Recursively opening node. Please wait... DONE') | ||
| 244 | endfunction | ||
| 245 | |||
| 246 | function! WebDevIconsNERDTreeMapCloseChildren(node) | ||
| 247 | " close children but not current node: | ||
| 248 | call WebDevIconsNERDTreeDirCloseChildren(a:node) | ||
| 249 | " continue with normal original logic: | ||
| 250 | call a:node.closeChildren() | ||
| 251 | call b:NERDTree.render() | ||
| 252 | call a:node.putCursorHere(0, 0) | ||
| 253 | " glyph change possible artifact clean-up | ||
| 254 | if g:DevIconsEnableNERDTreeRedraw ==# 1 | ||
| 255 | redraw! | ||
| 256 | endif | ||
| 257 | endfunction | ||
| 258 | |||
| 259 | function! WebDevIconsNERDTreeMapCloseDir(node) | ||
| 260 | " continue with normal original logic: | ||
| 261 | let parent = a:node.parent | ||
| 262 | while g:NERDTreeCascadeOpenSingleChildDir && !parent.isRoot() | ||
| 263 | let childNodes = parent.getVisibleChildren() | ||
| 264 | if len(childNodes) == 1 && childNodes[0].path.isDirectory | ||
| 265 | let parent = parent.parent | ||
| 266 | else | ||
| 267 | break | ||
| 268 | endif | ||
| 269 | endwhile | ||
| 270 | if parent ==# {} || parent.isRoot() | ||
| 271 | call nerdtree#echo('cannot close tree root') | ||
| 272 | else | ||
| 273 | call parent.close() | ||
| 274 | " update the glyph | ||
| 275 | call WebDevIconsNERDTreeDirClose(parent) | ||
| 276 | call b:NERDTree.render() | ||
| 277 | call parent.putCursorHere(0, 0) | ||
| 278 | " glyph change possible artifact clean-up | ||
| 279 | if g:DevIconsEnableNERDTreeRedraw ==# 1 | ||
| 280 | redraw! | ||
| 281 | endif | ||
| 282 | endif | ||
| 283 | endfunction | ||
| 284 | |||
| 285 | function! WebDevIconsNERDTreeMapUpdirKeepOpen() | ||
| 286 | call WebDevIconsNERDTreeDirOpen(b:NERDTree.root) | ||
| 287 | " continue with normal logic: | ||
| 288 | call nerdtree#ui_glue#upDir(1) | ||
| 289 | call s:Refresh() | ||
| 290 | " glyph change possible artifact clean-up | ||
| 291 | if g:DevIconsEnableNERDTreeRedraw ==# 1 | ||
| 292 | redraw! | ||
| 293 | endif | ||
| 294 | endfunction | ||
| 295 | |||
| 296 | if g:webdevicons_enable == 1 && g:webdevicons_enable_nerdtree == 1 | ||
| 297 | call s:SetupListeners() | ||
| 298 | |||
| 299 | if g:DevIconsEnableFoldersOpenClose | ||
| 300 | |||
| 301 | " These overrides are needed because we cannot | ||
| 302 | " simply use AddListener for reliably updating | ||
| 303 | " the folder open/close glyphs because the event | ||
| 304 | " path has no access to the 'isOpen' property | ||
| 305 | " some of these are a little more brittle/fragile | ||
| 306 | " than others | ||
| 307 | " TODO FIXME better way to reliably update | ||
| 308 | " open/close glyphs in NERDTreeWebDevIconsRefreshListener | ||
| 309 | |||
| 310 | " NERDTreeMapActivateNode | ||
| 311 | call NERDTreeAddKeyMap({ | ||
| 312 | \ 'key': g:NERDTreeMapActivateNode, | ||
| 313 | \ 'callback': 'WebDevIconsNERDTreeMapActivateNode', | ||
| 314 | \ 'override': 1, | ||
| 315 | \ 'scope': 'DirNode' }) | ||
| 316 | |||
| 317 | " NERDTreeMapCustomOpen | ||
| 318 | call NERDTreeAddKeyMap({ | ||
| 319 | \ 'key': g:NERDTreeMapCustomOpen, | ||
| 320 | \ 'callback': 'WebDevIconsNERDTreeMapActivateNode', | ||
| 321 | \ 'override': 1, | ||
| 322 | \ 'scope': 'DirNode' }) | ||
| 323 | |||
| 324 | " NERDTreeMapOpenRecursively | ||
| 325 | call NERDTreeAddKeyMap({ | ||
| 326 | \ 'key': g:NERDTreeMapOpenRecursively, | ||
| 327 | \ 'callback': 'WebDevIconsNERDTreeMapOpenRecursively', | ||
| 328 | \ 'override': 1, | ||
| 329 | \ 'scope': 'DirNode' }) | ||
| 330 | |||
| 331 | " NERDTreeMapCloseChildren | ||
| 332 | call NERDTreeAddKeyMap({ | ||
| 333 | \ 'key': g:NERDTreeMapCloseChildren, | ||
| 334 | \ 'callback': 'WebDevIconsNERDTreeMapCloseChildren', | ||
| 335 | \ 'override': 1, | ||
| 336 | \ 'scope': 'DirNode' }) | ||
| 337 | |||
| 338 | " NERDTreeMapCloseChildren | ||
| 339 | call NERDTreeAddKeyMap({ | ||
| 340 | \ 'key': g:NERDTreeMapCloseDir, | ||
| 341 | \ 'callback': 'WebDevIconsNERDTreeMapCloseDir', | ||
| 342 | \ 'override': 1, | ||
| 343 | \ 'scope': 'Node' }) | ||
| 344 | |||
| 345 | " <2-LeftMouse> | ||
| 346 | call NERDTreeAddKeyMap({ | ||
| 347 | \ 'key': '<2-LeftMouse>', | ||
| 348 | \ 'callback': 'WebDevIconsNERDTreeMapActivateNode', | ||
| 349 | \ 'override': 1, | ||
| 350 | \ 'scope': 'DirNode' }) | ||
| 351 | |||
| 352 | " <LeftRelease> | ||
| 353 | call NERDTreeAddKeyMap({ | ||
| 354 | \ 'key': '<LeftRelease>', | ||
| 355 | \ 'callback': 'WebDevIconsNERDTreeMapActivateNodeSingleMode', | ||
| 356 | \ 'override': 1, | ||
| 357 | \ 'scope': 'DirNode' }) | ||
| 358 | |||
| 359 | " NERDTreeMapUpdirKeepOpen | ||
| 360 | call NERDTreeAddKeyMap({ | ||
| 361 | \ 'key': g:NERDTreeMapUpdirKeepOpen, | ||
| 362 | \ 'callback': 'WebDevIconsNERDTreeMapUpdirKeepOpen', | ||
| 363 | \ 'override': 1, | ||
| 364 | \ 'scope': 'all' }) | ||
| 365 | |||
| 366 | endif | ||
| 367 | |||
| 368 | " Temporary (hopefully) fix for glyph issues in gvim (proper fix is with the | ||
| 369 | " actual font patcher) | ||
| 370 | if g:webdevicons_gui_glyph_fix ==# 1 | ||
| 371 | call NERDTreeAddKeyMap({ | ||
| 372 | \ 'key': g:NERDTreeMapChangeRoot, | ||
| 373 | \ 'callback': 'WebDevIconsNERDTreeChangeRootHandler', | ||
| 374 | \ 'override': 1, | ||
| 375 | \ 'quickhelpText': "change tree root to the\n\" selected dir\n\" plus devicons redraw\n\" hack fix", | ||
| 376 | \ 'scope': 'Node' }) | ||
| 377 | |||
| 378 | call NERDTreeAddKeyMap({ | ||
| 379 | \ 'key': g:NERDTreeMapUpdir, | ||
| 380 | \ 'callback': 'WebDevIconsNERDTreeUpDirCurrentRootClosedHandler', | ||
| 381 | \ 'override': 1, | ||
| 382 | \ 'quickhelpText': "move tree root up a dir\n\" plus devicons redraw\n\" hack fix", | ||
| 383 | \ 'scope': 'all' }) | ||
| 384 | endif | ||
| 385 | |||
| 386 | endif | ||
| 387 | |||
| 388 | " modeline syntax: | ||
| 389 | " 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 @@ | |||
| 1 | " Version: 0.11.0 | ||
| 2 | " Webpage: https://github.com/ryanoasis/vim-devicons | ||
| 3 | " Maintainer: Ryan McIntyre <ryanoasis@gmail.com> | ||
| 4 | " License: see LICENSE | ||
| 5 | |||
| 6 | let s:version = '0.11.0' | ||
| 7 | let s:plugin_home = expand('<sfile>:p:h:h') | ||
| 8 | |||
| 9 | " set scriptencoding after 'encoding' and when using multibyte chars | ||
| 10 | scriptencoding utf-8 | ||
| 11 | |||
| 12 | " standard fix/safety: line continuation (avoiding side effects) {{{1 | ||
| 13 | "======================================================================== | ||
| 14 | let s:save_cpo = &cpo | ||
| 15 | set cpo&vim | ||
| 16 | |||
| 17 | " standard loading / not loading {{{1 | ||
| 18 | "======================================================================== | ||
| 19 | |||
| 20 | if exists('g:loaded_webdevicons') | ||
| 21 | finish | ||
| 22 | endif | ||
| 23 | |||
| 24 | let g:loaded_webdevicons = 1 | ||
| 25 | |||
| 26 | " config enable / disable settings {{{1 | ||
| 27 | "======================================================================== | ||
| 28 | |||
| 29 | "" | ||
| 30 | " Set the variable to the default value, only if variable is not defined. | ||
| 31 | " | ||
| 32 | " @param {string} var Variable name with its scope. | ||
| 33 | " @param {*} default Default value for variable. | ||
| 34 | "" | ||
| 35 | function! s:set(var, default) abort | ||
| 36 | if !exists(a:var) | ||
| 37 | if type(a:default) | ||
| 38 | execute 'let' a:var '=' string(a:default) | ||
| 39 | else | ||
| 40 | execute 'let' a:var '=' a:default | ||
| 41 | endif | ||
| 42 | endif | ||
| 43 | endfunction | ||
| 44 | |||
| 45 | call s:set('g:webdevicons_enable', 1) | ||
| 46 | call s:set('g:webdevicons_enable_nerdtree', 1) | ||
| 47 | call s:set('g:webdevicons_enable_unite ', 1) | ||
| 48 | call s:set('g:webdevicons_enable_denite', 1) | ||
| 49 | call s:set('g:webdevicons_enable_vimfiler', 1) | ||
| 50 | call s:set('g:webdevicons_enable_ctrlp', 1) | ||
| 51 | call s:set('g:webdevicons_enable_airline_tabline', 1) | ||
| 52 | call s:set('g:webdevicons_enable_airline_statusline', 1) | ||
| 53 | call s:set('g:webdevicons_enable_airline_statusline_fileformat_symbols', 1) | ||
| 54 | call s:set('g:webdevicons_enable_flagship_statusline', 1) | ||
| 55 | call s:set('g:webdevicons_enable_flagship_statusline_fileformat_symbols', 1) | ||
| 56 | call s:set('g:webdevicons_enable_startify', 1) | ||
| 57 | call s:set('g:webdevicons_conceal_nerdtree_brackets', 1) | ||
| 58 | call s:set('g:DevIconsAppendArtifactFix', has('gui_running') ? 1 : 0) | ||
| 59 | call s:set('g:DevIconsArtifactFixChar', ' ') | ||
| 60 | |||
| 61 | " config options {{{1 | ||
| 62 | "======================================================================== | ||
| 63 | |||
| 64 | call s:set('g:WebDevIconsUnicodeDecorateFileNodes', 1) | ||
| 65 | call s:set('g:WebDevIconsUnicodeDecorateFolderNodes', 1) | ||
| 66 | call s:set('g:DevIconsEnableFoldersOpenClose', 0) | ||
| 67 | call s:set('g:DevIconsEnableFolderPatternMatching', 1) | ||
| 68 | call s:set('g:DevIconsEnableFolderExtensionPatternMatching', 0) | ||
| 69 | call s:set('g:DevIconsEnableDistro', 1) | ||
| 70 | call s:set('g:WebDevIconsUnicodeDecorateFolderNodesExactMatches', 1) | ||
| 71 | call s:set('g:WebDevIconsUnicodeGlyphDoubleWidth', 1) | ||
| 72 | call s:set('g:WebDevIconsNerdTreeBeforeGlyphPadding', ' ') | ||
| 73 | call s:set('g:WebDevIconsNerdTreeAfterGlyphPadding', ' ') | ||
| 74 | call s:set('g:WebDevIconsNerdTreeGitPluginForceVAlign', 1) | ||
| 75 | call s:set('g:NERDTreeUpdateOnCursorHold', 1) " Obsolete: For backward compatibility | ||
| 76 | call s:set('g:NERDTreeGitStatusUpdateOnCursorHold', 1) | ||
| 77 | call s:set('g:WebDevIconsTabAirLineBeforeGlyphPadding', ' ') | ||
| 78 | call s:set('g:WebDevIconsTabAirLineAfterGlyphPadding', '') | ||
| 79 | |||
| 80 | " config defaults {{{1 | ||
| 81 | "======================================================================== | ||
| 82 | |||
| 83 | call s:set('g:WebDevIconsUnicodeDecorateFileNodesDefaultSymbol', '') | ||
| 84 | call s:set('g:WebDevIconsUnicodeByteOrderMarkerDefaultSymbol', '') | ||
| 85 | call s:set('g:WebDevIconsUnicodeDecorateFolderNodesDefaultSymbol', g:DevIconsEnableFoldersOpenClose ? '' : '') | ||
| 86 | call s:set('g:WebDevIconsUnicodeDecorateFolderNodesSymlinkSymbol', '') | ||
| 87 | call s:set('g:DevIconsDefaultFolderOpenSymbol', '') | ||
| 88 | |||
| 89 | " functions {{{1 | ||
| 90 | "======================================================================== | ||
| 91 | |||
| 92 | " local functions {{{2 | ||
| 93 | "======================================================================== | ||
| 94 | |||
| 95 | " scope: local | ||
| 96 | function s:getDistro() | ||
| 97 | if exists('s:distro') | ||
| 98 | return s:distro | ||
| 99 | endif | ||
| 100 | |||
| 101 | if has('bsd') | ||
| 102 | let s:distro = '' | ||
| 103 | return s:distro | ||
| 104 | endif | ||
| 105 | |||
| 106 | if g:DevIconsEnableDistro && executable('lsb_release') | ||
| 107 | let s:lsb = system('lsb_release -i') | ||
| 108 | if s:lsb =~# 'Arch' | ||
| 109 | let s:distro = '' | ||
| 110 | elseif s:lsb =~# 'Gentoo' | ||
| 111 | let s:distro = '' | ||
| 112 | elseif s:lsb =~# 'Ubuntu' | ||
| 113 | let s:distro = '' | ||
| 114 | elseif s:lsb =~# 'Cent' | ||
| 115 | let s:distro = '' | ||
| 116 | elseif s:lsb =~# 'Debian' | ||
| 117 | let s:distro = '' | ||
| 118 | elseif s:lsb =~# 'Dock' | ||
| 119 | let s:distro = '' | ||
| 120 | else | ||
| 121 | let s:distro = '' | ||
| 122 | endif | ||
| 123 | return s:distro | ||
| 124 | endif | ||
| 125 | |||
| 126 | let s:distro = '' | ||
| 127 | return s:distro | ||
| 128 | endfunction | ||
| 129 | |||
| 130 | " scope: local | ||
| 131 | function s:isDarwin() | ||
| 132 | if exists('s:is_darwin') | ||
| 133 | return s:is_darwin | ||
| 134 | endif | ||
| 135 | |||
| 136 | if exists('g:WebDevIconsOS') | ||
| 137 | let s:is_darwin = g:WebDevIconsOS ==? 'Darwin' | ||
| 138 | return s:is_darwin | ||
| 139 | endif | ||
| 140 | |||
| 141 | if has('macunix') | ||
| 142 | let s:is_darwin = 1 | ||
| 143 | return s:is_darwin | ||
| 144 | endif | ||
| 145 | |||
| 146 | if ! has('unix') | ||
| 147 | let s:is_darwin = 0 | ||
| 148 | return s:is_darwin | ||
| 149 | endif | ||
| 150 | |||
| 151 | if system('uname -s') ==# "Darwin\n" | ||
| 152 | let s:is_darwin = 1 | ||
| 153 | else | ||
| 154 | let s:is_darwin = 0 | ||
| 155 | endif | ||
| 156 | |||
| 157 | return s:is_darwin | ||
| 158 | endfunction | ||
| 159 | |||
| 160 | " scope: local | ||
| 161 | function! s:strip(input) | ||
| 162 | return substitute(a:input, '^\s*\(.\{-}\)\s*$', '\1', '') | ||
| 163 | endfunction | ||
| 164 | |||
| 165 | " scope: local | ||
| 166 | function! s:setDictionaries() | ||
| 167 | |||
| 168 | let s:file_node_extensions = { | ||
| 169 | \ 'styl' : '', | ||
| 170 | \ 'sass' : '', | ||
| 171 | \ 'scss' : '', | ||
| 172 | \ 'htm' : '', | ||
| 173 | \ 'html' : '', | ||
| 174 | \ 'slim' : '', | ||
| 175 | \ 'haml' : '', | ||
| 176 | \ 'ejs' : '', | ||
| 177 | \ 'css' : '', | ||
| 178 | \ 'less' : '', | ||
| 179 | \ 'md' : '', | ||
| 180 | \ 'mdx' : '', | ||
| 181 | \ 'markdown' : '', | ||
| 182 | \ 'rmd' : '', | ||
| 183 | \ 'json' : '', | ||
| 184 | \ 'webmanifest' : '', | ||
| 185 | \ 'js' : '', | ||
| 186 | \ 'mjs' : '', | ||
| 187 | \ 'jsx' : '', | ||
| 188 | \ 'rb' : '', | ||
| 189 | \ 'gemspec' : '', | ||
| 190 | \ 'rake' : '', | ||
| 191 | \ 'php' : '', | ||
| 192 | \ 'py' : '', | ||
| 193 | \ 'pyc' : '', | ||
| 194 | \ 'pyo' : '', | ||
| 195 | \ 'pyd' : '', | ||
| 196 | \ 'coffee' : '', | ||
| 197 | \ 'mustache' : '', | ||
| 198 | \ 'hbs' : '', | ||
| 199 | \ 'conf' : '', | ||
| 200 | \ 'ini' : '', | ||
| 201 | \ 'yml' : '', | ||
| 202 | \ 'yaml' : '', | ||
| 203 | \ 'toml' : '', | ||
| 204 | \ 'bat' : '', | ||
| 205 | \ 'mk' : '', | ||
| 206 | \ 'jpg' : '', | ||
| 207 | \ 'jpeg' : '', | ||
| 208 | \ 'bmp' : '', | ||
| 209 | \ 'png' : '', | ||
| 210 | \ 'webp' : '', | ||
| 211 | \ 'gif' : '', | ||
| 212 | \ 'ico' : '', | ||
| 213 | \ 'twig' : '', | ||
| 214 | \ 'cpp' : '', | ||
| 215 | \ 'c++' : '', | ||
| 216 | \ 'cxx' : '', | ||
| 217 | \ 'cc' : '', | ||
| 218 | \ 'cp' : '', | ||
| 219 | \ 'c' : '', | ||
| 220 | \ 'cs' : '', | ||
| 221 | \ 'h' : '', | ||
| 222 | \ 'hh' : '', | ||
| 223 | \ 'hpp' : '', | ||
| 224 | \ 'hxx' : '', | ||
| 225 | \ 'hs' : '', | ||
| 226 | \ 'lhs' : '', | ||
| 227 | \ 'nix' : '', | ||
| 228 | \ 'lua' : '', | ||
| 229 | \ 'java' : '', | ||
| 230 | \ 'sh' : '', | ||
| 231 | \ 'fish' : '', | ||
| 232 | \ 'bash' : '', | ||
| 233 | \ 'zsh' : '', | ||
| 234 | \ 'ksh' : '', | ||
| 235 | \ 'csh' : '', | ||
| 236 | \ 'awk' : '', | ||
| 237 | \ 'ps1' : '', | ||
| 238 | \ 'ml' : 'λ', | ||
| 239 | \ 'mli' : 'λ', | ||
| 240 | \ 'diff' : '', | ||
| 241 | \ 'db' : '', | ||
| 242 | \ 'sql' : '', | ||
| 243 | \ 'dump' : '', | ||
| 244 | \ 'clj' : '', | ||
| 245 | \ 'cljc' : '', | ||
| 246 | \ 'cljs' : '', | ||
| 247 | \ 'edn' : '', | ||
| 248 | \ 'scala' : '', | ||
| 249 | \ 'go' : '', | ||
| 250 | \ 'dart' : '', | ||
| 251 | \ 'xul' : '', | ||
| 252 | \ 'sln' : '', | ||
| 253 | \ 'suo' : '', | ||
| 254 | \ 'pl' : '', | ||
| 255 | \ 'pm' : '', | ||
| 256 | \ 't' : '', | ||
| 257 | \ 'rss' : '', | ||
| 258 | \ 'f#' : '', | ||
| 259 | \ 'fsscript' : '', | ||
| 260 | \ 'fsx' : '', | ||
| 261 | \ 'fs' : '', | ||
| 262 | \ 'fsi' : '', | ||
| 263 | \ 'rs' : '', | ||
| 264 | \ 'rlib' : '', | ||
| 265 | \ 'd' : '', | ||
| 266 | \ 'erl' : '', | ||
| 267 | \ 'hrl' : '', | ||
| 268 | \ 'ex' : '', | ||
| 269 | \ 'exs' : '', | ||
| 270 | \ 'eex' : '', | ||
| 271 | \ 'leex' : '', | ||
| 272 | \ 'heex' : '', | ||
| 273 | \ 'vim' : '', | ||
| 274 | \ 'ai' : '', | ||
| 275 | \ 'psd' : '', | ||
| 276 | \ 'psb' : '', | ||
| 277 | \ 'ts' : '', | ||
| 278 | \ 'tsx' : '', | ||
| 279 | \ 'jl' : '', | ||
| 280 | \ 'pp' : '', | ||
| 281 | \ 'vue' : '﵂', | ||
| 282 | \ 'elm' : '', | ||
| 283 | \ 'swift' : '', | ||
| 284 | \ 'xcplayground' : '', | ||
| 285 | \ 'tex' : 'ﭨ', | ||
| 286 | \ 'r' : 'ﳒ', | ||
| 287 | \ 'rproj' : '鉶', | ||
| 288 | \ 'sol' : 'ﲹ', | ||
| 289 | \ 'pem' : '' | ||
| 290 | \} | ||
| 291 | |||
| 292 | let s:file_node_exact_matches = { | ||
| 293 | \ 'exact-match-case-sensitive-1.txt' : '1', | ||
| 294 | \ 'exact-match-case-sensitive-2' : '2', | ||
| 295 | \ 'gruntfile.coffee' : '', | ||
| 296 | \ 'gruntfile.js' : '', | ||
| 297 | \ 'gruntfile.ls' : '', | ||
| 298 | \ 'gulpfile.coffee' : '', | ||
| 299 | \ 'gulpfile.js' : '', | ||
| 300 | \ 'gulpfile.ls' : '', | ||
| 301 | \ 'mix.lock' : '', | ||
| 302 | \ 'dropbox' : '', | ||
| 303 | \ '.ds_store' : '', | ||
| 304 | \ '.gitconfig' : '', | ||
| 305 | \ '.gitignore' : '', | ||
| 306 | \ '.gitattributes' : '', | ||
| 307 | \ '.gitlab-ci.yml' : '', | ||
| 308 | \ '.bashrc' : '', | ||
| 309 | \ '.zshrc' : '', | ||
| 310 | \ '.zshenv' : '', | ||
| 311 | \ '.zprofile' : '', | ||
| 312 | \ '.vimrc' : '', | ||
| 313 | \ '.gvimrc' : '', | ||
| 314 | \ '_vimrc' : '', | ||
| 315 | \ '_gvimrc' : '', | ||
| 316 | \ '.bashprofile' : '', | ||
| 317 | \ 'favicon.ico' : '', | ||
| 318 | \ 'license' : '', | ||
| 319 | \ 'node_modules' : '', | ||
| 320 | \ 'react.jsx' : '', | ||
| 321 | \ 'procfile' : '', | ||
| 322 | \ 'dockerfile' : '', | ||
| 323 | \ 'docker-compose.yml' : '', | ||
| 324 | \ 'rakefile' : '', | ||
| 325 | \ 'config.ru' : '', | ||
| 326 | \ 'gemfile' : '', | ||
| 327 | \ 'makefile' : '', | ||
| 328 | \ 'cmakelists.txt' : '', | ||
| 329 | \ 'robots.txt' : 'ﮧ' | ||
| 330 | \} | ||
| 331 | |||
| 332 | let s:file_node_pattern_matches = { | ||
| 333 | \ '.*jquery.*\.js$' : '', | ||
| 334 | \ '.*angular.*\.js$' : '', | ||
| 335 | \ '.*backbone.*\.js$' : '', | ||
| 336 | \ '.*require.*\.js$' : '', | ||
| 337 | \ '.*materialize.*\.js$' : '', | ||
| 338 | \ '.*materialize.*\.css$' : '', | ||
| 339 | \ '.*mootools.*\.js$' : '', | ||
| 340 | \ '.*vimrc.*' : '', | ||
| 341 | \ 'Vagrantfile$' : '' | ||
| 342 | \} | ||
| 343 | |||
| 344 | if !exists('g:WebDevIconsUnicodeDecorateFileNodesExtensionSymbols') | ||
| 345 | let g:WebDevIconsUnicodeDecorateFileNodesExtensionSymbols = {} | ||
| 346 | endif | ||
| 347 | |||
| 348 | if !exists('g:WebDevIconsUnicodeDecorateFileNodesExactSymbols') | ||
| 349 | " do not remove: exact-match-case-sensitive-* | ||
| 350 | let g:WebDevIconsUnicodeDecorateFileNodesExactSymbols = {} | ||
| 351 | endif | ||
| 352 | |||
| 353 | if !exists('g:WebDevIconsUnicodeDecorateFileNodesPatternSymbols') | ||
| 354 | let g:WebDevIconsUnicodeDecorateFileNodesPatternSymbols = {} | ||
| 355 | endif | ||
| 356 | |||
| 357 | " iterate to fix allow user overriding of specific individual keys in vimrc (only gvimrc was working previously) | ||
| 358 | for [key, val] in items(s:file_node_extensions) | ||
| 359 | if !has_key(g:WebDevIconsUnicodeDecorateFileNodesExtensionSymbols, key) | ||
| 360 | let g:WebDevIconsUnicodeDecorateFileNodesExtensionSymbols[key] = val | ||
| 361 | endif | ||
| 362 | endfor | ||
| 363 | |||
| 364 | " iterate to fix allow user overriding of specific individual keys in vimrc (only gvimrc was working previously) | ||
| 365 | for [key, val] in items(s:file_node_exact_matches) | ||
| 366 | if !has_key(g:WebDevIconsUnicodeDecorateFileNodesExactSymbols, key) | ||
| 367 | let g:WebDevIconsUnicodeDecorateFileNodesExactSymbols[key] = val | ||
| 368 | endif | ||
| 369 | endfor | ||
| 370 | |||
| 371 | " iterate to fix allow user overriding of specific individual keys in vimrc (only gvimrc was working previously) | ||
| 372 | for [key, val] in items(s:file_node_pattern_matches) | ||
| 373 | if !has_key(g:WebDevIconsUnicodeDecorateFileNodesPatternSymbols, key) | ||
| 374 | let g:WebDevIconsUnicodeDecorateFileNodesPatternSymbols[key] = val | ||
| 375 | endif | ||
| 376 | endfor | ||
| 377 | |||
| 378 | endfunction | ||
| 379 | |||
| 380 | " scope: local | ||
| 381 | function! s:setSyntax() | ||
| 382 | if g:webdevicons_enable_nerdtree == 1 && g:webdevicons_conceal_nerdtree_brackets == 1 | ||
| 383 | augroup webdevicons_conceal_nerdtree_brackets | ||
| 384 | au! | ||
| 385 | autocmd FileType nerdtree syntax match hideBracketsInNerdTree "\]" contained conceal containedin=NERDTreeFlags | ||
| 386 | autocmd FileType nerdtree syntax match hideBracketsInNerdTree "\[" contained conceal containedin=NERDTreeFlags | ||
| 387 | autocmd FileType nerdtree syntax match hideBracketsInNerdTree "\]" contained conceal containedin=NERDTreeLinkFile | ||
| 388 | autocmd FileType nerdtree syntax match hideBracketsInNerdTree "\]" contained conceal containedin=NERDTreeLinkDir | ||
| 389 | autocmd FileType nerdtree syntax match hideBracketsInNerdTree "\[" contained conceal containedin=NERDTreeLinkFile | ||
| 390 | autocmd FileType nerdtree syntax match hideBracketsInNerdTree "\[" contained conceal containedin=NERDTreeLinkDir | ||
| 391 | autocmd FileType nerdtree setlocal conceallevel=3 | ||
| 392 | autocmd FileType nerdtree setlocal concealcursor=nvic | ||
| 393 | augroup END | ||
| 394 | endif | ||
| 395 | endfunction | ||
| 396 | |||
| 397 | " scope: local | ||
| 398 | " stole solution/idea from nerdtree-git-plugin :) | ||
| 399 | function! s:setCursorHold() | ||
| 400 | if g:webdevicons_enable_nerdtree | ||
| 401 | augroup webdevicons_cursor_hold | ||
| 402 | autocmd CursorHold * silent! call s:CursorHoldUpdate() | ||
| 403 | augroup END | ||
| 404 | endif | ||
| 405 | endfunction | ||
| 406 | |||
| 407 | " scope: local | ||
| 408 | " stole solution/idea from nerdtree-git-plugin :) | ||
| 409 | function! s:CursorHoldUpdate() | ||
| 410 | if g:NERDTreeUpdateOnCursorHold != 1 || g:NERDTreeGitStatusUpdateOnCursorHold != 1 | ||
| 411 | return | ||
| 412 | endif | ||
| 413 | |||
| 414 | if !exists('g:NERDTree') || !g:NERDTree.IsOpen() | ||
| 415 | return | ||
| 416 | endif | ||
| 417 | |||
| 418 | " Do not update when a special buffer is selected | ||
| 419 | if !empty(&l:buftype) | ||
| 420 | return | ||
| 421 | endif | ||
| 422 | |||
| 423 | " winnr need to make focus go to opened file | ||
| 424 | " CursorToTreeWin needed to avoid error on opening file | ||
| 425 | let l:winnr = winnr() | ||
| 426 | let l:altwinnr = winnr('#') | ||
| 427 | |||
| 428 | call g:NERDTree.CursorToTreeWin() | ||
| 429 | call b:NERDTree.root.refreshFlags() | ||
| 430 | call NERDTreeRender() | ||
| 431 | |||
| 432 | exec l:altwinnr . 'wincmd w' | ||
| 433 | exec l:winnr . 'wincmd w' | ||
| 434 | endfunction | ||
| 435 | |||
| 436 | " scope: local | ||
| 437 | function! s:hardRefreshNerdTree() | ||
| 438 | if g:webdevicons_enable_nerdtree == 1 && g:webdevicons_conceal_nerdtree_brackets == 1 && g:NERDTree.IsOpen() | ||
| 439 | NERDTreeClose | ||
| 440 | NERDTree | ||
| 441 | endif | ||
| 442 | endfunction | ||
| 443 | |||
| 444 | " scope: local | ||
| 445 | function! s:softRefreshNerdTree() | ||
| 446 | if g:webdevicons_enable_nerdtree == 1 && exists('g:NERDTree') && g:NERDTree.IsOpen() | ||
| 447 | NERDTreeToggle | ||
| 448 | NERDTreeToggle | ||
| 449 | endif | ||
| 450 | endfunction | ||
| 451 | |||
| 452 | " local initialization {{{2 | ||
| 453 | "======================================================================== | ||
| 454 | |||
| 455 | " scope: local | ||
| 456 | function! s:initialize() | ||
| 457 | call s:setDictionaries() | ||
| 458 | call s:setSyntax() | ||
| 459 | call s:setCursorHold() | ||
| 460 | |||
| 461 | if exists('g:loaded_flagship') | call devicons#plugins#flagship#init() | endif | ||
| 462 | if exists('g:loaded_unite') && g:webdevicons_enable_unite | call devicons#plugins#unite#init() | endif | ||
| 463 | if exists('g:loaded_denite') && g:webdevicons_enable_denite | call devicons#plugins#denite#init() | endif | ||
| 464 | if exists('g:loaded_vimfiler') && g:webdevicons_enable_vimfiler | call devicons#plugins#vimfiler#init() | endif | ||
| 465 | if exists('g:loaded_ctrlp') && g:webdevicons_enable_ctrlp | call devicons#plugins#ctrlp#init() | endif | ||
| 466 | if exists('g:loaded_startify') && g:webdevicons_enable_startify | call devicons#plugins#startify#init() | endif | ||
| 467 | endfunction | ||
| 468 | |||
| 469 | |||
| 470 | " public functions {{{2 | ||
| 471 | "======================================================================== | ||
| 472 | |||
| 473 | " scope: public | ||
| 474 | function! webdevicons#version() | ||
| 475 | return s:version | ||
| 476 | endfunction | ||
| 477 | |||
| 478 | " scope: public | ||
| 479 | function! webdevicons#pluginHome() | ||
| 480 | return s:plugin_home | ||
| 481 | endfunction | ||
| 482 | |||
| 483 | " scope: public | ||
| 484 | " allow the first version of refresh to now call softRefresh | ||
| 485 | function! webdevicons#refresh() | ||
| 486 | call webdevicons#softRefresh() | ||
| 487 | endfunction | ||
| 488 | |||
| 489 | " scope: public | ||
| 490 | function! webdevicons#hardRefresh() | ||
| 491 | call s:setSyntax() | ||
| 492 | call s:hardRefreshNerdTree() | ||
| 493 | endfunction | ||
| 494 | |||
| 495 | " scope: public | ||
| 496 | function! webdevicons#softRefresh() | ||
| 497 | call s:setSyntax() | ||
| 498 | call s:softRefreshNerdTree() | ||
| 499 | endfunction | ||
| 500 | |||
| 501 | " a:1 (bufferName), a:2 (isDirectory) | ||
| 502 | " scope: public | ||
| 503 | function! WebDevIconsGetFileTypeSymbol(...) abort | ||
| 504 | if a:0 == 0 | ||
| 505 | let fileNodeExtension = !empty(expand('%:e')) ? expand('%:e') : &filetype | ||
| 506 | let fileNode = expand('%:t') | ||
| 507 | let isDirectory = 0 | ||
| 508 | else | ||
| 509 | let fileNodeExtension = fnamemodify(a:1, ':e') | ||
| 510 | let fileNode = fnamemodify(a:1, ':t') | ||
| 511 | if a:0 > 1 | ||
| 512 | let isDirectory = a:2 | ||
| 513 | else | ||
| 514 | let isDirectory = 0 | ||
| 515 | endif | ||
| 516 | endif | ||
| 517 | |||
| 518 | if isDirectory == 0 || g:DevIconsEnableFolderPatternMatching | ||
| 519 | |||
| 520 | let symbol = g:WebDevIconsUnicodeDecorateFileNodesDefaultSymbol | ||
| 521 | let fileNodeExtension = tolower(fileNodeExtension) | ||
| 522 | let fileNode = tolower(fileNode) | ||
| 523 | |||
| 524 | for [pattern, glyph] in items(g:WebDevIconsUnicodeDecorateFileNodesPatternSymbols) | ||
| 525 | if match(fileNode, pattern) != -1 | ||
| 526 | let symbol = glyph | ||
| 527 | break | ||
| 528 | endif | ||
| 529 | endfor | ||
| 530 | |||
| 531 | if symbol == g:WebDevIconsUnicodeDecorateFileNodesDefaultSymbol | ||
| 532 | if has_key(g:WebDevIconsUnicodeDecorateFileNodesExactSymbols, fileNode) | ||
| 533 | let symbol = g:WebDevIconsUnicodeDecorateFileNodesExactSymbols[fileNode] | ||
| 534 | elseif ((isDirectory == 1 && g:DevIconsEnableFolderExtensionPatternMatching) || isDirectory == 0) && has_key(g:WebDevIconsUnicodeDecorateFileNodesExtensionSymbols, fileNodeExtension) | ||
| 535 | let symbol = g:WebDevIconsUnicodeDecorateFileNodesExtensionSymbols[fileNodeExtension] | ||
| 536 | elseif isDirectory == 1 | ||
| 537 | let symbol = g:WebDevIconsUnicodeDecorateFolderNodesDefaultSymbol | ||
| 538 | endif | ||
| 539 | endif | ||
| 540 | |||
| 541 | else | ||
| 542 | let symbol = g:WebDevIconsUnicodeDecorateFolderNodesDefaultSymbol | ||
| 543 | endif | ||
| 544 | |||
| 545 | let artifactFix = s:DevIconsGetArtifactFix() | ||
| 546 | |||
| 547 | return symbol . artifactFix | ||
| 548 | |||
| 549 | endfunction | ||
| 550 | |||
| 551 | " scope: local | ||
| 552 | " Temporary (hopefully) fix for glyph issues in gvim (proper fix is with the | ||
| 553 | " actual font patcher) | ||
| 554 | function! s:DevIconsGetArtifactFix() | ||
| 555 | if g:DevIconsAppendArtifactFix == 1 | ||
| 556 | let artifactFix = g:DevIconsArtifactFixChar | ||
| 557 | else | ||
| 558 | let artifactFix = '' | ||
| 559 | endif | ||
| 560 | |||
| 561 | return artifactFix | ||
| 562 | endfunction | ||
| 563 | |||
| 564 | " scope: public | ||
| 565 | function! WebDevIconsGetFileFormatSymbol(...) | ||
| 566 | let fileformat = '' | ||
| 567 | let bomb = '' | ||
| 568 | |||
| 569 | if (&bomb && g:WebDevIconsUnicodeByteOrderMarkerDefaultSymbol !=? '') | ||
| 570 | let bomb = g:WebDevIconsUnicodeByteOrderMarkerDefaultSymbol . ' ' | ||
| 571 | endif | ||
| 572 | |||
| 573 | if &fileformat ==? 'dos' | ||
| 574 | let fileformat = '' | ||
| 575 | elseif &fileformat ==? 'unix' | ||
| 576 | let fileformat = s:isDarwin() ? '' : s:getDistro() | ||
| 577 | elseif &fileformat ==? 'mac' | ||
| 578 | let fileformat = '' | ||
| 579 | endif | ||
| 580 | |||
| 581 | let artifactFix = s:DevIconsGetArtifactFix() | ||
| 582 | |||
| 583 | return bomb . fileformat . artifactFix | ||
| 584 | endfunction | ||
| 585 | |||
| 586 | " for airline plugin {{{3 | ||
| 587 | "======================================================================== | ||
| 588 | |||
| 589 | " scope: public | ||
| 590 | function! AirlineWebDevIcons(...) | ||
| 591 | let w:airline_section_x = get(w:, 'airline_section_x', | ||
| 592 | \ get(g:, 'airline_section_x', '')) | ||
| 593 | let w:airline_section_x .= ' %{WebDevIconsGetFileTypeSymbol()} ' | ||
| 594 | let hasFileFormatEncodingPart = airline#parts#ffenc() !=? '' | ||
| 595 | if g:webdevicons_enable_airline_statusline_fileformat_symbols && hasFileFormatEncodingPart | ||
| 596 | let w:airline_section_y = ' %{&fenc . " " . WebDevIconsGetFileFormatSymbol()} ' | ||
| 597 | endif | ||
| 598 | endfunction | ||
| 599 | |||
| 600 | if g:webdevicons_enable == 1 && exists('g:loaded_airline') && g:loaded_airline == 1 && g:webdevicons_enable_airline_statusline | ||
| 601 | call airline#add_statusline_func('AirlineWebDevIcons') | ||
| 602 | endif | ||
| 603 | |||
| 604 | if g:webdevicons_enable == 1 && g:webdevicons_enable_airline_tabline | ||
| 605 | " Store original formatter. | ||
| 606 | let g:_webdevicons_airline_orig_formatter = get(g:, 'airline#extensions#tabline#formatter', 'default') | ||
| 607 | let g:airline#extensions#tabline#formatter = 'webdevicons' | ||
| 608 | endif | ||
| 609 | |||
| 610 | " for nerdtree plugin {{{3 | ||
| 611 | "======================================================================== | ||
| 612 | |||
| 613 | " scope: public | ||
| 614 | function! NERDTreeWebDevIconsRefreshListener(event) | ||
| 615 | let path = a:event.subject | ||
| 616 | let postPadding = g:WebDevIconsNerdTreeAfterGlyphPadding | ||
| 617 | let prePadding = g:WebDevIconsNerdTreeBeforeGlyphPadding | ||
| 618 | let hasGitFlags = (len(path.flagSet._flagsForScope('git')) > 0) | ||
| 619 | let hasGitNerdTreePlugin = (exists('g:loaded_nerdtree_git_status') == 1) | ||
| 620 | let artifactFix = s:DevIconsGetArtifactFix() | ||
| 621 | |||
| 622 | " align vertically at the same level: non git-flag nodes with git-flag nodes | ||
| 623 | if g:WebDevIconsNerdTreeGitPluginForceVAlign && !hasGitFlags && hasGitNerdTreePlugin | ||
| 624 | let prePadding .= ' ' | ||
| 625 | endif | ||
| 626 | |||
| 627 | if !path.isDirectory | ||
| 628 | " Hey we got a regular file, lets get it's proper icon | ||
| 629 | let flag = prePadding . WebDevIconsGetFileTypeSymbol(path.str()) . postPadding | ||
| 630 | |||
| 631 | elseif path.isDirectory && g:WebDevIconsUnicodeDecorateFolderNodes == 1 | ||
| 632 | " Ok we got a directory, some more tests and checks | ||
| 633 | let directoryOpened = 0 | ||
| 634 | |||
| 635 | if g:DevIconsEnableFoldersOpenClose && len(path.flagSet._flagsForScope('webdevicons')) > 0 | ||
| 636 | " did the user set different icons for open and close? | ||
| 637 | |||
| 638 | " isOpen is not available on the path listener directly | ||
| 639 | " but we added one via overriding particular keymappings for NERDTree | ||
| 640 | if has_key(path, 'isOpen') && path.isOpen == 1 | ||
| 641 | let directoryOpened = 1 | ||
| 642 | endif | ||
| 643 | endif | ||
| 644 | |||
| 645 | if g:WebDevIconsUnicodeDecorateFolderNodesExactMatches == 1 | ||
| 646 | " Did the user enable exact matching of folder type/names | ||
| 647 | " think node_modules | ||
| 648 | if g:DevIconsEnableFoldersOpenClose && directoryOpened | ||
| 649 | " the folder is open | ||
| 650 | let flag = prePadding . g:DevIconsDefaultFolderOpenSymbol . artifactFix . postPadding | ||
| 651 | else | ||
| 652 | " the folder is not open | ||
| 653 | if path.isSymLink | ||
| 654 | " We have a symlink | ||
| 655 | let flag = prePadding . g:WebDevIconsUnicodeDecorateFolderNodesSymlinkSymbol . artifactFix . postPadding | ||
| 656 | else | ||
| 657 | " We have a regular folder | ||
| 658 | let flag = prePadding . WebDevIconsGetFileTypeSymbol(path.str(), path.isDirectory) . postPadding | ||
| 659 | endif | ||
| 660 | endif | ||
| 661 | |||
| 662 | else | ||
| 663 | " the user did not enable exact matching | ||
| 664 | if g:DevIconsEnableFoldersOpenClose && directoryOpened | ||
| 665 | " the folder is open | ||
| 666 | let flag = prePadding . g:DevIconsDefaultFolderOpenSymbol . artifactFix . postPadding | ||
| 667 | else | ||
| 668 | " the folder is not open | ||
| 669 | if path.isSymLink | ||
| 670 | " We have a symlink | ||
| 671 | let flag = prePadding . g:WebDevIconsUnicodeDecorateFolderNodesSymlinkSymbol . artifactFix . postPadding | ||
| 672 | else | ||
| 673 | " We have a regular folder | ||
| 674 | let flag = prePadding . g:WebDevIconsUnicodeDecorateFolderNodesDefaultSymbol . artifactFix . postPadding | ||
| 675 | endif | ||
| 676 | endif | ||
| 677 | |||
| 678 | endif | ||
| 679 | |||
| 680 | else | ||
| 681 | let flag = prePadding . ' ' . artifactFix . postPadding | ||
| 682 | endif | ||
| 683 | |||
| 684 | call path.flagSet.clearFlags('webdevicons') | ||
| 685 | |||
| 686 | if flag !=? '' | ||
| 687 | call path.flagSet.addFlag('webdevicons', flag) | ||
| 688 | endif | ||
| 689 | |||
| 690 | endfunction | ||
| 691 | |||
| 692 | " call setup after processing all the functions (to avoid errors) {{{1 | ||
| 693 | "======================================================================== | ||
| 694 | " had some issues with VimEnter, for now using: | ||
| 695 | call s:initialize() | ||
| 696 | |||
| 697 | " standard fix/safety: line continuation (avoiding side effects) {{{1 | ||
| 698 | "======================================================================== | ||
| 699 | let &cpo = s:save_cpo | ||
| 700 | unlet s:save_cpo | ||
| 701 | |||
| 702 | " modeline syntax: | ||
| 703 | " 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 @@ | |||
| 1 | import pkg_resources | ||
| 2 | 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 @@ | |||
| 1 | import pkg_resources | ||
| 2 | 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 @@ | |||
| 1 | # -*- coding: utf-8 -*- | ||
| 2 | # vim:se fenc=utf8 noet: | ||
| 3 | from __future__ import (unicode_literals, division, absolute_import, print_function) | ||
| 4 | |||
| 5 | try: | ||
| 6 | import vim | ||
| 7 | except ImportError: | ||
| 8 | vim = {} | ||
| 9 | |||
| 10 | from powerline.bindings.vim import (vim_get_func, buffer_name) | ||
| 11 | from powerline.theme import requires_segment_info | ||
| 12 | |||
| 13 | @requires_segment_info | ||
| 14 | def webdevicons(pl, segment_info): | ||
| 15 | webdevicons = vim_get_func('WebDevIconsGetFileTypeSymbol') | ||
| 16 | name = buffer_name(segment_info) | ||
| 17 | return [] if not webdevicons else [{ | ||
| 18 | 'contents': webdevicons(name), | ||
| 19 | 'highlight_groups': ['webdevicons', 'file_name'], | ||
| 20 | }] | ||
| 21 | |||
| 22 | @requires_segment_info | ||
| 23 | def webdevicons_file_format(pl, segment_info): | ||
| 24 | webdevicons_file_format = vim_get_func('WebDevIconsGetFileFormatSymbol') | ||
| 25 | return [] if not webdevicons_file_format else [{ | ||
| 26 | 'contents': webdevicons_file_format(), | ||
| 27 | 'highlight_groups': ['webdevicons_file_format', 'file_format'], | ||
| 28 | }] | ||
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 @@ | |||
| 1 | # -*- coding: utf-8 -*- | ||
| 2 | # vim:se fenc=utf8 noet: | ||
| 3 | from .base import Base | ||
| 4 | from os.path import isdir | ||
| 5 | |||
| 6 | |||
| 7 | class Filter(Base): | ||
| 8 | |||
| 9 | def __init__(self, vim): | ||
| 10 | super().__init__(vim) | ||
| 11 | self.name = 'devicons_denite_converter' | ||
| 12 | self.description = 'add devicons in front of candidates' | ||
| 13 | |||
| 14 | def filter(self, context): | ||
| 15 | for candidate in context['candidates']: | ||
| 16 | |||
| 17 | if 'bufnr' in candidate: | ||
| 18 | bufname = self.vim.funcs.bufname(candidate['bufnr']) | ||
| 19 | filename = self.vim.funcs.fnamemodify(bufname, ':p:t') | ||
| 20 | elif 'word' in candidate and 'action__path' in candidate: | ||
| 21 | filename = candidate['word'] | ||
| 22 | |||
| 23 | icon = self.vim.funcs.WebDevIconsGetFileTypeSymbol( | ||
| 24 | filename, isdir(filename)) | ||
| 25 | |||
| 26 | # Customize output format if not done already. | ||
| 27 | if icon not in candidate.get('abbr', '')[:10]: | ||
| 28 | candidate['abbr'] = ' {} {}'.format( | ||
| 29 | icon, candidate.get('abbr', candidate['word'])) | ||
| 30 | |||
| 31 | 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 @@ | |||
| 1 | scriptencoding utf-8 | ||
| 2 | |||
| 3 | let s:suite = themis#suite('Webdevicons-default-value') | ||
| 4 | let s:assert = themis#helper('assert') | ||
| 5 | |||
| 6 | function! s:suite.ExtensionConfig() | ||
| 7 | call s:assert.equals(g:webdevicons_enable, 1) | ||
| 8 | call s:assert.equals(g:webdevicons_enable_nerdtree, 1) | ||
| 9 | call s:assert.equals(g:webdevicons_enable_unite, 1) | ||
| 10 | call s:assert.equals(g:webdevicons_enable_denite, 1) | ||
| 11 | call s:assert.equals(g:webdevicons_enable_vimfiler, 1) | ||
| 12 | call s:assert.equals(g:webdevicons_enable_ctrlp, 1) | ||
| 13 | call s:assert.equals(g:webdevicons_enable_airline_tabline, 1) | ||
| 14 | call s:assert.equals(g:webdevicons_enable_airline_statusline, 1) | ||
| 15 | call s:assert.equals(g:webdevicons_enable_airline_statusline_fileformat_symbols, 1) | ||
| 16 | call s:assert.equals(g:webdevicons_enable_flagship_statusline, 1) | ||
| 17 | call s:assert.equals(g:webdevicons_enable_flagship_statusline_fileformat_symbols, 1) | ||
| 18 | call s:assert.equals(g:webdevicons_enable_startify, 1) | ||
| 19 | call s:assert.equals(g:webdevicons_conceal_nerdtree_brackets, 1) | ||
| 20 | endfunction | ||
| 21 | |||
| 22 | function! s:suite.ConfigOptions() | ||
| 23 | call s:assert.equals(g:DevIconsAppendArtifactFix, 0) | ||
| 24 | call s:assert.equals(g:DevIconsArtifactFixChar, ' ') | ||
| 25 | call s:assert.equals(g:WebDevIconsUnicodeDecorateFileNodes, 1) | ||
| 26 | call s:assert.equals(g:WebDevIconsUnicodeDecorateFolderNodes, 1) | ||
| 27 | call s:assert.equals(g:DevIconsEnableFoldersOpenClose, 0) | ||
| 28 | call s:assert.equals(g:DevIconsEnableFolderPatternMatching, 1) | ||
| 29 | call s:assert.equals(g:DevIconsEnableFolderExtensionPatternMatching, 0) | ||
| 30 | call s:assert.equals(1, g:WebDevIconsUnicodeDecorateFolderNodesExactMatches, 1) | ||
| 31 | call s:assert.equals(1, g:WebDevIconsUnicodeGlyphDoubleWidth, 1) | ||
| 32 | call s:assert.equals(g:WebDevIconsNerdTreeBeforeGlyphPadding, ' ') | ||
| 33 | call s:assert.equals(g:WebDevIconsNerdTreeAfterGlyphPadding, ' ') | ||
| 34 | call s:assert.equals(g:WebDevIconsNerdTreeGitPluginForceVAlign, 1) | ||
| 35 | call s:assert.equals(g:NERDTreeUpdateOnCursorHold, 1) " Obsolete: for backward compatibility | ||
| 36 | call s:assert.equals(g:NERDTreeGitStatusUpdateOnCursorHold, 1) | ||
| 37 | call s:assert.equals(g:WebDevIconsTabAirLineBeforeGlyphPadding, ' ') | ||
| 38 | call s:assert.equals(g:WebDevIconsTabAirLineAfterGlyphPadding, '') | ||
| 39 | 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 @@ | |||
| 1 | scriptencoding utf-8 | ||
| 2 | |||
| 3 | " Please use nerd-font if you watch icon-font | ||
| 4 | |||
| 5 | let s:suite = themis#suite('WebDevIconsGetFileFormatSymbol') | ||
| 6 | let s:assert = themis#helper('assert') | ||
| 7 | |||
| 8 | function! s:suite.UnixIcon() | ||
| 9 | set fileformat=unix | ||
| 10 | let os = system('uname -a') | ||
| 11 | if os =~# 'Darwin' | ||
| 12 | call s:assert.equals(WebDevIconsGetFileFormatSymbol(), '') | ||
| 13 | " It may return Ubuntu because github-actions's OS is Ubuntu | ||
| 14 | elseif os =~# 'Ubuntu' | ||
| 15 | call s:assert.equals(WebDevIconsGetFileFormatSymbol(), '') | ||
| 16 | else | ||
| 17 | call s:assert.skip('Skip testing except for Ubuntu and Mac.') | ||
| 18 | endif | ||
| 19 | endfunction | ||
| 20 | |||
| 21 | function! s:suite.WindowsIcon() | ||
| 22 | set fileformat=dos | ||
| 23 | call s:assert.equals(WebDevIconsGetFileFormatSymbol(), '') | ||
| 24 | endfunction | ||
| 25 | |||
| 26 | function! s:suite.MacIcon() | ||
| 27 | set fileformat=mac | ||
| 28 | call s:assert.equals(WebDevIconsGetFileFormatSymbol(), '') | ||
| 29 | 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 @@ | |||
| 1 | scriptencoding utf-8 | ||
| 2 | |||
| 3 | " Please use nerd-font if you watch icon-font | ||
| 4 | |||
| 5 | let s:suite = themis#suite('WebDevIconsGetFileTypeSymbol') | ||
| 6 | let s:assert = themis#helper('assert') | ||
| 7 | |||
| 8 | function! s:Assert(filename, icon) | ||
| 9 | call s:assert.equals(WebDevIconsGetFileTypeSymbol(a:filename), a:icon) | ||
| 10 | endfunction | ||
| 11 | |||
| 12 | function! s:suite.NoArgument_GetDefaultIcon() | ||
| 13 | call s:assert.equals(WebDevIconsGetFileTypeSymbol(), '') | ||
| 14 | endfunction | ||
| 15 | |||
| 16 | function! s:suite.__OneArgument_VimIcon__() | ||
| 17 | let targetfilenames = ['.vimrc', 'vimrc', '.gvimrc', '_gvimrc', 'test.vim'] | ||
| 18 | let expecticon = '' | ||
| 19 | let child = themis#suite('OneArgument_VimIcon') | ||
| 20 | |||
| 21 | for targetfilename in targetfilenames | ||
| 22 | let child[targetfilename] = funcref('s:Assert', [targetfilename, expecticon]) | ||
| 23 | endfor | ||
| 24 | endfunction | ||
| 25 | |||
| 26 | function! s:suite.__OneArgument_RubyIcon__() | ||
| 27 | let targetfilenames = ['test.rb', 'rakefile', 'RAKEFILE', 'Gemfile', 'config.ru'] | ||
| 28 | let expecticon = '' | ||
| 29 | let child = themis#suite('OneArgument_RubyIcon') | ||
| 30 | |||
| 31 | for targetfilename in targetfilenames | ||
| 32 | let child[targetfilename] = funcref('s:Assert', [targetfilename, expecticon]) | ||
| 33 | endfor | ||
| 34 | endfunction | ||
| 35 | |||
| 36 | function! s:suite.__OneArgument_MarkDownIcon__() | ||
| 37 | let targetfilenames = ['test.md', 'test.markdown', 'test.mdx', 'test.rmd'] | ||
| 38 | let expecticon = '' | ||
| 39 | let child = themis#suite('OneArgument_MarkDownIcon') | ||
| 40 | |||
| 41 | for targetfilename in targetfilenames | ||
| 42 | let child[targetfilename] = funcref('s:Assert', [targetfilename, expecticon]) | ||
| 43 | endfor | ||
| 44 | endfunction | ||
| 45 | |||
| 46 | function! s:suite.__OneArgument_PythonIcon__() | ||
| 47 | let targetfilenames = ['test.py', 'test.pyc', 'test.pyo', 'test.pyd'] | ||
| 48 | let expecticon = '' | ||
| 49 | let child = themis#suite('OneArgument_PythonIcon') | ||
| 50 | |||
| 51 | for targetfilename in targetfilenames | ||
| 52 | let child[targetfilename] = funcref('s:Assert', [targetfilename, expecticon]) | ||
| 53 | endfor | ||
| 54 | endfunction | ||
| 55 | |||
| 56 | function! s:suite.__OneArgument_ShellIcon__() | ||
| 57 | let targetfilenames = ['test.sh', 'test.fish', 'test.bash', 'test.ksh', 'test.csh', 'test.awk', 'test.ps1'] | ||
| 58 | let expecticon = '' | ||
| 59 | let child = themis#suite('OneArgument_ShellIcon') | ||
| 60 | |||
| 61 | for targetfilename in targetfilenames | ||
| 62 | let child[targetfilename] = funcref('s:Assert', [targetfilename, expecticon]) | ||
| 63 | endfor | ||
| 64 | endfunction | ||
| 65 | |||
| 66 | function! s:suite.__OneArgument_DBIcon__() | ||
| 67 | let targetfilenames = ['test.db', 'test.sql', 'test.dump'] | ||
| 68 | let expecticon = '' | ||
| 69 | let child = themis#suite('OneArgument_DBIcon') | ||
| 70 | |||
| 71 | for targetfilename in targetfilenames | ||
| 72 | let child[targetfilename] = funcref('s:Assert', [targetfilename, expecticon]) | ||
| 73 | endfor | ||
| 74 | endfunction | ||
| 75 | |||
| 76 | function! s:suite.__OneArgument_RustIcon__() | ||
| 77 | let targetfilenames = ['test.rs', 'test.rlib'] | ||
| 78 | let expecticon = '' | ||
| 79 | let child = themis#suite('OneArgument_RustIcon') | ||
| 80 | |||
| 81 | for targetfilename in targetfilenames | ||
| 82 | let child[targetfilename] = funcref('s:Assert', [targetfilename, expecticon]) | ||
| 83 | endfor | ||
| 84 | endfunction | ||
| 85 | |||
| 86 | function! s:suite.__OneArgument_DockerIcon__() | ||
| 87 | let targetfilenames = ['Dockerfile', 'docker-compose.yml'] | ||
| 88 | let expecticon = '' | ||
| 89 | let child = themis#suite('OneArgument_DockerIcon') | ||
| 90 | |||
| 91 | for targetfilename in targetfilenames | ||
| 92 | let child[targetfilename] = funcref('s:Assert', [targetfilename, expecticon]) | ||
| 93 | endfor | ||
| 94 | endfunction | ||
| 95 | |||
| 96 | function! s:suite.__OneArgument_JavaScriptIcon__() | ||
| 97 | let targetfilenames = ['test.js', 'test.mjs'] | ||
| 98 | let expecticon = '' | ||
| 99 | let child = themis#suite('OneArgument_JavaScriptIcon') | ||
| 100 | |||
| 101 | for targetfilename in targetfilenames | ||
| 102 | let child[targetfilename] = funcref('s:Assert', [targetfilename, expecticon]) | ||
| 103 | endfor | ||
| 104 | endfunction | ||
| 105 | |||
| 106 | function! s:suite.__OneArgument_ReactIcon__() | ||
| 107 | let targetfilenames = ['test.jsx', 'test.tsx', 'react.jsx'] | ||
| 108 | let expecticon = '' | ||
| 109 | let child = themis#suite('OneArgument_ReactIcon') | ||
| 110 | |||
| 111 | for targetfilename in targetfilenames | ||
| 112 | let child[targetfilename] = funcref('s:Assert', [targetfilename, expecticon]) | ||
| 113 | endfor | ||
| 114 | endfunction | ||
| 115 | |||
| 116 | function! s:suite.__OneArgument_JsonIcon__() | ||
| 117 | let targetfilenames = ['test.json', 'test.webmanifest'] | ||
| 118 | let expecticon = '' | ||
| 119 | let child = themis#suite('OneArgument_JsonIcon') | ||
| 120 | |||
| 121 | for targetfilename in targetfilenames | ||
| 122 | let child[targetfilename] = funcref('s:Assert', [targetfilename, expecticon]) | ||
| 123 | endfor | ||
| 124 | endfunction | ||
| 125 | |||
| 126 | function! s:suite.__OneArgument_GearIcon__() | ||
| 127 | let targetfilenames = ['.DS_Store', 'Makefile', 'test.mk', '.bashrc', '.zshrc', '.gitignore', '.gitattributes', 'cmakelists.txt', 'test.yaml', 'test.yml', 'test.toml', 'test.bat'] | ||
| 128 | let expecticon = '' | ||
| 129 | let child = themis#suite('OneArgument_GearIcon') | ||
| 130 | |||
| 131 | for targetfilename in targetfilenames | ||
| 132 | let child[targetfilename] = funcref('s:Assert', [targetfilename, expecticon]) | ||
| 133 | endfor | ||
| 134 | endfunction | ||
| 135 | |||
| 136 | function! s:suite.__OneArgument_ErlangIcon__() | ||
| 137 | let targetfilenames = ['test.erl', 'test.hrl'] | ||
| 138 | let expecticon = '' | ||
| 139 | let child = themis#suite('OneArgument_ErlangIcon') | ||
| 140 | |||
| 141 | for targetfilename in targetfilenames | ||
| 142 | let child[targetfilename] = funcref('s:Assert', [targetfilename, expecticon]) | ||
| 143 | endfor | ||
| 144 | endfunction | ||
| 145 | |||
| 146 | function! s:suite.__OneArgument_SwiftIcon__() | ||
| 147 | let targetfilenames = ['test.swift', 'test.xcplayground'] | ||
| 148 | let expecticon = '' | ||
| 149 | let child = themis#suite('OneArgument_SwiftIcon') | ||
| 150 | |||
| 151 | for targetfilename in targetfilenames | ||
| 152 | let child[targetfilename] = funcref('s:Assert', [targetfilename, expecticon]) | ||
| 153 | endfor | ||
| 154 | endfunction | ||
| 155 | |||
| 156 | function! s:suite.__OneArgument_HaskellIcon__() | ||
| 157 | let targetfilenames = ['test.hs', 'test.lhs'] | ||
| 158 | let expecticon = '' | ||
| 159 | let child = themis#suite('OneArgument_HaskellIcon') | ||
| 160 | |||
| 161 | for targetfilename in targetfilenames | ||
| 162 | let child[targetfilename] = funcref('s:Assert', [targetfilename, expecticon]) | ||
| 163 | endfor | ||
| 164 | endfunction | ||
| 165 | |||
| 166 | function! s:suite.__OneArgument_CppIcon__() | ||
| 167 | let targetfilenames = ['test.cpp', 'test.c++', 'test.cp', 'test.cxx', 'test.cc'] | ||
| 168 | let expecticon = '' | ||
| 169 | let child = themis#suite('OneArgument_C++Icon') | ||
| 170 | |||
| 171 | for targetfilename in targetfilenames | ||
| 172 | let child[targetfilename] = funcref('s:Assert', [targetfilename, expecticon]) | ||
| 173 | endfor | ||
| 174 | endfunction | ||
| 175 | |||
| 176 | function! s:suite.__OneArgument_ElixirIcon__() | ||
| 177 | let targetfilenames = ['test.ex', 'test.exs', 'test.eex', 'test.leex', 'test.heex'] | ||
| 178 | let expecticon = '' | ||
| 179 | let child = themis#suite('OneArgument_ElixirIcon') | ||
| 180 | |||
| 181 | for targetfilename in targetfilenames | ||
| 182 | let child[targetfilename] = funcref('s:Assert', [targetfilename, expecticon]) | ||
| 183 | endfor | ||
| 184 | endfunction | ||
| 185 | |||
| 186 | function! s:suite.__OneArgument_PerlIcon__() | ||
| 187 | let targetfilenames = ['test.pl', 'test.pm', 'test.t'] | ||
| 188 | let expecticon = '' | ||
| 189 | let child = themis#suite('OneArgument_PerlIcon') | ||
| 190 | |||
| 191 | for targetfilename in targetfilenames | ||
| 192 | let child[targetfilename] = funcref('s:Assert', [targetfilename, expecticon]) | ||
| 193 | endfor | ||
| 194 | endfunction | ||
| 195 | |||
| 196 | function! s:suite.__OneArgument_FSharpIcon__() | ||
| 197 | let targetfilenames = ['test.fs', 'test.fsx', 'test.fsi', 'test.fsscript'] | ||
| 198 | let expecticon = '' | ||
| 199 | let child = themis#suite('OneArgument_FSharpIcon') | ||
| 200 | |||
| 201 | for targetfilename in targetfilenames | ||
| 202 | let child[targetfilename] = funcref('s:Assert', [targetfilename, expecticon]) | ||
| 203 | endfor | ||
| 204 | endfunction | ||
| 205 | |||
| 206 | function! s:suite.OneArgument_GetTypeScriptIcon() | ||
| 207 | call s:assert.equals(WebDevIconsGetFileTypeSymbol('test.ts'), '') | ||
| 208 | endfunction | ||
| 209 | |||
| 210 | function! s:suite.OneArgument_GetVueIcon() | ||
| 211 | call s:assert.equals(WebDevIconsGetFileTypeSymbol('test.vue'), '﵂') | ||
| 212 | endfunction | ||
| 213 | |||
| 214 | function! s:suite.OneArgument_GetNodeModuleIcon() | ||
| 215 | call s:assert.equals(WebDevIconsGetFileTypeSymbol('node_modules'), '') | ||
| 216 | endfunction | ||
| 217 | |||
| 218 | function! s:suite.OneArgument_GetDropboxIcon() | ||
| 219 | call s:assert.equals(WebDevIconsGetFileTypeSymbol('Dropbox'), '') | ||
| 220 | endfunction | ||
| 221 | |||
| 222 | function! s:suite.OneArgument_GetRIcon() | ||
| 223 | call s:assert.equals(WebDevIconsGetFileTypeSymbol('test.r'), 'ﳒ') | ||
| 224 | endfunction | ||
| 225 | |||
| 226 | function! s:suite.OneArgument_GetLuaIcon() | ||
| 227 | call s:assert.equals(WebDevIconsGetFileTypeSymbol('test.lua'), '') | ||
| 228 | endfunction | ||
| 229 | |||
| 230 | function! s:suite.OneArgument_GetJavaIcon() | ||
| 231 | call s:assert.equals(WebDevIconsGetFileTypeSymbol('test.java'), '') | ||
| 232 | endfunction | ||
| 233 | |||
| 234 | function! s:suite.OneArgument_GetCIcon() | ||
| 235 | call s:assert.equals(WebDevIconsGetFileTypeSymbol('test.c'), '') | ||
| 236 | endfunction | ||
| 237 | |||
| 238 | function! s:suite.OneArgument_GetCSSIcon() | ||
| 239 | call s:assert.equals(WebDevIconsGetFileTypeSymbol('test.cs'), '') | ||
| 240 | endfunction | ||
| 241 | |||
| 242 | function! s:suite.OneArgument_GetCSharpIcon() | ||
| 243 | call s:assert.equals(WebDevIconsGetFileTypeSymbol('test.cs'), '') | ||
| 244 | endfunction | ||
| 245 | |||
| 246 | function! s:suite.OneArgument_GetElmIcon() | ||
| 247 | call s:assert.equals(WebDevIconsGetFileTypeSymbol('test.elm'), '') | ||
| 248 | endfunction | ||
| 249 | |||
| 250 | function! s:suite.OneArgument_GetRssIcon() | ||
| 251 | call s:assert.equals(WebDevIconsGetFileTypeSymbol('test.rss'), '') | ||
| 252 | endfunction | ||
| 253 | |||
| 254 | function! s:suite.OneArgument_GetDartIcon() | ||
| 255 | call s:assert.equals(WebDevIconsGetFileTypeSymbol('test.dart'), '') | ||
| 256 | endfunction | ||
| 257 | |||
| 258 | function! s:suite.OneArgument_GetSolidityIcon() | ||
| 259 | call s:assert.equals(WebDevIconsGetFileTypeSymbol('test.sol'), 'ﲹ') | ||
| 260 | endfunction | ||
| 261 | |||
| 262 | function! s:suite.OneArgument_GetGoIcon() | ||
| 263 | call s:assert.equals(WebDevIconsGetFileTypeSymbol('test.go'), '') | ||
| 264 | endfunction | ||
| 265 | |||
| 266 | function! s:suite.OneArgument_GetPhpIcon() | ||
| 267 | call s:assert.equals(WebDevIconsGetFileTypeSymbol('test.php'),'') | ||
| 268 | endfunction | ||
| 269 | |||
| 270 | function! s:suite.OneArgument_GetScalaIcon() | ||
| 271 | call s:assert.equals( WebDevIconsGetFileTypeSymbol('test.scala'), '') | ||
| 272 | endfunction | ||
| 273 | |||
| 274 | function! s:suite.OneArgument_GetTexIcon() | ||
| 275 | call s:assert.equals( WebDevIconsGetFileTypeSymbol('test.tex'), 'ﭨ') | ||
| 276 | endfunction | ||
| 277 | |||
| 278 | function! s:suite.OneArgument_GetLicenseIcon() | ||
| 279 | call s:assert.equals( WebDevIconsGetFileTypeSymbol('LICENSE'), '') | ||
| 280 | endfunction | ||
| 281 | |||
| 282 | function! s:suite.OneArgument_GetRobotIcon() | ||
| 283 | call s:assert.equals( WebDevIconsGetFileTypeSymbol('robots.txt'), 'ﮧ') | ||
| 284 | endfunction | ||
| 285 | |||
| 286 | function! s:suite.OneArgument_PemIcon() | ||
| 287 | call s:assert.equals( WebDevIconsGetFileTypeSymbol('test.pem'), '') | ||
| 288 | endfunction | ||
| 289 | |||
| 290 | function! s:suite.TwoArgument_zero_GetFileIcon() | ||
| 291 | call s:assert.equals( WebDevIconsGetFileTypeSymbol('test.vim', 0), '') | ||
| 292 | endfunction | ||
| 293 | |||
| 294 | function! s:suite.TwoArgument_one_GetFolderIcon() | ||
| 295 | call s:assert.equals( WebDevIconsGetFileTypeSymbol('test.vim', 1), '') | ||
| 296 | endfunction | ||
| 297 | |||
| 298 | function! s:suite.TwoArgument_two_GetDefaultIcon() | ||
| 299 | call s:assert.equals( WebDevIconsGetFileTypeSymbol('test.vim', 2), '') | ||
| 300 | endfunction | ||
| 301 | |||
| 302 | function! s:suite.TwoArgument_string_GetFileTypeIcon() | ||
| 303 | call s:assert.equals( WebDevIconsGetFileTypeSymbol('test.php', 'test.vim'), '') | ||
| 304 | endfunction | ||
| 305 | |||
| 306 | function! s:suite.NoArgument_OverWriteFileType_GetVimIcon() | ||
| 307 | set ft=vim | ||
| 308 | call s:assert.equals(WebDevIconsGetFileTypeSymbol(), '') | ||
| 309 | endfunction | ||
| 310 | |||
| 311 | function! s:suite.NoArgument_EditVimFile_GetVimIcon() | ||
| 312 | edit! test.vim | ||
| 313 | call s:assert.equals(WebDevIconsGetFileTypeSymbol(), '') | ||
| 314 | endfunction | ||
| 315 | |||
| 316 | function! s:suite.NoArgument_Editvimrc_GetVimIcon() | ||
| 317 | edit! vimrc | ||
| 318 | call s:assert.equals(WebDevIconsGetFileTypeSymbol(), '') | ||
| 319 | endfunction | ||
| 320 | |||
| 321 | function! s:suite.NoArgument_EditPythonFile_GetPythonIcon() | ||
| 322 | edit! test.py | ||
| 323 | call s:assert.equals(WebDevIconsGetFileTypeSymbol(), '') | ||
| 324 | endfunction | ||
| 325 | |||
| 326 | function! s:suite.NoArgument_EditjavaScriptFile_GetjavaScriptIcon() | ||
| 327 | edit! test.js | ||
| 328 | call s:assert.equals(WebDevIconsGetFileTypeSymbol(), '') | ||
| 329 | endfunction | ||
| 330 | |||
| 331 | function! s:suite.NoArgument_EditRustFile_GetRustIcon() | ||
| 332 | edit! test.rs | ||
| 333 | call s:assert.equals(WebDevIconsGetFileTypeSymbol(), '') | ||
| 334 | endfunction | ||
| 335 | |||
| 336 | function! s:suite.NoArgument_EditMKFile_GetGearIcon() | ||
| 337 | edit! test.mk | ||
| 338 | call s:assert.equals(WebDevIconsGetFileTypeSymbol(), '') | ||
| 339 | endfunction | ||
| 340 | |||
| 341 | function! s:suite.OneArgument_EditPythonFile_GetRubyIcon() | ||
| 342 | edit! test.py | ||
| 343 | call s:assert.equals(WebDevIconsGetFileTypeSymbol('test.rb'), '') | ||
| 344 | endfunction | ||
