Skip to content

Commit

Permalink
feat(mini.indentscope): add scope color (#592)
Browse files Browse the repository at this point in the history
* Color change indentline

* Options for indentscope

* Updated README

* Updated vim.yml documentation

* Updated types

* logic inside of initialization

Co-authored-by: mrtnvgr <martynovegorOF@yandex.ru>

* simplify mini options

Co-authored-by: mrtnvgr <martynovegorOF@yandex.ru>

---------

Co-authored-by: mrtnvgr <martynovegorOF@yandex.ru>
  • Loading branch information
Pandoks and mrtnvgr committed Oct 14, 2023
1 parent fc53704 commit 795f639
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 5 deletions.
15 changes: 12 additions & 3 deletions README.md
Expand Up @@ -127,7 +127,10 @@ require("catppuccin").setup({
nvimtree = true,
treesitter = true,
notify = false,
mini = false,
mini = {
enabled = true,
indentscope_color = "",
},
-- For more plugins integrations please scroll down (https://github.com/catppuccin/nvim#integrations)
},
})
Expand Down Expand Up @@ -240,7 +243,10 @@ require("catppuccin").setup({
nvimtree = true,
treesitter = true,
notify = false,
mini = false,
mini = {
enabled = true,
indentscope_color = "",
},
}
})
```
Expand Down Expand Up @@ -819,7 +825,10 @@ mason = false
<td>

```lua
mini = false
mini = {
enabled = true,
indentscope_color = "", -- catppuccin color (eg. `lavender`) Default: text
},
```

</td>
Expand Down
3 changes: 2 additions & 1 deletion lua/catppuccin/groups/integrations/mini.lua
Expand Up @@ -6,13 +6,14 @@ function M.get()

local inactive_bg = transparent_background and "NONE" or C.mantle

local indentscope_color = O.integrations.mini.indentscope_color
return {
MiniCompletionActiveParameter = { style = { "underline" } },

MiniCursorword = { style = { "underline" } },
MiniCursorwordCurrent = { style = { "underline" } },

MiniIndentscopeSymbol = { fg = C.text },
MiniIndentscopeSymbol = { fg = C[indentscope_color] and C[indentscope_color] or C.text },
MiniIndentscopePrefix = { style = { "nocombine" } }, -- Make it invisible

MiniJump = { fg = C.overlay2, bg = C.pink },
Expand Down
7 changes: 6 additions & 1 deletion lua/catppuccin/types.lua
Expand Up @@ -164,7 +164,6 @@
---@field lsp_trouble boolean?
---@field markdown boolean?
---@field mason boolean?
---@field mini boolean?
---@field native_lsp CtpIntegrationNativeLsp | boolean?
-- You **NEED** to enable highlight in your `nvim-navic` config or it won't work:
--
Expand Down Expand Up @@ -228,6 +227,12 @@
-- Follow the instructions on the plugins GitHub repo to set it up.
---@field colored_indent_levels boolean?

---@class CtpIntegrationMini
-- Whether to enable the integration.
---@field enabled boolean
-- Sets the color of the scope line
---@field indentscope_color CtpColor?

---@class CtpIntegrationNativeLsp
-- Whether to enable the Native LSP integration.
---@field enabled boolean
Expand Down
7 changes: 7 additions & 0 deletions vim.yml
Expand Up @@ -285,6 +285,13 @@ globals:
type: bool
property: read-only

O.integrations.mini.enabled:
type: bool
property: read-only
O.integrations.mini.indentscope_color:
type: string
property: read-only

O.integrations.native_lsp.enabled:
type: bool
property: read-only
Expand Down

0 comments on commit 795f639

Please sign in to comment.