From fb5f12f4e8929835877c87c0c3ed99875f6d8d3e Mon Sep 17 00:00:00 2001 From: Micah Halter Date: Mon, 9 Dec 2024 21:54:31 -0500 Subject: [PATCH] feat(plugins): add `mini.diff` support --- README.md | 1 + lua/astrotheme/groups/plugins/init.lua | 1 + lua/astrotheme/groups/plugins/mini.lua | 5 +++-- lua/astrotheme/groups/plugins/minidiff.lua | 10 ++++++++++ 4 files changed, 15 insertions(+), 2 deletions(-) create mode 100644 lua/astrotheme/groups/plugins/minidiff.lua diff --git a/README.md b/README.md index a6fc079..fb4fb7b 100644 --- a/README.md +++ b/README.md @@ -249,6 +249,7 @@ term.foreground | [lualine.nvim](https://github.com/nvim-lualine/lualine.nvim) | `lualine` | | [mason.nvim](https://github.com/williamboman/mason.nvim) | `mason` | | [mini.nvim](https://github.com/echasnovski/mini.nvim) | `mini` | +| [mini.diff](https://github.com/echasnovski/mini.diff) | `minidiff` | | [mini.icons](https://github.com/echasnovski/mini.icons) | `miniicons` | | [mini.starter](https://github.com/echasnovski/mini.starter) | `ministarter` | | [neo-tree.nvim](https://github.com/nvim-neo-tree/neo-tree.nvim) | `neo-tree` | diff --git a/lua/astrotheme/groups/plugins/init.lua b/lua/astrotheme/groups/plugins/init.lua index a2b5f80..0c04af9 100644 --- a/lua/astrotheme/groups/plugins/init.lua +++ b/lua/astrotheme/groups/plugins/init.lua @@ -14,6 +14,7 @@ return { ["lightspeed.nvim"] = "lightspeed", ["mason.nvim"] = "mason", ["mini.nvim"] = "mini", + ["mini.diff"] = "minidiff", ["mini.starter"] = "ministarter", ["mini.icons"] = "miniicons", ["neo-tree.nvim"] = "neo-tree", diff --git a/lua/astrotheme/groups/plugins/mini.lua b/lua/astrotheme/groups/plugins/mini.lua index 3132b4f..7239ce5 100644 --- a/lua/astrotheme/groups/plugins/mini.lua +++ b/lua/astrotheme/groups/plugins/mini.lua @@ -2,8 +2,9 @@ local function callback(...) return vim.tbl_deep_extend( "force", - require "astrotheme.groups.plugins.ministarter"(...), - require "astrotheme.groups.plugins.miniicons"(...) + require "astrotheme.groups.plugins.minidiff"(...), + require "astrotheme.groups.plugins.miniicons"(...), + require "astrotheme.groups.plugins.ministarter"(...) ) end diff --git a/lua/astrotheme/groups/plugins/minidiff.lua b/lua/astrotheme/groups/plugins/minidiff.lua new file mode 100644 index 0000000..de9e065 --- /dev/null +++ b/lua/astrotheme/groups/plugins/minidiff.lua @@ -0,0 +1,10 @@ +---@type AstroThemeCallback +local function callback(c) + return { + MiniDiffSignAdd = { fg = c.ui.green, bg = c.none }, + MiniDiffSignChange = { fg = c.ui.orange, bg = c.none }, + MiniDiffSignDelete = { fg = c.ui.red, bg = c.none }, + } +end + +return callback