From dce571fae5ce603d3e22221d64b118dea45811cd Mon Sep 17 00:00:00 2001 From: Fay Ash Date: Sat, 7 Jun 2025 17:29:48 +0800 Subject: [PATCH] plugins/neotest: allow raw lua for `quickfix.open` setting --- plugins/by-name/neotest/settings-options.nix | 2 +- .../plugins/by-name/neotest/quickfix_open_raw.nix | 12 ++++++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) create mode 100644 tests/test-sources/plugins/by-name/neotest/quickfix_open_raw.nix diff --git a/plugins/by-name/neotest/settings-options.nix b/plugins/by-name/neotest/settings-options.nix index bb9bab43..609eb259 100644 --- a/plugins/by-name/neotest/settings-options.nix +++ b/plugins/by-name/neotest/settings-options.nix @@ -180,7 +180,7 @@ in quickfix = { enabled = defaultNullOpts.mkBool true "Enable quickfix."; - open = defaultNullOpts.mkNullable (with types; either bool str) false '' + open = defaultNullOpts.mkNullableWithRaw (with types; either bool str) false '' Set to true to open quickfix on startup, or a function to be called when the quickfix results are set. ''; diff --git a/tests/test-sources/plugins/by-name/neotest/quickfix_open_raw.nix b/tests/test-sources/plugins/by-name/neotest/quickfix_open_raw.nix new file mode 100644 index 00000000..56940267 --- /dev/null +++ b/tests/test-sources/plugins/by-name/neotest/quickfix_open_raw.nix @@ -0,0 +1,12 @@ +{ + example = { + plugins.neotest = { + settings = { + quickfix.open.__raw = '' + function() + end + ''; + }; + }; + }; +}