2022-09-17 17:26:13 +03:00
|
|
|
{ lib
|
2022-11-19 00:56:53 +03:00
|
|
|
, plugins
|
2022-09-24 17:21:16 +03:00
|
|
|
, theme
|
2022-09-17 17:26:13 +03:00
|
|
|
, lualine-nvim
|
|
|
|
, lualine-lsp-progress
|
2022-09-18 12:15:44 +03:00
|
|
|
, nvim-web-devicons
|
2022-09-19 18:44:57 +03:00
|
|
|
, tabby-nvim
|
2022-10-22 23:35:27 +03:00
|
|
|
, enableDevIcons ? false
|
|
|
|
, enableTabby ? false
|
|
|
|
, themeCfg ? { }
|
2022-09-17 17:26:13 +03:00
|
|
|
, ...
|
|
|
|
}:
|
2022-09-16 01:50:38 +03:00
|
|
|
|
2022-09-17 17:26:13 +03:00
|
|
|
let
|
2022-10-22 23:35:27 +03:00
|
|
|
inherit (builtins) readFile;
|
2022-09-24 17:21:16 +03:00
|
|
|
|
2022-10-22 23:35:27 +03:00
|
|
|
themeFlavour = if themeCfg ? flavour then theme.flavour else "frappe";
|
|
|
|
themeConfig = if themeCfg ? config then theme.config else ''
|
2022-09-24 17:21:16 +03:00
|
|
|
vim.g.catppuccin_flavour = "${themeFlavour}"
|
|
|
|
require("catppuccin").setup()
|
|
|
|
vim.cmd([[colorscheme catppuccin]])
|
|
|
|
'';
|
2022-09-19 18:44:57 +03:00
|
|
|
|
2022-11-19 00:56:53 +03:00
|
|
|
lualineSettings = lib.toLua (lib.attrByPath [ "lualine" "settings" ] { } plugins);
|
2022-09-24 17:21:16 +03:00
|
|
|
lualinePlugins = [ lualine-nvim lualine-lsp-progress ];
|
2022-09-17 17:26:13 +03:00
|
|
|
in
|
2022-09-16 01:50:38 +03:00
|
|
|
{
|
2022-09-24 17:21:16 +03:00
|
|
|
luaConfig = themeConfig
|
2022-11-19 00:56:53 +03:00
|
|
|
+ (readFile (lib.substituteAll { src = ./lualine.lua; inherit lualineSettings; }))
|
2022-09-24 17:21:16 +03:00
|
|
|
+ (lib.optional enableTabby (readFile ./tabby-nvim.lua));
|
2022-09-16 01:50:38 +03:00
|
|
|
|
2022-09-24 17:21:16 +03:00
|
|
|
plugins = [ theme ]
|
2022-09-17 17:26:13 +03:00
|
|
|
++ lualinePlugins
|
2022-09-18 12:15:44 +03:00
|
|
|
++ (lib.optional enableDevIcons [ nvim-web-devicons ])
|
2022-09-19 18:44:57 +03:00
|
|
|
++ (lib.optional enableTabby [ tabby-nvim ]);
|
2022-09-16 01:50:38 +03:00
|
|
|
}
|