From 5e1216867b805467f536c9cfec4f9d4c9c0cbae4 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Sat, 6 Jul 2024 23:18:20 +0200 Subject: [PATCH 1/9] ci: update --- .github/workflows/ci.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 51939e69..96993304 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -12,4 +12,3 @@ jobs: with: plugin: LazyVim repo: LazyVim/LazyVim - tests: true From 21470b49d9f75b09dd762f6f474ba64014338eb2 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Sat, 6 Jul 2024 23:19:41 +0200 Subject: [PATCH 2/9] ci: update --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 2b0bb7a8..61ab8286 100644 --- a/.gitignore +++ b/.gitignore @@ -5,4 +5,5 @@ build debug doc/tags foo.* +node_modules tt.* From 40357681959d53f6fbc7b520ecd43f113d51ae09 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Sat, 6 Jul 2024 23:45:22 +0200 Subject: [PATCH 3/9] ci: update --- .gitignore | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.gitignore b/.gitignore index 61ab8286..771c8351 100644 --- a/.gitignore +++ b/.gitignore @@ -1,9 +1,9 @@ *.log -.repro -.tests -build -debug -doc/tags +/.repro +/.tests +/build +/debug +/doc/tags foo.* node_modules tt.* From d108169e951fff8c65ed8dea89b058717cc48da5 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Sun, 7 Jul 2024 08:47:57 +0200 Subject: [PATCH 4/9] fix(lualine): check that trouble is installed --- lua/lazyvim/plugins/ui.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/lazyvim/plugins/ui.lua b/lua/lazyvim/plugins/ui.lua index f81296ea..5fde7ebd 100644 --- a/lua/lazyvim/plugins/ui.lua +++ b/lua/lazyvim/plugins/ui.lua @@ -198,7 +198,7 @@ return { } -- do not add trouble symbols if aerial is enabled - if vim.g.trouble_lualine then + if vim.g.trouble_lualine and LazyVim.has("trouble.nvim") then local trouble = require("trouble") local symbols = trouble.statusline and trouble.statusline({ From 304729b23acebf0c0d00845a4c9fca662e0214d0 Mon Sep 17 00:00:00 2001 From: folke Date: Sun, 7 Jul 2024 06:48:54 +0000 Subject: [PATCH 5/9] chore(build): auto-generate docs --- doc/LazyVim.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/LazyVim.txt b/doc/LazyVim.txt index 239a5792..2b97a37a 100644 --- a/doc/LazyVim.txt +++ b/doc/LazyVim.txt @@ -1,4 +1,4 @@ -*LazyVim.txt* For Neovim Last change: 2024 July 06 +*LazyVim.txt* For Neovim Last change: 2024 July 07 ============================================================================== Table of Contents *LazyVim-table-of-contents* From 6202dd164466250b5c188918b34b3e8a3fec2604 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Sun, 7 Jul 2024 09:24:59 +0200 Subject: [PATCH 6/9] chore(main): release 12.26.2 (#3946) :robot: I have created a release *beep* *boop* --- ## [12.26.2](https://github.com/LazyVim/LazyVim/compare/v12.26.1...v12.26.2) (2024-07-07) ### Bug Fixes * **lualine:** check that trouble is installed ([d108169](https://github.com/LazyVim/LazyVim/commit/d108169e951fff8c65ed8dea89b058717cc48da5)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- .github/.release-please-manifest.json | 2 +- CHANGELOG.md | 7 +++++++ lua/lazyvim/config/init.lua | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/.github/.release-please-manifest.json b/.github/.release-please-manifest.json index d571892c..ed72d8b7 100644 --- a/.github/.release-please-manifest.json +++ b/.github/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "12.26.1" + ".": "12.26.2" } diff --git a/CHANGELOG.md b/CHANGELOG.md index 27ab1b71..5e1d7f4d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [12.26.2](https://github.com/LazyVim/LazyVim/compare/v12.26.1...v12.26.2) (2024-07-07) + + +### Bug Fixes + +* **lualine:** check that trouble is installed ([d108169](https://github.com/LazyVim/LazyVim/commit/d108169e951fff8c65ed8dea89b058717cc48da5)) + ## [12.26.1](https://github.com/LazyVim/LazyVim/compare/v12.26.0...v12.26.1) (2024-07-06) diff --git a/lua/lazyvim/config/init.lua b/lua/lazyvim/config/init.lua index 7be8f511..16ae2fb3 100644 --- a/lua/lazyvim/config/init.lua +++ b/lua/lazyvim/config/init.lua @@ -3,7 +3,7 @@ _G.LazyVim = require("lazyvim.util") ---@class LazyVimConfig: LazyVimOptions local M = {} -M.version = "12.26.1" -- x-release-please-version +M.version = "12.26.2" -- x-release-please-version LazyVim.config = M ---@class LazyVimOptions From 33e1da585d8709bcf6c076e80a73b55ef70a9443 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Sun, 7 Jul 2024 17:23:53 +0200 Subject: [PATCH 7/9] fix(fzf-lua): move register_select to lazy init --- lua/lazyvim/plugins/extras/editor/fzf.lua | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lua/lazyvim/plugins/extras/editor/fzf.lua b/lua/lazyvim/plugins/extras/editor/fzf.lua index 67acc830..cb2ab95d 100644 --- a/lua/lazyvim/plugins/extras/editor/fzf.lua +++ b/lua/lazyvim/plugins/extras/editor/fzf.lua @@ -190,12 +190,13 @@ return { end, config = function(_, opts) require("fzf-lua").setup(opts) - require("fzf-lua").register_ui_select(opts.ui_select or nil) end, init = function() LazyVim.on_very_lazy(function() vim.ui.select = function(...) - require("fzf-lua") + require("lazy").load({ plugins = { "fzf-lua" } }) + local opts = LazyVim.opts("fzf-lua") or {} + require("fzf-lua").register_ui_select(opts.ui_select or nil) return vim.ui.select(...) end end) From 09831414cfe7009f084536d8c6c74156010302ff Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Sun, 7 Jul 2024 17:46:29 +0200 Subject: [PATCH 8/9] test: added tests for mini.icons --- .../extras/{lang_spec.lua => extra_spec.lua} | 24 +++++++++++++++++++ tests/minit.lua | 1 + 2 files changed, 25 insertions(+) rename tests/extras/{lang_spec.lua => extra_spec.lua} (80%) diff --git a/tests/extras/lang_spec.lua b/tests/extras/extra_spec.lua similarity index 80% rename from tests/extras/lang_spec.lua rename to tests/extras/extra_spec.lua index 19eb337d..fa2fc9de 100644 --- a/tests/extras/lang_spec.lua +++ b/tests/extras/extra_spec.lua @@ -1,5 +1,7 @@ ---@module 'luassert' +local Icons = require("mini.icons") + local Plugin = require("lazy.core.plugin") _G.LazyVim = require("lazyvim.util") @@ -98,6 +100,28 @@ describe("Extra", function() ) end) end + + -- Icons + local icons = spec.plugins["mini.icons"] + if icons then + local icon_opts = Plugin.values(icons, "opts", false) or {} + local cats = { "directory", "file", "extension", "filetype", "lsp", "os" } + for _, cat in ipairs(cats) do + local cat_names = Icons.list(cat) + if icon_opts[cat] then + describe("does not set existing icons for " .. cat, function() + for icon_name in pairs(icon_opts[cat]) do + it(icon_name, function() + assert.is_false( + vim.tbl_contains(cat_names, icon_name), + "Icon " .. icon_name .. " already exists:\n" .. vim.inspect({ Icons.get(cat, icon_name) }) + ) + end) + end + end) + end + end + end end) end end) diff --git a/tests/minit.lua b/tests/minit.lua index 6ae23266..88cb4185 100644 --- a/tests/minit.lua +++ b/tests/minit.lua @@ -11,5 +11,6 @@ require("lazy.minit").setup({ "williamboman/mason-lspconfig.nvim", "williamboman/mason.nvim", "nvim-treesitter/nvim-treesitter", + { "echasnovski/mini.icons", opts = {} }, }, }) From aa418a2147f52fbe3225aced3a0e7638cf15ea78 Mon Sep 17 00:00:00 2001 From: Michael Olson <48652773+m0lson84@users.noreply.github.com> Date: Sun, 7 Jul 2024 13:28:51 -0400 Subject: [PATCH 9/9] feat(icons): provide language specific icons in extras (#3931) ## What is this PR for? 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? Nope. ## Checklist - [x] I've read the [CONTRIBUTING](https://github.com/LazyVim/LazyVim/blob/main/CONTRIBUTING.md) guidelines. --------- Co-authored-by: Folke Lemaitre --- lua/lazyvim/plugins/extras/lang/go.lua | 13 ++++++++++++ .../plugins/extras/lang/typescript.lua | 18 +++++++++++++++++ lua/lazyvim/plugins/extras/util/chezmoi.lua | 20 +++++++++++++++++++ lua/lazyvim/plugins/ui.lua | 11 +++++++++- 4 files changed, 61 insertions(+), 1 deletion(-) diff --git a/lua/lazyvim/plugins/extras/lang/go.lua b/lua/lazyvim/plugins/extras/lang/go.lua index 931f8df4..b9544cfd 100644 --- a/lua/lazyvim/plugins/extras/lang/go.lua +++ b/lua/lazyvim/plugins/extras/lang/go.lua @@ -137,4 +137,17 @@ return { }, }, }, + + -- Filetype icons + { + "echasnovski/mini.icons", + opts = { + file = { + [".go-version"] = { glyph = "", hl = "MiniIconsBlue" }, + }, + filetype = { + gotmpl = { glyph = "󰟓", hl = "MiniIconsGrey" }, + }, + }, + }, } diff --git a/lua/lazyvim/plugins/extras/lang/typescript.lua b/lua/lazyvim/plugins/extras/lang/typescript.lua index 139c3086..71ec4604 100644 --- a/lua/lazyvim/plugins/extras/lang/typescript.lua +++ b/lua/lazyvim/plugins/extras/lang/typescript.lua @@ -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" }, + }, + }, + }, } diff --git a/lua/lazyvim/plugins/extras/util/chezmoi.lua b/lua/lazyvim/plugins/extras/util/chezmoi.lua index 56518dfd..633f3008 100644 --- a/lua/lazyvim/plugins/extras/util/chezmoi.lua +++ b/lua/lazyvim/plugins/extras/util/chezmoi.lua @@ -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" }, + }, + }, + }, } diff --git a/lua/lazyvim/plugins/ui.lua b/lua/lazyvim/plugins/ui.lua index 5fde7ebd..97c35ae9 100644 --- a/lua/lazyvim/plugins/ui.lua +++ b/lua/lazyvim/plugins/ui.lua @@ -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()