From 583361616403e05f499fdc19e105047f99f06289 Mon Sep 17 00:00:00 2001 From: Qian Xu Date: Mon, 9 Dec 2024 21:32:31 +0800 Subject: [PATCH] feat: add mini.diff and mini.icons plugins support (#265) --- README.md | 4 ++++ lua/onedarkpro/config.lua | 2 ++ lua/onedarkpro/highlights/plugins/mini_diff.lua | 15 +++++++++++++++ .../highlights/plugins/mini_icons.lua | 17 +++++++++++++++++ 4 files changed, 38 insertions(+) create mode 100644 lua/onedarkpro/highlights/plugins/mini_diff.lua create mode 100644 lua/onedarkpro/highlights/plugins/mini_icons.lua diff --git a/README.md b/README.md index 8329b00..28dbf9a 100644 --- a/README.md +++ b/README.md @@ -152,6 +152,8 @@ require("onedarkpro").setup({ lsp_saga = true, lsp_semantic_tokens = true, marks = true, + mini_diff = true, + mini_icons = true, mini_indentscope = true, neotest = true, neo_tree = true, @@ -727,6 +729,8 @@ The theme supports the following plugins: - LSP Semantic tokens (`lsp_semantic_tokens`) - [marks.nvim](https://github.com/chentau/marks.nvim) (`marks`) - [mason.nvim](https://github.com/williamboman/mason.nvim) (`mason`) +- [mini.diff](https://github.com/echasnovski/mini.diff)(`mini_diff`) +- [mini.icons](https://github.com/echasnovski/mini.icons)('mini_icons') - [mini.indentscope](https://github.com/echasnovski/mini.indentscope) (`mini_indentscope`) - [Neotest](https://github.com/nvim-neotest/neotest) (`neotest`) - [neo-tree](https://github.com/nvim-neo-tree/neo-tree.nvim) (`neo_tree`) diff --git a/lua/onedarkpro/config.lua b/lua/onedarkpro/config.lua index e78d920..e5a1a8e 100644 --- a/lua/onedarkpro/config.lua +++ b/lua/onedarkpro/config.lua @@ -67,6 +67,8 @@ local defaults = { lsp_semantic_tokens = true, marks = true, mason = true, + mini_diff = true, + mini_icons = true, mini_indentscope = true, neotest = true, neo_tree = true, diff --git a/lua/onedarkpro/highlights/plugins/mini_diff.lua b/lua/onedarkpro/highlights/plugins/mini_diff.lua new file mode 100644 index 0000000..a4d3a37 --- /dev/null +++ b/lua/onedarkpro/highlights/plugins/mini_diff.lua @@ -0,0 +1,15 @@ +local M = {} + +function M.groups(theme) + return { + MiniDiffOverAdd = { link = "DiffAdd" }, + MiniDiffOverChange = { link = "DiffChange" }, + MiniDiffOverContext = { link = "DiffText" }, + MiniDiffOverDelete = { link = "DiffDelete" }, + MiniDiffSignAdd = { fg = theme.generated.git_add }, + MiniDiffSignChange = { fg = theme.generated.git_change }, + MiniDiffSignDelete = { fg = theme.generated.git_delete }, + } +end + +return M diff --git a/lua/onedarkpro/highlights/plugins/mini_icons.lua b/lua/onedarkpro/highlights/plugins/mini_icons.lua new file mode 100644 index 0000000..aea3fc1 --- /dev/null +++ b/lua/onedarkpro/highlights/plugins/mini_icons.lua @@ -0,0 +1,17 @@ +local M = {} + +function M.groups(theme) + return { + MiniIconsGrey = { fg = theme.palette.gray }, + MiniIconsPurple = { fg = theme.palette.purple }, + MiniIconsBlue = { fg = theme.palette.blue }, + MiniIconsAzure = { fg = theme.generated.virtual_text_information }, + MiniIconsCyan = { fg = theme.palette.cyan }, + MiniIconsGreen = { fg = theme.palette.green }, + MiniIconsYellow = { fg = theme.palette.yellow }, + MiniIconsOrange = { fg = theme.palette.orange }, + MiniIconsRed = { fg = theme.palette.red }, + } +end + +return M