First commit
This commit is contained in:
commit
03cc854bfc
1154 changed files with 124499 additions and 0 deletions
24
nvim/.vim/plugged/vim-devicons/.github/ISSUE_TEMPLATE.md
vendored
Normal file
24
nvim/.vim/plugged/vim-devicons/.github/ISSUE_TEMPLATE.md
vendored
Normal file
|
@ -0,0 +1,24 @@
|
|||
#### Requirements
|
||||
|
||||
<!-- ⚠️ !!!
|
||||
If you are unsure what you are reporting is an issue or
|
||||
it's a general question please go to the gitter chat instead: https://gitter.im/ryanoasis/vim-devicons
|
||||
⚠️ !!! -->
|
||||
|
||||
#### Required Info
|
||||
|
||||
<!-- ⚠️ !!! Issues not filled out with the template will be closed straight away and will only be responded to once filled properly ⚠️ !!! -->
|
||||
|
||||
- [ ] I have searched the [issues](https://github.com/ryanoasis/vim-devicons/issues) for my issue and found nothing related and/or helpful
|
||||
- [ ] I have read or at least glanced at the [FAQ](https://github.com/ryanoasis/vim-devicons/wiki/FAQ-&-Troubleshooting)
|
||||
- [ ] I have read or at least glanced at the [Wiki](https://github.com/ryanoasis/vim-devicons/wiki)
|
||||
- [ ] `VimDevIcons` is the last loaded vim plugin?
|
||||
- [ ] What **version** of vim are you using?
|
||||
- hint: `vim --version`
|
||||
- [ ] What **font** are you using?
|
||||
- [ ] Are you using vim from the terminal or a GUI vim?
|
||||
- [ ] Are you using Mac, Linux or Windows?
|
||||
|
||||
#### Optional Info
|
||||
|
||||
- [ ] Provide **screenshots** where appropriate
|
15
nvim/.vim/plugged/vim-devicons/.github/PULL_REQUEST_TEMPLATE.md
vendored
Normal file
15
nvim/.vim/plugged/vim-devicons/.github/PULL_REQUEST_TEMPLATE.md
vendored
Normal file
|
@ -0,0 +1,15 @@
|
|||
#### Requirements (please check off with 'x')
|
||||
|
||||
- [ ] I have read the [Contributing Guidelines](https://github.com/ryanoasis/vim-devicons/blob/master/CONTRIBUTING.md)
|
||||
- [ ] I have read or at least glanced at the [FAQ](https://github.com/ryanoasis/vim-devicons#faq--troubleshooting)
|
||||
- [ ] I have read or at least glanced at the [Wiki](https://github.com/ryanoasis/vim-devicons/wiki)
|
||||
|
||||
#### What does this Pull Request (PR) do?
|
||||
|
||||
#### How should this be manually tested?
|
||||
|
||||
#### Any background context you can provide?
|
||||
|
||||
#### What are the relevant tickets (if any)?
|
||||
|
||||
#### Screenshots (if appropriate or helpful)
|
42
nvim/.vim/plugged/vim-devicons/.github/workflows/ci.yml
vendored
Normal file
42
nvim/.vim/plugged/vim-devicons/.github/workflows/ci.yml
vendored
Normal file
|
@ -0,0 +1,42 @@
|
|||
name: CI
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
pull_request:
|
||||
branches:
|
||||
- master
|
||||
|
||||
jobs:
|
||||
test:
|
||||
name: Test
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix:
|
||||
vim:
|
||||
- v9.0.0000
|
||||
- v8.2.1000
|
||||
- v8.2.0000
|
||||
- v8.1.0000
|
||||
- v8.0.0000
|
||||
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@main
|
||||
- name: Checkout vim-themis
|
||||
uses: actions/checkout@main
|
||||
with:
|
||||
repository: thinca/vim-themis
|
||||
path: vim-themis
|
||||
|
||||
- name: Setup Vim
|
||||
uses: rhysd/action-setup-vim@v1
|
||||
id: vim
|
||||
with:
|
||||
version: ${{ matrix.vim }}
|
||||
|
||||
- name: Test
|
||||
env:
|
||||
THEMIS_VIM: ${{ steps.vim.outputs.executable }}
|
||||
run: ./vim-themis/bin/themis --reporter spec
|
32
nvim/.vim/plugged/vim-devicons/.github/workflows/vint.yml
vendored
Normal file
32
nvim/.vim/plugged/vim-devicons/.github/workflows/vint.yml
vendored
Normal file
|
@ -0,0 +1,32 @@
|
|||
name: vint
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
pull_request:
|
||||
branches:
|
||||
- master
|
||||
jobs:
|
||||
build:
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix:
|
||||
python-version: [3.8]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@main
|
||||
- name: Set up Python ${{ matrix.python-version }}
|
||||
uses: actions/setup-python@main
|
||||
with:
|
||||
python-version: ${{ matrix.python-version }}
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
python -m pip install --upgrade pip
|
||||
- name: Install vint
|
||||
run: |
|
||||
pip install vim-vint
|
||||
- name: Run vint
|
||||
run: |
|
||||
vint --verbose --stat $(find . -type f -name '*.vim')
|
5
nvim/.vim/plugged/vim-devicons/.gitignore
vendored
Normal file
5
nvim/.vim/plugged/vim-devicons/.gitignore
vendored
Normal file
|
@ -0,0 +1,5 @@
|
|||
doc/tags
|
||||
__pycache__/
|
||||
.DS_Store
|
||||
.netrwhist
|
||||
*.swp
|
249
nvim/.vim/plugged/vim-devicons/CHANGELOG.md
Normal file
249
nvim/.vim/plugged/vim-devicons/CHANGELOG.md
Normal file
|
@ -0,0 +1,249 @@
|
|||
|
||||
CHANGELOG
|
||||
================================================================================
|
||||
This project is using [Semantic Versioning 2.0.0](http://semver.org/)
|
||||
|
||||
- v0.11.0
|
||||
- Added Docker filetypes support (PR #228) (@IngoHeimbach)
|
||||
- Added Swift filetypes support (PR #252) (@motform)
|
||||
- Added Elixir filetypes support (PR #244) (@akoutmos)
|
||||
- Added configuration for 'prePadding' (fixes #231)
|
||||
- Added support for `vue` filetype extensions out-of-the-box (fixes #235)
|
||||
- Added configuration for 'DevIconsArtifactFix' (#225)
|
||||
- Added leftrelease override to work on single mouse click (PR #246) (@Matrix86)
|
||||
- Added Travis CI with vim linting (PR #236) (@kutsan)
|
||||
- Fixed Vim-Startify no longer working "out of the box" (#233)
|
||||
- Fixed Denite information being discarded (fixes #216) (PR #229 @carlitux)
|
||||
- Fixed inconsistent spacing between folder and file glyphs (fixes #213)
|
||||
- Updated variable declarations and refactored into set function (PR #237) (@kutsan)
|
||||
- Updated plugin initialization functions to autoload on demand (PR #238) (@kutsan)
|
||||
- Updated documentation and refactored massively to Wiki (PR #232) (@kutsan)
|
||||
- Updated `vim` glyph to better glyph (fixes #234)
|
||||
- Updated Readme screenshots and badges
|
||||
- v0.10.0
|
||||
- Added support for symlink directories (PR #221) (@mhartington)
|
||||
- Added missing Denite config in readme (PR #217, fixes #205) (@mohamadLy)
|
||||
- Fixed NERDTree folder open bug with cascade setting (fixes #194)
|
||||
- Fixed potential issue with Vim-Airline (PR #219) (@chrisbra)
|
||||
- Fixed readme.md (removed duplicate section) (PR #222) (@thehappydinoa)
|
||||
- Updated Vim-Airline Repo link in readme (PR #220) (@chrisbra)
|
||||
- v0.9.3
|
||||
- Added `tsx` filetype (PR #210) (@dustinblackman)
|
||||
- Updated links of [deprecated kien/ctrlp](https://github.com/kien/ctrlp.vim) to [active ctrlp fork](https://github.com/ctrlpvim/ctrlp.vim) (PR #211) (@haxorjim)
|
||||
- Updated MacOS and Windows `guifont` examples with alternate format (fixes #208)
|
||||
- v0.9.2
|
||||
- Added `yaml` filetype (PR #207) (@jpoppe)
|
||||
- Added mention of `vim-workspace` as an integrated plugin (PR #206) (@bagrat)
|
||||
- Fixed NERDTree keymap `U` open folder icon bug (fixes #189)
|
||||
- v0.9.1
|
||||
- Added `sass` filetype (PR #202) (@toastal)
|
||||
- Fixed NERDTree open/close folder icon bugs (fixes #194)
|
||||
- Fixed airline conflict with file enconding `skip_expected_string` feature (fixes #203)
|
||||
- Fixed possible glyph artifacts on open/close folder glyphs
|
||||
- v0.9.0
|
||||
- Added support for [Denite](https://github.com/Shougo/denite.nvim) (PR #191) (@0phoff)
|
||||
- Added symbol for byte order marker (BOM) (utf-8) (PR #199) (@Snaptags)
|
||||
- Added support for `.zshrc`, `.vimrc`, `pp` (Puppet classes extensions), and `Vagrantfile` filetypes (enhancement #200) (@kiyanwang)
|
||||
- Added support for `h`, `hpp`, `hxx` (C/C++ header filetype extensions) (enhancement #190)
|
||||
- Added support for `bash`, `zsh`, `ksh`, `csh`, `awk`, `ps1` (script extensions) (enhancement #196)
|
||||
- Added support for `rmd` (R Markdown) (partially fixes #195)
|
||||
- Fixes opened folders titles padding/spacing offset (fixes #197)
|
||||
- v0.8.6
|
||||
- Added support for vimfiler explorer mode (fixes #171)
|
||||
- Added `doc/tags` to `.gitignore` (PR #182) (@doronbehar)
|
||||
- Added warning to readme pertaining to old versions of NERDTree and CtrlP (PR #177, fixes #174) (@Melon-Bread)
|
||||
- Fixes CtrlP buffer names (PR #185) (@HerringtonDarkholme)
|
||||
- Fixes character encoding issue in vim doc (PR #178) (@mhartington)
|
||||
- Fixes extraneous space after glyph in airline (PR #184) (@tbodt)
|
||||
- Fixes errors when NERDTree not present (PR #187) (@blueyed)
|
||||
- Updated Contributor Covenant to `v1.4`
|
||||
- Updated API examples
|
||||
- v0.8.5
|
||||
- Fixed errors in neovim (E670) (PR #163, fixes #162) (@mhartington)
|
||||
- Fixed issue of updating NERDTree window via `CursorHoldUpdate` (PR #166) (@svanharmelen)
|
||||
- Fixes updating of special buffer when selected
|
||||
- Fixes potential issues CtrlP opening in wrong buffer when NERDTree is opened
|
||||
- Fixed issue with CtrlP `:CtrlPMRU` always defaulting to current buffer (fixes #88)
|
||||
- Also adds glyphs to other CtrlP modes besides MRU as a side effect
|
||||
- Fixed documentation discrepency on pluging load order (PR #169) (@F1LT3R)
|
||||
- Fixed documentation related to CtrlP MRU mode (PR #170, fixes #168) (@F1LT3R)
|
||||
- v0.8.4
|
||||
- Fixed always warning about deprecated CtrlP version (fixes #137)
|
||||
- Fixed missing configuration info about pattern based symbols (fixes #152)
|
||||
- Fixed `WebDevIconsGetFileTypeSymbol` method iterator missing `break` (PR #156) (@blueyed)
|
||||
- Fixed a typo in the readme (PR #159) (@SSARCandy)
|
||||
- Added reference to [tiagofumo/vim-nerdtree-syntax-highlight](https://github.com/tiagofumo/vim-nerdtree-syntax-highlight) in readme (PR #161) (@tiagofumo)
|
||||
- However, the [FAQ](https://github.com/ryanoasis/vim-devicons/wiki/FAQ) has been moved to the [Wiki](https://github.com/ryanoasis/vim-devicons/wiki) in this release
|
||||
- v0.8.3
|
||||
- Fixed NERDTree not displaying glyph (icon) for newly created files (fixes #153)
|
||||
- Also adds info to readme about `updatetime`
|
||||
- Fixed resourcing `vimrc` not maintaining current NERDTree state (fixes #154)
|
||||
- Adds new public methods `webdevicons#hardRefresh()` and `webdevicons#softRefresh()`
|
||||
- Makes public method `webdevicons#refresh()` do a 'soft' refresh
|
||||
- Fixed various source formatting and implemented most of vim lint ([vint](https://github.com/Kuniwak/vint)) recommendations
|
||||
- Added public methods available to readme
|
||||
- v0.8.2
|
||||
- Updated `jsx` filetype (using React glyph) (enhancement PR #148) (@alpertuna)
|
||||
- Added issue and pull request templates
|
||||
- v0.8.1
|
||||
- Fixed Unite display issues (absolute paths and/or duplicate paths) (fixes #140)
|
||||
- Fixed custom CtrlP open function causing 'E16' (fixes #115)
|
||||
- Fixed typo in readme for setting default folder glyph (PR #143)
|
||||
- Added documentation for highlighting icon/glyphs only (not just entire lines) in NERDTree (fixes #142)
|
||||
- v0.8.0
|
||||
- Added support for more [unite](https://github.com/Shougo/unite.vim) actions: `file_rec/async`, `file_rec/neovim`, `file_rec/neovim2`, `file_rec/git` (enhancement PR #132, fixes #131) (@mhartington)
|
||||
- Improved Darwin detection by using a lighter method/logic (#135) (@delphinus35)
|
||||
- Fixes `NERDTree-C` (fix PR #139) (@endenwer)
|
||||
- Fixes error using open/close symbols for folder (fixes #130)
|
||||
- v0.7.1
|
||||
- Misc readme updates
|
||||
- Fixed performance issues and odd graphical artifacts in v0.7.0 (fixes #127)
|
||||
- Improved installation instructions and re-organized some items to [Nerd Fonts repo](https://github.com/ryanoasis/nerd-fonts) (PR #129, fixes #125, #128) (@her)
|
||||
- v0.7.0
|
||||
- Deprecated support for [kien/ctrlp](https://github.com/kien/ctrlp.vim) and only support [active ctrlp fork](https://github.com/ctrlpvim/ctrlp.vim) going forward (fixes #117)
|
||||
- Added information to readme about [vim-startify](https://github.com/mhinz/vim-startify) support (enhancement #94)
|
||||
- Added information to readme with possible fix to 'Dots after icons' (fixes #110) (@KabbAmine)
|
||||
- Added support for 'cljc' (Clojure) filetypes (fix PR #120) (@spacepluk)
|
||||
- Fixed certain folders in NERDTree showing file glyphs (based on pattern matching) (fixes #112)
|
||||
- Fixed OS icon being display with as Linux Tux on Mac (fixes #118,fix PR #121) (@trodrigu)
|
||||
- Fixed deprecated Linux font path in readme (fix PR #123) (@jrobeson)
|
||||
- v0.6.1
|
||||
- Fixed likely breaking bug: undefined variable g:DevIconsEnableFoldersOpenClose (fixes #109)
|
||||
- Fixed up the changelog details
|
||||
- v0.6.0
|
||||
- Added support for [Powerline](https://github.com/powerline/powerline) (enhancement PR #74) (@delphinus35)
|
||||
- Added support for 'ts' (TypeScript) filetypes (enhancement #79)
|
||||
- Added support for 'jl' (Julia) filetypes
|
||||
- Added support for 'bat' (batch) filetypes
|
||||
- Added support for 'ejs' (Embedded JavaScript Templates) filetypes (enhancement #105) (@lerrua)
|
||||
- Added support for 'react.jsx' filetype
|
||||
- Added support for 'procfile' filetype
|
||||
- Changed default 'go' filetype glyph to a better one
|
||||
- Added open & close folder glyphs (icons) (enhancement #104)
|
||||
- Fixed new files not having icons until refreshing NERDTree (fixes #33)
|
||||
- Solution very similar to [nerdtree-git-plugin](https://github.com/Xuyuanp/nerdtree-git-plugin)
|
||||
- v0.5.4
|
||||
- Misc readme updates
|
||||
- Add support for ocaml 'ml', 'mli' filetypes (enhancement PR #99) (@CharlieMartell)
|
||||
- Add support for 'sql' and 'dump' filetypes (enhancement PR #100) (@lerrua)
|
||||
- Add support for 'ico' filetypes (enhancement PR #101) (@lerrua)
|
||||
- Add support for 'markdown' filetypes (enhancement PR #102) (@lerrua)
|
||||
- Improved install fonts instructions on Mac (enhancement PR #103) (@lerrua)
|
||||
- v0.5.3
|
||||
- Add 'slim' filetype support (same icon as 'html') (enhancement PR #98) (@lerrua)
|
||||
- Add 'fish' filetype support (same icon as 'sh') (enhancement #93) (@michaelmrose)
|
||||
- Updated old link references (enhancement PR #87) (@lerrua)
|
||||
- Improved default Ruby icon (uses 'glyph set 2') (enhancement PR #97) (@lerrua)
|
||||
- Prevent destorying user's conceal settings (Use setlocal) (enhancement PR #96) (@shawncplus)
|
||||
- Fixes filenames of buffers getting lost in unite filter (fixes #86) (@ahrse)
|
||||
- Various readme updates and fixes
|
||||
- v0.5.2
|
||||
- Various readme updates and fixes
|
||||
- Various file clean-up (.gitignore removed)
|
||||
- Fixed link to install fonts (PR #83 fixes #81) (@theRemix)
|
||||
- Fixed glyph used for Go (PR #82) (@hoop33)
|
||||
- Added Code of Conduct
|
||||
- v0.5.1
|
||||
- Fixed [CtrlP](https://github.com/ctrlpvim/ctrlp.vim) integration bugs (truncating 6 characters is unreliable) and only add glyphs for MRU File Mode (Fixes #80)
|
||||
- Readme updates and improvements
|
||||
- v0.5.0
|
||||
- Readme updates (removed polls sections, v0.5.0 specific changes)
|
||||
- Misc code formatting fixes (tabs to spaces, modeline additions, reorganization)
|
||||
- Update API: make WebDevIconsGetFileFormatSymbol return only fenc (fixes #73)
|
||||
- Added Perl support (enhancement #60)
|
||||
- Added support for some (mostly frontend) frameworks (enhancement #61)
|
||||
- Added basic support for vim-flagship (enhancement #70)
|
||||
- Added support for Unite and Vimfiler (enhancement #54)
|
||||
- Added support for CtrlP (enhancement #56)
|
||||
- Rebranding part 1: title and image (vim-devicons) (enhancement #76)
|
||||
- v0.4.4
|
||||
- Lots of readme updates and tweaks
|
||||
- Changelog semver details
|
||||
- Spelling / confusing grammar corrections (PR #68) (@adelarsq)
|
||||
- Fixed default folder/directory glyph (PR Fixes #72) (@cj)
|
||||
- Mac OS X screenshot (Fixes #32) (@RageZBla)
|
||||
- Fixed misalignment when used with [nerdtree-git-plugin](https://github.com/Xuyuanp/nerdtree-git-plugin) (Fixes #71)
|
||||
- Fixed re-sourcing bug (Fixes #71)
|
||||
- Fixed directory node user settings being overwritten (Fixes #59)
|
||||
- Fixed minor screenshot issues and clean-up
|
||||
- v0.4.3
|
||||
- Prevent error 'Unknown function' when opening Vim without airline plugin (Fixes #67)
|
||||
- Temporary fix for gvim glyph artifact issues (particuarly NERDTree) (Fixes #58)
|
||||
- Support file format symbols (glyphs) in vim-airline (Enhancement #66)
|
||||
- Add vimrc setup example to readme (Documentation #65)
|
||||
- Fixes Conceal highlighting issues (Fixes #53, #52)
|
||||
- Make sure plugin plays nice with [nerdtree-git-plugin](https://github.com/Xuyuanp/nerdtree-git-plugin) (Enhancement #62)
|
||||
- general readme updates and improvements
|
||||
- changelog format fixes
|
||||
- v0.4.2
|
||||
- Updated vim doc with latest readme updates (html2vimdoc)
|
||||
- Fixes #7 update readme for font and vim setup on osx and win platforms
|
||||
- Fixes #49 with a FAQ update
|
||||
- Fixes #41 No such event: nerdtree syntax match (@nbicalcarata)
|
||||
- Removed test files from the repo and added folders to git-ignore
|
||||
- Warn about loading vim-webdevicons before nerdtree plugin
|
||||
- fix lazy NERDTree (@blueyed)
|
||||
- Improve conceiling with NERDTree (@blueyed)
|
||||
- add instructions to readme for vim setup on os x (@alfredbez)
|
||||
- v0.4.1
|
||||
- Fixes #39 - updated screenshots (particularly nerdtree)
|
||||
- Fixes #37 - g:webdevicons_conceal_nerdtree_brackets applying global config
|
||||
- Add instructions to readme for adding icon to lightline (@hoop33)
|
||||
- Updated vim doc with latest readme updates (sync'd with html2vimdoc)
|
||||
- Added TL;DR section to readme
|
||||
- Add a note to readme to load NERDTree before vim-webdevicons (@hoop33)
|
||||
- Fix: Automatically turning off NERDTree support (@hoop33)
|
||||
- general readme updates
|
||||
- v0.4.0
|
||||
- #27 Remove [ ] wrapping icons
|
||||
- #26 Add detection and warning on unsupported (old) NERDTree versions
|
||||
- updated readme with more links and new details on new features and conifgs
|
||||
- #30 Improve vim standard plugin conventions and tips
|
||||
- #30 work on sections and standard plugin conventions part 1
|
||||
- #30 clean-up of unused (for now) autoload file
|
||||
- #28 setting global options broken part 1
|
||||
- #29 Add vimdoc, more updates
|
||||
- autogenerating vimdoc using html2vimdoc
|
||||
- readme updates
|
||||
- v0.3.4
|
||||
- Adds basic support for directory/folder glyphs - fixes #22
|
||||
- optimize icon lookup - WebDevIconsGetFileTypeSymbol: use if/else (@blueyed)
|
||||
- Do not clobber the default or customized airline formatter (@blueyed)
|
||||
- fixed a bug related to the latest airline updates (Ali Aliev)
|
||||
- various readme updates
|
||||
- more sample usage images
|
||||
- v0.3.3
|
||||
- Load the plugin once only (@blueyed)
|
||||
- Add font installation instructions, fixes #5 (@wikimatze)
|
||||
- added plugin install instructions
|
||||
- slight readme re-ordering
|
||||
- moved contributing section near bottom
|
||||
- added additional screenshots
|
||||
- added more thanks to those whose some more of the glyphs came from
|
||||
- v0.3.2
|
||||
- moved screenshots into the wiki (wiki.vim-webdevicons) to reduce unnecessary project size of cloning repo
|
||||
- v0.3.1
|
||||
- readme updates (with references to new font-patcher repo)
|
||||
- readme updates screenshots reference wiki
|
||||
- v0.3.0
|
||||
- moved font-patcher and patched fonts into a separate repo (nerd-filetype-glyphs-fonts-patcher)
|
||||
- adds twigg file type support for #10 (@wikimatze)
|
||||
- adds cpp file type support
|
||||
- updated utf8 test file with glyphs
|
||||
- readme fixes (@wikimatze, @blueyed)
|
||||
- readme updates
|
||||
- v0.2.1
|
||||
- readme updates
|
||||
- v0.2.0
|
||||
- Script for patching any font: Initial cleaned up work for issue (feature enhancement) for #1
|
||||
- added python font patcher and readme updates
|
||||
- v0.1.4
|
||||
- readme updates
|
||||
- v0.1.3
|
||||
- fixes #3 make matches case insensitive (ignore case)
|
||||
- v0.1.2
|
||||
- fixes lookup for exact file notes (@johngeorgewright)
|
||||
- v0.1.1
|
||||
- updated readme substantially
|
||||
- v0.1.0
|
||||
- release
|
76
nvim/.vim/plugged/vim-devicons/CODE_OF_CONDUCT.md
Normal file
76
nvim/.vim/plugged/vim-devicons/CODE_OF_CONDUCT.md
Normal file
|
@ -0,0 +1,76 @@
|
|||
# Contributor Covenant Code of Conduct
|
||||
|
||||
## Our Pledge
|
||||
|
||||
In the interest of fostering an open and welcoming environment, we as
|
||||
contributors and maintainers pledge to making participation in our project and
|
||||
our community a harassment-free experience for everyone, regardless of age, body
|
||||
size, disability, ethnicity, gender identity and expression, level of experience,
|
||||
nationality, personal appearance, race, religion, or sexual identity and
|
||||
orientation.
|
||||
|
||||
## Our Standards
|
||||
|
||||
Examples of behavior that contributes to creating a positive environment
|
||||
include:
|
||||
|
||||
* Using welcoming and inclusive language
|
||||
* Being respectful of differing viewpoints and experiences
|
||||
* Gracefully accepting constructive criticism
|
||||
* Focusing on what is best for the community
|
||||
* Showing empathy towards other community members
|
||||
|
||||
Examples of unacceptable behavior by participants include:
|
||||
|
||||
* The use of sexualized language or imagery and unwelcome sexual attention or
|
||||
advances
|
||||
* Trolling, insulting/derogatory comments, and personal or political attacks
|
||||
* Public or private harassment
|
||||
* Publishing others' private information, such as a physical or electronic
|
||||
address, without explicit permission
|
||||
* Other conduct which could reasonably be considered inappropriate in a
|
||||
professional setting
|
||||
|
||||
## Our Responsibilities
|
||||
|
||||
Project maintainers are responsible for clarifying the standards of acceptable
|
||||
behavior and are expected to take appropriate and fair corrective action in
|
||||
response to any instances of unacceptable behavior.
|
||||
|
||||
Project maintainers have the right and responsibility to remove, edit, or
|
||||
reject comments, commits, code, wiki edits, issues, and other contributions
|
||||
that are not aligned to this Code of Conduct, or to ban temporarily or
|
||||
permanently any contributor for other behaviors that they deem inappropriate,
|
||||
threatening, offensive, or harmful.
|
||||
|
||||
## Scope
|
||||
|
||||
This Code of Conduct applies both within project spaces and in public spaces
|
||||
when an individual is representing the project or its community. Examples of
|
||||
representing a project or community include using an official project e-mail
|
||||
address, posting via an official social media account, or acting as an appointed
|
||||
representative at an online or offline event. Representation of a project may be
|
||||
further defined and clarified by project maintainers.
|
||||
|
||||
## Enforcement
|
||||
|
||||
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
||||
reported by contacting the project team on
|
||||
[VimDevIcons Gitter Chat](https://gitter.im/ryanoasis/vim-devicons)
|
||||
or contacting [@ryanoasis](https://github.com/ryanoasis). All
|
||||
complaints will be reviewed and investigated and will result in a response that
|
||||
is deemed necessary and appropriate to the circumstances. The project team is
|
||||
obligated to maintain confidentiality with regard to the reporter of an incident.
|
||||
Further details of specific enforcement policies may be posted separately.
|
||||
|
||||
Project maintainers who do not follow or enforce the Code of Conduct in good
|
||||
faith may face temporary or permanent repercussions as determined by other
|
||||
members of the project's leadership.
|
||||
|
||||
## Attribution
|
||||
|
||||
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
|
||||
available at [http://contributor-covenant.org/version/1/4][version]
|
||||
|
||||
[homepage]: http://contributor-covenant.org
|
||||
[version]: http://contributor-covenant.org/version/1/4/
|
18
nvim/.vim/plugged/vim-devicons/CONTRIBUTING.md
Normal file
18
nvim/.vim/plugged/vim-devicons/CONTRIBUTING.md
Normal file
|
@ -0,0 +1,18 @@
|
|||
# Contributing Guide
|
||||
|
||||
## How to contribute
|
||||
|
||||
* Fork the project and submit a Pull Request (PR)
|
||||
* Explain what the PR fixes or improves
|
||||
* Screenshots for bonus points
|
||||
* Use sensible commit messages
|
||||
* If your PR fixes a separate issue number, include it in the commit message
|
||||
|
||||
## Things to keep in mind
|
||||
|
||||
* Smaller PRs are likely to be merged more quickly than bigger changes
|
||||
* If it is a useful PR it **will** get merged in eventually
|
||||
* [E.g. see how many have already been merged vs. still open](https://github.com/ryanoasis/vim-devicons/pulls)
|
||||
* This project _was_ using [Semantic Versioning 2.0.0](http://semver.org/) but we have since mostly abandoned that
|
||||
* Try to add to the unit tests where possible so we can maintain our test coverage
|
||||
* Issues not filled out with the template will be closed straight away and will only be responded to once filled properly
|
68
nvim/.vim/plugged/vim-devicons/DEVELOPER.md
Normal file
68
nvim/.vim/plugged/vim-devicons/DEVELOPER.md
Normal file
|
@ -0,0 +1,68 @@
|
|||
### API
|
||||
|
||||
```vim
|
||||
" returns the font character that represents the icon
|
||||
" parameters: a:1 (filename), a:2 (isDirectory)
|
||||
" both parameters optional
|
||||
" by default without parameters uses buffer name
|
||||
WebDevIconsGetFileTypeSymbol(...)
|
||||
|
||||
" returns the font character that represents
|
||||
" the file format as an icon (windows, linux, mac)
|
||||
WebDevIconsGetFileFormatSymbol()
|
||||
```
|
||||
|
||||
#### Public Methods
|
||||
|
||||
```vim
|
||||
" Returns the current version of the plugin
|
||||
webdevicons#version()
|
||||
```
|
||||
|
||||
```vim
|
||||
" Calls webdevicons#softRefresh()
|
||||
" basically a backwards compatibility convenience
|
||||
webdevicons#refresh()
|
||||
```
|
||||
|
||||
```vim
|
||||
" Does a 'hard' refresh of NERDTree
|
||||
" resets vim-devicons syntax and closes and reopens NERDTree
|
||||
webdevicons#hardRefresh()
|
||||
```
|
||||
|
||||
```vim
|
||||
" Does a 'soft' refresh of NERDTree
|
||||
" resets vim-devicons syntax and toggles NERDTree to the same state
|
||||
webdevicons#softRefresh()
|
||||
```
|
||||
|
||||
#### API Examples
|
||||
|
||||
##### Status line
|
||||
|
||||
> Custom vim status line (not relying on vim-airline or lightline):
|
||||
|
||||
```vim
|
||||
set statusline=%f\ %{WebDevIconsGetFileTypeSymbol()}\ %h%w%m%r\ %=%(%l,%c%V\ %Y\ %=\ %P%)
|
||||
```
|
||||
|
||||
##### Simple function call
|
||||
|
||||
```vim
|
||||
echo WebDevIconsGetFileFormatSymbol()
|
||||
```
|
||||
|
||||
#### Integration with other plugins
|
||||
|
||||
##### vim-startify
|
||||
|
||||
```vim
|
||||
let entry_format = "' ['. index .']'. repeat(' ', (3 - strlen(index)))"
|
||||
|
||||
if exists('*WebDevIconsGetFileTypeSymbol') " support for vim-devicons
|
||||
let entry_format .= ". WebDevIconsGetFileTypeSymbol(entry_path) .' '. entry_path"
|
||||
else
|
||||
let entry_format .= '. entry_path'
|
||||
endif
|
||||
```
|
22
nvim/.vim/plugged/vim-devicons/LICENSE
Normal file
22
nvim/.vim/plugged/vim-devicons/LICENSE
Normal file
|
@ -0,0 +1,22 @@
|
|||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2014 Ryan L McIntyre
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
|
107
nvim/.vim/plugged/vim-devicons/README.md
Normal file
107
nvim/.vim/plugged/vim-devicons/README.md
Normal file
|
@ -0,0 +1,107 @@
|
|||
<h1 align="center">
|
||||
<img src="https://raw.githubusercontent.com/wiki/ryanoasis/vim-devicons/screenshots/v0.10.x/branding-logo-3.svg?sanitize=true" alt="VimDevIcons - Add Icons to Your Plugins">
|
||||
</h1>
|
||||
|
||||
<div align="center">
|
||||
|
||||

|
||||

|
||||

|
||||

|
||||

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