36 lines
855 B
Nix
36 lines
855 B
Nix
{ enableDevIcons ? false
|
|
, enableTabby ? false
|
|
, theme ? { }
|
|
}:
|
|
|
|
{ lib
|
|
, theme
|
|
, lualine-nvim
|
|
, lualine-lsp-progress
|
|
, nvim-web-devicons
|
|
, tabby-nvim
|
|
, ...
|
|
}:
|
|
|
|
let
|
|
inherit (builtins) readFile isString;
|
|
|
|
themeFlavour = if isString (lib.getAttrOpt "flavour" theme) then theme.flavour else "frappe";
|
|
themeConfig = if isString (lib.getAttrOpt "config" theme) then theme.config else ''
|
|
vim.g.catppuccin_flavour = "${themeFlavour}"
|
|
require("catppuccin").setup()
|
|
vim.cmd([[colorscheme catppuccin]])
|
|
'';
|
|
|
|
lualinePlugins = [ lualine-nvim lualine-lsp-progress ];
|
|
in
|
|
{
|
|
luaConfig = themeConfig
|
|
+ (readFile ./lualine.lua)
|
|
+ (lib.optional enableTabby (readFile ./tabby-nvim.lua));
|
|
|
|
plugins = [ theme ]
|
|
++ lualinePlugins
|
|
++ (lib.optional enableDevIcons [ nvim-web-devicons ])
|
|
++ (lib.optional enableTabby [ tabby-nvim ]);
|
|
}
|