mirror of
https://github.com/nix-community/nixvim.git
synced 2025-06-21 08:35:43 +02:00
tokyonight: add options
This commit is contained in:
parent
82d2c82e85
commit
f3cbb78bcc
1 changed files with 43 additions and 1 deletions
|
@ -1,10 +1,35 @@
|
|||
{ pkgs, config, lib, ... }:
|
||||
with lib;
|
||||
let cfg = config.programs.nixvim.colorschemes.tokyonight;
|
||||
let
|
||||
cfg = config.programs.nixvim.colorschemes.tokyonight;
|
||||
style = types.enum [ "storm" "night" "day" ];
|
||||
in {
|
||||
options = {
|
||||
programs.nixvim.colorschemes.tokyonight = {
|
||||
enable = mkEnableOption "Enable tokyonight";
|
||||
style = mkOption {
|
||||
type = types.nullOr style;
|
||||
default = null;
|
||||
description = "Theme style";
|
||||
};
|
||||
terminalColors = mkEnableOption
|
||||
"Configure the colors used when opening a :terminal in Neovim";
|
||||
italicComments = mkEnableOption "Make comments italic";
|
||||
italicKeywods = mkEnableOption "Make keywords italic";
|
||||
italicFunctions = mkEnableOption "Make functions italic";
|
||||
italicVariables = mkEnableOption "Make variables and identifiers italic";
|
||||
transparent =
|
||||
mkEnableOption "Enable this to disable setting the background color";
|
||||
hideInactiveStatusline = mkEnableOption
|
||||
"Enabling this option will hide inactive statuslines and replace them with a thin border";
|
||||
transparentSidebar = mkEnableOption
|
||||
"Sidebar like windows like NvimTree get a transparent background";
|
||||
darkSidebar = mkEnableOption
|
||||
"Sidebar like windows like NvimTree get a darker background";
|
||||
darkFloat = mkEnableOption
|
||||
"Float windows like the lsp diagnostics windows get a darker background";
|
||||
lualineBold = mkEnableOption
|
||||
"When true, section headers in the lualine theme will be bold";
|
||||
};
|
||||
};
|
||||
config = mkIf cfg.enable {
|
||||
|
@ -12,6 +37,23 @@ in {
|
|||
colorscheme = "tokyonight";
|
||||
extraPlugins = [ pkgs.vimPlugins.tokyonight-nvim ];
|
||||
options = { termguicolors = true; };
|
||||
globals = {
|
||||
tokyonight_style = mkIf (!isNull cfg.style) cfg.style;
|
||||
tokyonight_terminal_colors = mkIf (!cfg.terminalColors) 0;
|
||||
|
||||
tokyonight_italic_comments = mkIf (!cfg.italicComments) 0;
|
||||
tokyonight_italic_keywords = mkIf (!cfg.italicKeywods) 0;
|
||||
tokyonight_italic_functions = mkIf (cfg.italicFunctions) 1;
|
||||
tokyonight_italic_variables = mkIf (cfg.italicVariables) 1;
|
||||
|
||||
tokyonight_transparent = mkIf (cfg.transparent) 1;
|
||||
tokyonight_hide_inactive_statusline =
|
||||
mkIf (cfg.hideInactiveStatusline) 1;
|
||||
tokyonight_transparent_sidebar = mkIf (cfg.transparentSidebar) 1;
|
||||
tokyonight_dark_sidebar = mkIf (!cfg.darkSidebar) 0;
|
||||
tokyonight_dark_float = mkIf (!cfg.darkFloat) 0;
|
||||
tokyonight_lualine_bold = mkIf (cfg.lualineBold) 1;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue