From d3907deedf74d1d5bd3bb990bff2db2ebc916c56 Mon Sep 17 00:00:00 2001 From: Simon Pflaumer Date: Tue, 6 Aug 2024 05:32:38 +0000 Subject: [PATCH] feat: add lir.nvim and lir-git-status.nvim integration (#705) * add appropriate types * add lir.nvim (lir-git-status.nvim) integration * add integration info to vimdocs * add info to README * chore: format --------- Co-authored-by: mrtnvgr Co-authored-by: Vollow --- README.md | 14 ++++++++++++ doc/catppuccin.txt | 7 ++++++ lua/catppuccin/groups/integrations/lir.lua | 26 ++++++++++++++++++++++ lua/catppuccin/types.lua | 7 ++++++ 4 files changed, 54 insertions(+) create mode 100644 lua/catppuccin/groups/integrations/lir.lua diff --git a/README.md b/README.md index ed2f8ba1..96f4b6dc 100644 --- a/README.md +++ b/README.md @@ -811,6 +811,20 @@ lightspeed = false ``` + + + + lir.nvim + + +```lua +lir = { + enabled = false, + git_status = false +} +``` + + diff --git a/doc/catppuccin.txt b/doc/catppuccin.txt index 8b7e9bf5..00dd8ea0 100644 --- a/doc/catppuccin.txt +++ b/doc/catppuccin.txt @@ -587,6 +587,13 @@ lightspeed.nvim>lua lightspeed = false < +lir.nvim>lua + lir = { + enabled = false, + git_status = false + } +< + lspsaga.nvim>lua lsp_saga = false < diff --git a/lua/catppuccin/groups/integrations/lir.lua b/lua/catppuccin/groups/integrations/lir.lua new file mode 100644 index 00000000..1c51c7cd --- /dev/null +++ b/lua/catppuccin/groups/integrations/lir.lua @@ -0,0 +1,26 @@ +local M = {} + +function M.get() + return vim.tbl_deep_extend("force", {}, { + LirFloatNormal = { fg = C.text, bg = O.transparent_background and C.none or C.mantle }, + LirFloatBorder = { + fg = O.transparent_background and C.surface1 or C.base, + bg = O.transparent_background and C.none or C.base, + }, + LirFloatCursorLine = { link = "CursorLine" }, + LirDir = { fg = C.blue }, + LirSymLink = { fg = C.pink }, + LirEmptyDirText = { fg = C.blue }, + LirFloatCurdirWindowNormal = { fg = C.text }, + LirFloatCurdirWindowDirName = { fg = C.lavender, style = { "bold" } }, + }, ((O.integrations.lir and O.integrations.lir.git_status) and { + LirGitStatusBracket = { fg = C.overlay0 }, + LirGitStatusIndex = { fg = C.blue }, + LirGitStatusWorktree = { fg = C.yellow }, + LirGitStatusUnmerged = { fg = C.red }, + LirGitStatusUntracked = { fg = C.subtext0 }, + LirGitStatusIgnored = { fg = C.subtext0 }, + }) or {}) +end + +return M diff --git a/lua/catppuccin/types.lua b/lua/catppuccin/types.lua index 4c5aff90..7c2ed9a0 100644 --- a/lua/catppuccin/types.lua +++ b/lua/catppuccin/types.lua @@ -159,6 +159,7 @@ ---@field indent_blankline CtpIntegrationIndentBlankline | boolean? ---@field leap boolean? ---@field lightspeed boolean? +---@field lir CtpIntegrationLir | boolean? -- For custom Lsp kind icon and colors, adjust your `lspsaga` config: -- -- ```lua @@ -238,6 +239,12 @@ -- Follow the instructions on the plugins GitHub repo to set it up. ---@field colored_indent_levels boolean? +---@class CtpIntegrationLir +-- Whether to enable the integration. +---@field enabled boolean +-- Sets lir-git-status.nvim highlight groups +---@field git_status boolean + ---@class CtpIntegrationMini -- Whether to enable the integration. ---@field enabled boolean