From 748c7a95c41d8388dc63efd0fed79071502c59d9 Mon Sep 17 00:00:00 2001 From: Marcel Date: Sun, 13 Oct 2024 17:13:58 +0200 Subject: [PATCH] lualine: match theme with nvim colorscheme --- modules/default.nix | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/modules/default.nix b/modules/default.nix index 2a0cada..0de0b9d 100644 --- a/modules/default.nix +++ b/modules/default.nix @@ -1,4 +1,4 @@ -{ lib, pkgs, ... }: +{ lib, config, pkgs, ... }: { imports = [ @@ -9,6 +9,11 @@ ./telescope.nix ]; + assertions = [{ + assertion = !config.programs.nixvim.colorschemes.kanagawa.enable && config.programs.nixvim.plugins.lualine.settings.options.theme == "kanagawa"; + message = "NixVim `colorschemes.kanagawa.enable` is disabled but `plugins.lualine.settings.options.theme` is set to `kanagawa`."; + }]; + extraPlugins = with pkgs.vimPlugins; [ vim-fetch # accept ./path/to/file:123 as line numbers ]; @@ -81,16 +86,16 @@ settings = { options = { globalstatus = true; - theme = "onedark"; + theme = lib.mkDefault "kanagawa"; }; # https://github.com/nvim-lualine/lualine.nvim?tab=readme-ov-file#filename-component-options sections = { - lualine_b = [ { + lualine_b = [{ sources = [ "nvim_diagnostic" "nvim_lsp" ]; - } ]; - lualine_c = [ { + }]; + lualine_c = [{ path = 1; - } ]; + }]; }; }; };