feat(icons): provide language specific icons in extras (#3931)

## What is this PR for?

<!-- Describe the big picture of your changes to communicate to the
maintainers
  why we should accept this pull request. -->

Provide language specific file icons. The intent is to lay the
foundation of this type of extension / configuration. I've added icons
for file types that I interact with but this is definitely not holistic.
I also went back and forth on whether the configuration should be within
the core UI config or in the extras (I landed on the later). Definitely
open to feedback on these changes.

## Does this PR fix an existing issue?

<!--
  If this PR fixes any issues, please link to the issue here.
  - Fixes #<issue_number>
-->

Nope.

## Checklist

- [x] I've read the
[CONTRIBUTING](https://github.com/LazyVim/LazyVim/blob/main/CONTRIBUTING.md)
guidelines.

---------

Co-authored-by: Folke Lemaitre <folke.lemaitre@gmail.com>
This commit is contained in:
Michael Olson
2024-07-07 13:28:51 -04:00
committed by GitHub
parent 09831414cf
commit aa418a2147
4 changed files with 61 additions and 1 deletions

View File

@ -137,4 +137,17 @@ return {
},
},
},
-- Filetype icons
{
"echasnovski/mini.icons",
opts = {
file = {
[".go-version"] = { glyph = "", hl = "MiniIconsBlue" },
},
filetype = {
gotmpl = { glyph = "󰟓", hl = "MiniIconsGrey" },
},
},
},
}

View File

@ -248,4 +248,22 @@ return {
end
end,
},
-- Filetype icons
{
"echasnovski/mini.icons",
opts = {
file = {
[".eslintrc.js"] = { glyph = "󰱺", hl = "MiniIconsYellow" },
[".node-version"] = { glyph = "", hl = "MiniIconsGreen" },
[".prettierrc"] = { glyph = "", hl = "MiniIconsPurple" },
[".yarnrc.yml"] = { glyph = "", hl = "MiniIconsBlue" },
["eslint.config.js"] = { glyph = "󰱺", hl = "MiniIconsYellow" },
["package.json"] = { glyph = "", hl = "MiniIconsGreen" },
["tsconfig.json"] = { glyph = "", hl = "MiniIconsAzure" },
["tsconfig.build.json"] = { glyph = "", hl = "MiniIconsAzure" },
["yarn.lock"] = { glyph = "", hl = "MiniIconsBlue" },
},
},
},
}

View File

@ -88,4 +88,24 @@ return {
table.insert(opts.config.center, 5, projects)
end,
},
-- Filetype icons
{
"echasnovski/mini.icons",
opts = {
file = {
[".chezmoiignore"] = { glyph = "", hl = "MiniIconsGrey" },
[".chezmoiremove"] = { glyph = "", hl = "MiniIconsGrey" },
[".chezmoiroot"] = { glyph = "", hl = "MiniIconsGrey" },
[".chezmoiversion"] = { glyph = "", hl = "MiniIconsGrey" },
["bash.tmpl"] = { glyph = "", hl = "MiniIconsGrey" },
["json.tmpl"] = { glyph = "", hl = "MiniIconsGrey" },
["ps1.tmpl"] = { glyph = "󰨊", hl = "MiniIconsGrey" },
["sh.tmpl"] = { glyph = "", hl = "MiniIconsGrey" },
["toml.tmpl"] = { glyph = "", hl = "MiniIconsGrey" },
["yaml.tmpl"] = { glyph = "", hl = "MiniIconsGrey" },
["zsh.tmpl"] = { glyph = "", hl = "MiniIconsGrey" },
},
},
},
}

View File

@ -306,7 +306,16 @@ return {
{
"echasnovski/mini.icons",
lazy = true,
opts = {},
opts = {
file = {
[".keep"] = { glyph = "󰊢", hl = "MiniIconsGrey" },
["CODEOWNERS"] = { glyph = "", hl = "MiniIconsGreen" },
["devcontainer.json"] = { glyph = "", hl = "MiniIconsAzure" },
},
filetype = {
dotenv = { glyph = "", hl = "MiniIconsYellow" },
},
},
init = function()
package.preload["nvim-web-devicons"] = function()
require("mini.icons").mock_nvim_web_devicons()