forked from doomemacs/doomemacs
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
featuregate ivy dependent autoloads for irc, pass
previously these functions would get autoloaded even when another completion framework was active
- Loading branch information
Showing
5 changed files
with
57 additions
and
66 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
;;; app/irc/autoload/ivy.el -*- lexical-binding: t; -*- | ||
;;;###if (featurep! :completion ivy) | ||
|
||
;;;###autoload | ||
(defun +irc/ivy-jump-to-channel (&optional this-server) | ||
"Jump to an open channel or server buffer with ivy. If THIS-SERVER (universal | ||
argument) is non-nil only show channels in current server." | ||
(interactive "P") | ||
(if (not (circe-server-buffers)) | ||
(message "No circe buffers available") | ||
(when (and this-server (not circe-server-buffer)) | ||
(setq this-server nil)) | ||
(ivy-read (format "Jump to%s: " (if this-server (format " (%s)" (buffer-name circe-server-buffer)) "")) | ||
(cl-loop with servers = (if this-server (list circe-server-buffer) (circe-server-buffers)) | ||
with current-buffer = (current-buffer) | ||
for server in servers | ||
collect (buffer-name server) | ||
nconc | ||
(with-current-buffer server | ||
(cl-loop for buf in (circe-server-chat-buffers) | ||
unless (eq buf current-buffer) | ||
collect (format " %s" (buffer-name buf))))) | ||
:action #'+irc--ivy-switch-to-buffer-action | ||
:preselect (buffer-name (current-buffer)) | ||
:keymap ivy-switch-buffer-map | ||
:caller '+irc/ivy-jump-to-channel))) | ||
|
||
(defun +irc--ivy-switch-to-buffer-action (buffer) | ||
(when (stringp buffer) | ||
(ivy--switch-buffer-action (string-trim-left buffer)))) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
;;; tools/pass/autoload/ivy.el -*- lexical-binding: t; -*- | ||
;;;###if (featurep! :completion ivy) | ||
|
||
;;;###autoload | ||
(defun +pass/ivy (arg) | ||
"TODO" | ||
(interactive "P") | ||
(ivy-read "Pass: " (password-store-list) | ||
:action (if arg | ||
#'password-store-url | ||
#'password-store-copy) | ||
:caller '+pass/ivy)) | ||
|
||
(after! ivy | ||
(ivy-add-actions | ||
'+pass/ivy | ||
'(("o" password-store-copy "copy password") | ||
("e" +pass/edit-entry "edit entry") | ||
("u" +pass/copy-user "copy username") | ||
("b" +pass/copy-url "open url in browser") | ||
("f" +pass/copy-field "get field")))) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters