From e3f57964038381c6822a2c2b61ca469ccc5797d0 Mon Sep 17 00:00:00 2001 From: Austin Horstman Date: Sun, 1 Sep 2024 00:09:18 -0500 Subject: [PATCH] plugins/lualine: support custom extensions --- plugins/statuslines/lualine.nix | 2 +- tests/test-sources/plugins/statuslines/lualine.nix | 13 ++++++++++++- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/plugins/statuslines/lualine.nix b/plugins/statuslines/lualine.nix index bddcd48f..fc5c6c6e 100644 --- a/plugins/statuslines/lualine.nix +++ b/plugins/statuslines/lualine.nix @@ -196,7 +196,7 @@ in inactiveWinbar = mkEmptySectionOption "Inactive Winbar configuration"; extensions = mkOption { - type = types.nullOr (types.listOf types.str); + type = with lib.types; nullOr (listOf (either str (attrsOf anything))); default = null; example = ''[ "fzf" ]''; description = "list of enabled extensions"; diff --git a/tests/test-sources/plugins/statuslines/lualine.nix b/tests/test-sources/plugins/statuslines/lualine.nix index 9a0a2f05..8817a71a 100644 --- a/tests/test-sources/plugins/statuslines/lualine.nix +++ b/tests/test-sources/plugins/statuslines/lualine.nix @@ -111,7 +111,18 @@ } ]; }; - extensions = [ "nvim-tree" ]; + extensions = [ + "nvim-tree" + { + sections = { + lualine_a = [ "filename" ]; + }; + inactive_sections = { + lualine_x = [ "location" ]; + }; + filetypes = [ "markdown" ]; + } + ]; }; };