Skip to content

Commit

Permalink
feat: add lir.nvim and lir-git-status.nvim integration (#705)
Browse files Browse the repository at this point in the history
* 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 <[email protected]>
Co-authored-by: Vollow <[email protected]>
  • Loading branch information
3 people authored Aug 6, 2024
1 parent e1268d1 commit d3907de
Show file tree
Hide file tree
Showing 4 changed files with 54 additions and 0 deletions.
14 changes: 14 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -811,6 +811,20 @@ lightspeed = false
```
<!-- lightspeed.nvim -->

<!-- lir.nvim -->
</tr>
<tr>
<td> <a href="https://github.com/tamago324/lir.nvim">lir.nvim</a> </td>
<td>

```lua
lir = {
enabled = false,
git_status = false
}
```
<!-- lir.nvim -->

<!-- lspsaga.nvim -->
</tr>
<tr>
Expand Down
7 changes: 7 additions & 0 deletions doc/catppuccin.txt
Original file line number Diff line number Diff line change
Expand Up @@ -587,6 +587,13 @@ lightspeed.nvim>lua
lightspeed = false
<

lir.nvim>lua
lir = {
enabled = false,
git_status = false
}
<

lspsaga.nvim>lua
lsp_saga = false
<
Expand Down
26 changes: 26 additions & 0 deletions lua/catppuccin/groups/integrations/lir.lua
Original file line number Diff line number Diff line change
@@ -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
7 changes: 7 additions & 0 deletions lua/catppuccin/types.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit d3907de

Please sign in to comment.