Skip to content

Commit a2b8553

Browse files
committed
feat: Make customizable the completion options for the registry list
1 parent 0ca65cb commit a2b8553

File tree

1 file changed

+11
-4
lines changed

1 file changed

+11
-4
lines changed

nix3-registry.el

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,15 @@
6767
This should be a function that takes a name in a registry as an argument."
6868
:type 'function)
6969

70+
(defcustom nix3-registry-list-completion-options
71+
(list :add-to-registry t
72+
:require-match nil
73+
:no-exact t)
74+
"Plist of options for completion in `nix3-registry-list' command.
75+
76+
These options are passed as arguments to `nix3-registry-complete'."
77+
:type 'plist)
78+
7079
(defface nix3-registry-type-face
7180
'((t :inherit font-lock-type-face))
7281
""
@@ -246,10 +255,8 @@ registry type and the \"to\" value of the entry."
246255
(defun nix3-registry-list ()
247256
"Display a list of entries in the flake registries."
248257
(interactive)
249-
(let ((name (nix3-registry-complete "Flake: "
250-
:add-to-registry t
251-
:require-match nil
252-
:no-exact t)))
258+
(let ((name (apply #'nix3-registry-complete "Flake: "
259+
nix3-registry-list-completion-options)))
253260
(message "Selected a registry entry %s" name)
254261
(funcall nix3-registry-list-action name)))
255262

0 commit comments

Comments
 (0)