From 9e81cb73913b730467d74fde21c4613c525e77c7 Mon Sep 17 00:00:00 2001 From: Austin Horstman Date: Sun, 15 Sep 2024 16:09:02 -0500 Subject: [PATCH] plugins/glow: support style path --- plugins/by-name/glow/default.nix | 11 +++++++---- tests/test-sources/plugins/by-name/glow/default.nix | 10 ++++++++++ 2 files changed, 17 insertions(+), 4 deletions(-) diff --git a/plugins/by-name/glow/default.nix b/plugins/by-name/glow/default.nix index 7faa6176..2ff4bcee 100644 --- a/plugins/by-name/glow/default.nix +++ b/plugins/by-name/glow/default.nix @@ -37,10 +37,13 @@ lib.nixvim.neovim-plugin.mkNeovimPlugin { "single" ] "Style of the floating window's border."; - style = defaultNullOpts.mkEnum [ - "dark" - "light" - ] (lib.nixvim.mkRaw "vim.opt.background") "Glow style."; + style = defaultNullOpts.mkNullable ( + with lib.types; + either (maybeRaw str) (enum [ + "dark" + "light" + ]) + ) (lib.nixvim.mkRaw "vim.opt.background") "Glow style."; pager = defaultNullOpts.mkBool false '' Display output in a pager style. diff --git a/tests/test-sources/plugins/by-name/glow/default.nix b/tests/test-sources/plugins/by-name/glow/default.nix index a9c0d056..e217615d 100644 --- a/tests/test-sources/plugins/by-name/glow/default.nix +++ b/tests/test-sources/plugins/by-name/glow/default.nix @@ -23,4 +23,14 @@ }; }; }; + + example = { + plugins.glow = { + enable = true; + settings = { + border = "single"; + style = "/path/to/catppuccin.json"; + }; + }; + }; }