git subrepo clone (merge) https://github.com/ryanoasis/vim-devicons.git ./dotfiles/.vim/plugged/vim-devicons

subrepo:
  subdir:   "dotfiles/.vim/plugged/vim-devicons"
  merged:   "71f239af2"
upstream:
  origin:   "https://github.com/ryanoasis/vim-devicons.git"
  branch:   "master"
  commit:   "71f239af2"
git-subrepo:
  version:  "0.4.3"
  origin:   "???"
  commit:   "???"
This commit is contained in:
Git E2E Dev Test Username 2022-10-18 10:37:31 -04:00
parent fe1ac6d7e9
commit e30fca43b3
31 changed files with 3516 additions and 0 deletions

View 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

View 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)

View 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

View 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')

View file

@ -0,0 +1,5 @@
doc/tags
__pycache__/
.DS_Store
.netrwhist
*.swp

View file

@ -0,0 +1,12 @@
; DO NOT EDIT (unless you know what you are doing)
;
; This subdirectory is a git "subrepo", and this file is maintained by the
; git-subrepo command. See https://github.com/git-commands/git-subrepo#readme
;
[subrepo]
remote = https://github.com/ryanoasis/vim-devicons.git
branch = master
commit = 71f239af28b7214eebb60d4ea5bd040291fb7e33
parent = fe1ac6d7e91d0055b82a6b20906b18e922b322a4
method = merge
cmdver = 0.4.3

View 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

View 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/

View 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

View 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
```

View 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.

View 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">
![version](https://img.shields.io/github/release/ryanoasis/vim-devicons.svg?style=for-the-badge)
![chat on gitter](https://img.shields.io/gitter/room/nwjs/nw.js.svg?style=for-the-badge)
![code of conduct](https://img.shields.io/badge/code%20of-conduct-ff69b4.svg?style=for-the-badge)
![prs welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=for-the-badge&logo=data%3Aimage%2Fpng%3Bbase64%2CiVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAMAAABEpIrGAAACWFBMVEXXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWko2FeWCAAAAAXRSTlMAQObYZgAAAAFiS0dEAIgFHUgAAAAJcEhZcwAAI28AACNvATX8B%2FsAAAAHdElNRQfhBQMBMCLAfV85AAAAi0lEQVQ4y2NgIBYszkPmJc5ORZE9DgEJqNxmmPS%2B43AA4h5B5TIwbD5%2BHFnoKCoXYSBMBIW7CF0eAxChoPM4ARXHB4GCZEIKKA8H%2FCoWE1LAwIBfBVp6wQA1DPhVzMJMcyggCVuqxGI%2FLhWY6Z6QPKoK7HmHkDwDwxYC8gwMdSDprXiz6PHjpQxUBgCLDfI7GXNh5gAAAABJRU5ErkJggg%3D%3D)
![CI](https://img.shields.io/github/workflow/status/ryanoasis/vim-devicons/CI?label=CI&style=for-the-badge)
</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)

View file

@ -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:

View file

@ -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:

View file

@ -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:

View file

@ -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:

View file

@ -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:

View file

@ -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:

View file

@ -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:

View file

@ -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

File diff suppressed because it is too large Load diff

View 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:

View 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:

View file

@ -0,0 +1,2 @@
import pkg_resources
pkg_resources.declare_namespace(__name__)

View file

@ -0,0 +1,2 @@
import pkg_resources
pkg_resources.declare_namespace(__name__)

View file

@ -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'],
}]

View file

@ -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']

View file

@ -0,0 +1 @@
filetype plugin on

View 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

View 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

View 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