-
Notifications
You must be signed in to change notification settings - Fork 205
fix: add missing filetypes #531
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
17cae23
chore: add script to Makefile to check for missing filetypes
hasecilu 7fc55b7
fix: add missing filetypes
hasecilu ec5fa0f
fix: move avif extension to proper table
hasecilu c5e49f5
docs: improve instructions and apply style
hasecilu c2ee219
fixup! chore: add script to Makefile to check for missing filetypes
hasecilu 8d15d97
fixup! chore: add script to Makefile to check for missing filetypes
hasecilu a414049
ci: add check for missing filetypes
hasecilu a0f5e76
fixup! ci: add check for missing filetypes
hasecilu 85a17d8
fixup! chore: add script to Makefile to check for missing filetypes
hasecilu 9b4ee5c
Merge branch 'master' into fix/filetypes
alex-courtis File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,22 +4,24 @@ Thank you for your contribution! | |
|
||
## Order | ||
|
||
Please ensure `icons_by_filename`, `icons_by_file_extension` and `filetypes` are ordered alphabetically, to prevent merge conflicts. | ||
Please ensure `icons_by_filename`, `icons_by_file_extension`, `icons_by_operating_system`, `icons_by_desktop_environment`, | ||
`icons_by_window_manager` and `filetypes` are ordered alphabetically, to prevent merge conflicts. | ||
|
||
## Prerequisites | ||
|
||
Code is formatted using stylua and linted using luacheck. | ||
Code is formatted using *stylua* and linted using *luacheck*. | ||
|
||
You can install these with: | ||
|
||
```sh | ||
cargo install stylua | ||
luarocks install luacheck | ||
``` | ||
|
||
or via your OS package manager e.g. Arch linux: | ||
or via your OS package manager e.g. *Arch Linux*: | ||
|
||
```sh | ||
pacman -S stylua | ||
pacman -S luacheck | ||
pacman -S stylua luacheck | ||
``` | ||
|
||
## Building | ||
|
@@ -31,13 +33,16 @@ make | |
``` | ||
|
||
This will: | ||
|
||
1. `git clone --depth 1 https://github.com/lifepillar/vim-colortemplate.git vim-colortemplate` if necessary | ||
1. Generate cterm colors | ||
2. Generate light color variants | ||
3. Check style | ||
4. Lint | ||
2. Generate cterm colors | ||
3. Generate light color variants | ||
4. Check style | ||
5. Lint | ||
6. Find missing filetypes | ||
|
||
You can automatically fix any style issues via: | ||
|
||
```sh | ||
make style-fix | ||
``` | ||
|
@@ -46,15 +51,20 @@ make style-fix | |
|
||
Add or update icons in `lua/nvim-web-devicons/icons-default.lua` | ||
|
||
There are two tables where icons can be added: | ||
1. icons_by_filename | ||
2. icons_by_file_extension | ||
There are five tables where icons can be added: | ||
|
||
1. `icons_by_filename` | ||
2. `icons_by_file_extension` | ||
3. `icons_by_operating_system` | ||
4. `icons_by_desktop_environment` | ||
5. `icons_by_window_manager` | ||
|
||
Add the icon to table **1.** if the icon is for a file that is always named that way, for example `.gitconfig`. | ||
Add the icon to table **2.** if the icon is for all files with an extension, for example `vim`. | ||
Add the icon to table **3.**, **4.**, **5.** if the icon is from an OS, DE or WM. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thank you! |
||
|
||
Add the icon in table 1. if the icon is for a file that is always named that | ||
way, for example `.gitconfig`. Add to table 2. if the icon is for all files | ||
with an extension. | ||
Each icon must have the following structure (this is an example): | ||
|
||
Each icon must have the following (this is an example): | ||
```lua | ||
[".gitconfig"] = { | ||
icon = "", | ||
|
@@ -63,15 +73,16 @@ Each icon must have the following (this is an example): | |
name = "GitConfig", | ||
}, | ||
``` | ||
___Key/value pairs must appear in the same exact order!___ | ||
|
||
***Key/value pairs must appear in the same exact order!*** | ||
|
||
- `color` must contain a color in the html notation | ||
- `cterm_color` must be below `color`, and it must contain a number (any number) | ||
- the correct value for `cterm_color` will be generated by the script | ||
- `name` must only contain alphanumeric characters (don't use `/`, `-`, `_`) | ||
|
||
Ensure your current working directory is the repo root. | ||
Run `make`. This will: | ||
Ensure your current working directory is the repo root. Run `make`. This will: | ||
|
||
- Update `cterm_color` based on `color` | ||
- Generate `lua/nvim-web-devicons/icons-light.lua` | ||
|
||
|
@@ -81,44 +92,47 @@ Please commit both `lua/nvim-web-devicons/icons-default.lua` and `lua/nvim-web-d | |
|
||
Run `:NvimWebDeviconsHiTest` to view the icons and their highlighting. | ||
|
||
Start neovim with `TERM=xterm-256color nvim ...` to test cterm. | ||
Start *Neovim* with `TERM=xterm-256color nvim ...` to test cterm. | ||
|
||
Check with `&background` `dark` and `light` | ||
|
||
## Documentation | ||
|
||
When modifying or adding API, please update [Usage](README.md#Usage) | ||
|
||
# Pull Request | ||
## Pull Request | ||
|
||
Please reference any issues in the description e.g. "resolves #1234", which will be closed upon merge. | ||
|
||
Please check "allow edits by maintainers" to allow nvim-web-devicons maintainers to make small changes such as documentation tweaks. | ||
Please check "allow edits by maintainers" to allow *nvim-web-devicons* maintainers to make small changes | ||
such as documentation tweaks. | ||
|
||
## Subject | ||
|
||
The merge commit message will be the subject of the PR. | ||
|
||
A [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0) subject will be validated by the Semantic Pull Request Subject CI job. Reference the issue to be used in the release notes e.g. | ||
A [Conventional Commits] subject will be validated by the Semantic Pull Request Subject CI job. | ||
Reference the issue to be used in the release notes e.g. | ||
|
||
``` | ||
```txt | ||
feat: add gradle icons | ||
fix: update rust icon | ||
feat(#192): :NvimWebDeviconsHiTest | ||
``` | ||
|
||
Available types: | ||
* feat: A new feature | ||
* fix: A bug fix | ||
* docs: Documentation only changes | ||
* style: Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc) | ||
* refactor: A code change that neither fixes a bug nor adds a feature | ||
* perf: A code change that improves performance | ||
* test: Adding missing tests or correcting existing tests | ||
* build: Changes that affect the build system or external dependencies (example scopes: gulp, broccoli, npm) | ||
* ci: Changes to our CI configuration files and scripts (example scopes: Travis, Circle, BrowserStack, SauceLabs) | ||
* chore: Other changes that don't modify src or test files | ||
* revert: Reverts a previous commit | ||
|
||
- feat: A new feature | ||
- fix: A bug fix | ||
- docs: Documentation only changes | ||
- style: Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc) | ||
- refactor: A code change that neither fixes a bug nor adds a feature | ||
- perf: A code change that improves performance | ||
- test: Adding missing tests or correcting existing tests | ||
- build: Changes that affect the build system or external dependencies (example scopes: gulp, broccoli, npm) | ||
- ci: Changes to our CI configuration files and scripts (example scopes: Travis, Circle, BrowserStack, SauceLabs) | ||
- chore: Other changes that don't modify src or test files | ||
- revert: Reverts a previous commit | ||
|
||
If in doubt, look at previous commits. | ||
|
||
|
@@ -130,7 +144,9 @@ It is useful to see the actual glyphs in the pull request. That can be done by s | |
|
||
Using firefox: | ||
|
||
* Settings -> General | ||
* Fonts -> Advanced | ||
* Change Monospace to "Hack Nerd Font Mono" or similar | ||
* Uncheck "Allow pages to choose their own fonts, instead of your selections above" | ||
- Settings -> General | ||
- Fonts -> Advanced | ||
- Change Monospace to "Hack Nerd Font Mono" or similar | ||
- Uncheck "Allow pages to choose their own fonts, instead of your selections above" | ||
|
||
[Conventional Commits]: <https://www.conventionalcommits.org/en/v1.0.0> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Line breaks at 120 char but could be 100 or 80 on
.md
files.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm easy either way, although links often end up >80