From 5e7f438410e982cbf9c0a850f432f86585230d6d Mon Sep 17 00:00:00 2001 From: punkfairie Date: Fri, 29 Nov 2024 18:07:52 -0800 Subject: [PATCH] feat: mini.icons --- nix/neovim-overlay.nix | 3 +++ nvim/init.lua | 2 +- nvim/lua/plugins/ui/init.lua | 5 +++++ nvim/lua/plugins/ui/mini-icons.lua | 20 ++++++++++++++++++++ 4 files changed, 29 insertions(+), 1 deletion(-) create mode 100644 nvim/lua/plugins/ui/init.lua create mode 100644 nvim/lua/plugins/ui/mini-icons.lua diff --git a/nix/neovim-overlay.nix b/nix/neovim-overlay.nix index 1da5a54..c73cb35 100644 --- a/nix/neovim-overlay.nix +++ b/nix/neovim-overlay.nix @@ -32,6 +32,9 @@ with final.pkgs.lib; let # Base lz-n snacks-nvim + + # UI + mini-icons ]; extraPackages = with pkgs; [ diff --git a/nvim/init.lua b/nvim/init.lua index 5128603..7b4abab 100644 --- a/nvim/init.lua +++ b/nvim/init.lua @@ -11,4 +11,4 @@ require('autocmds') require('snacks-nvim') --- require('lz.n').load('plugins') +require('lz.n').load('plugins') diff --git a/nvim/lua/plugins/ui/init.lua b/nvim/lua/plugins/ui/init.lua new file mode 100644 index 0000000..062e643 --- /dev/null +++ b/nvim/lua/plugins/ui/init.lua @@ -0,0 +1,5 @@ +local req = require('lib.marleyvim').localRequire('plugins.ui') + +return { + req('mini-icons'), +} diff --git a/nvim/lua/plugins/ui/mini-icons.lua b/nvim/lua/plugins/ui/mini-icons.lua new file mode 100644 index 0000000..abe2b52 --- /dev/null +++ b/nvim/lua/plugins/ui/mini-icons.lua @@ -0,0 +1,20 @@ +return { + 'mini.icons', + after = function() + require('mini.icons').setup({ + file = { + ['.keep'] = { glyph = '󰊢', hl = 'MiniIconsGrey' }, + ['devcontainer.json'] = { glyph = '', hl = 'MiniIconsAzure' }, + }, + filetype = { + dotenv = { glyph = '󰌋', hl = 'MiniIconsYellow' }, + }, + }) + + package.preload['nvim-web-devicons'] = function() + require('mini.icons').mock_nvim_web_devicons() + + return package.loaded['nvim-web-devicons'] + end + end, +}