Add catppuccin integration for lspsaga

This commit is contained in:
Venkatesan Ravi 2025-04-02 15:34:34 +00:00
parent ae23c34be1
commit f294fc0b3b
3 changed files with 36 additions and 19 deletions

View file

@ -292,6 +292,7 @@
- Add lint (luacheck) and formatting (stylua) support for Lua.
- Add lint (markdownlint-cli2) support for Markdown.
- Add catppuccin integration for Lspsaga.
[tebuevd](https://github.com/tebuevd):

View file

@ -6,6 +6,19 @@
inherit (lib.modules) mkRemovedOptionModule;
inherit (lib.options) mkOption mkEnableOption;
inherit (lib.nvim.types) borderType mkPluginSetupOption;
inherit (lib.nvim.lua) mkLuaInline;
uiKindSetupOpts =
if config.vim.theme.enable && config.vim.theme.name == "catppuccin"
then {
ui.kind =
mkLuaInline
# lua
''
require("catppuccin.groups.integrations.lsp_saga").custom_kind()
'';
}
else {};
in {
imports = [
(mkRemovedOptionModule ["vim" "lsp" "lspsaga" "mappings"] ''
@ -21,12 +34,14 @@ in {
options.vim.lsp.lspsaga = {
enable = mkEnableOption "LSP Saga";
setupOpts = mkPluginSetupOption "lspsaga" {
border_style = mkOption {
type = borderType;
default = config.vim.ui.borders.globalStyle;
description = "Border type, see {command}`:help nvim_open_win`";
};
};
setupOpts =
mkPluginSetupOption "lspsaga" {
border_style = mkOption {
type = borderType;
default = config.vim.ui.borders.globalStyle;
description = "Border type, see {command}`:help nvim_open_win`";
};
}
// uiKindSetupOpts;
};
}

View file

@ -66,21 +66,22 @@ in {
transparent_background = ${boolToString transparent},
term_colors = true,
integrations = {
nvimtree = {
enabled = true,
transparent_panel = ${boolToString transparent},
show_root = true,
},
nvimtree = {
enabled = true,
transparent_panel = ${boolToString transparent},
show_root = true,
},
hop = true,
gitsigns = true,
telescope = true,
treesitter = true,
gitsigns = true,
telescope = true,
treesitter = true,
treesitter_context = true,
ts_rainbow = true,
ts_rainbow = true,
fidget = true,
alpha = true,
leap = true,
lsp_saga = true,
markdown = true,
noice = true,
notify = true, -- nvim-notify
@ -106,9 +107,9 @@ in {
style' =
warnIf (style == "light") "oxocarbon: light theme is not well-supported" style;
in ''
require('oxocarbon')
vim.opt.background = "${style'}"
vim.cmd.colorscheme = "oxocarbon"
require('oxocarbon')
vim.opt.background = "${style'}"
vim.cmd.colorscheme = "oxocarbon"
${optionalString transparent ''
vim.api.nvim_set_hl(0, "Normal", { bg = "none" })
vim.api.nvim_set_hl(0, "NormalFloat", { bg = "none" })