Skip to content

Commit b500752

Browse files
committed
lualine: match theme with nvim colorscheme
1 parent d7f1380 commit b500752

File tree

1 file changed

+11
-6
lines changed

1 file changed

+11
-6
lines changed

modules/default.nix

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
{ lib, pkgs, ... }:
1+
{ lib, config, pkgs, ... }:
22

33
{
44
imports = [
@@ -9,6 +9,11 @@
99
./telescope.nix
1010
];
1111

12+
assertions = [{
13+
assertion = !config.programs.nixvim.colorschemes.kanagawa.enable && config.programs.nixvim.plugins.lualine.settings.options.theme == "kanagawa";
14+
message = "NixVim `colorschemes.kanagawa.enable` is disabled but `plugins.lualine.settings.options.theme` is set to `kanagawa`.";
15+
}];
16+
1217
extraPlugins = with pkgs.vimPlugins; [
1318
vim-fetch # accept ./path/to/file:123 as line numbers
1419
];
@@ -81,16 +86,16 @@
8186
settings = {
8287
options = {
8388
globalstatus = true;
84-
theme = "onedark";
89+
theme = lib.mkDefault "kanagawa";
8590
};
8691
# https://github.com/nvim-lualine/lualine.nvim?tab=readme-ov-file#filename-component-options
8792
sections = {
88-
lualine_b = [ {
93+
lualine_b = [{
8994
sources = [ "nvim_diagnostic" "nvim_lsp" ];
90-
} ];
91-
lualine_c = [ {
95+
}];
96+
lualine_c = [{
9297
path = 1;
93-
} ];
98+
}];
9499
};
95100
};
96101
};

0 commit comments

Comments
 (0)