This repository has been archived on 2024-05-17. You can view files and clone it, but cannot push or open issues or pull requests.
neovim/plugins/theme/default.nix

34 lines
799 B
Nix

{ lib
, theme
, lualine-nvim
, lualine-lsp-progress
, nvim-web-devicons
, tabby-nvim
, enableDevIcons ? false
, enableTabby ? false
, themeCfg ? { }
, ...
}:
let
inherit (builtins) readFile;
themeFlavour = if themeCfg ? flavour then theme.flavour else "frappe";
themeConfig = if themeCfg ? config 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 ]);
}