From 1ed1064ce1ac776d2b61a18f4cd26b614d3ce9f6 Mon Sep 17 00:00:00 2001 From: Strikerlulu <38893265+strikerlulu@users.noreply.github.com> Date: Sat, 18 Jun 2022 20:52:47 +0530 Subject: [PATCH] feat(nix): add generic completing-read support to +nix/lookup-option --- modules/lang/nix/autoload.el | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/modules/lang/nix/autoload.el b/modules/lang/nix/autoload.el index 08c858a0e..8832aa6f7 100644 --- a/modules/lang/nix/autoload.el +++ b/modules/lang/nix/autoload.el @@ -42,8 +42,13 @@ :initial-input initial-input :action #'+nix--options-action :caller '+nix/options)) - ;; TODO Add general `completing-read' support - ((user-error "No search engine is enabled. Enable helm or ivy!"))) + ((+nix--options-action (cdr + (assoc + (completing-read "NixOs options: " + nixos-options + nil + t + initial-input) nixos-options))))) ;; Tell lookup module to let us handle things from here 'deferred)