aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--emacs-init.el16
-rw-r--r--home-configuration.scm1
2 files changed, 17 insertions, 0 deletions
diff --git a/emacs-init.el b/emacs-init.el
index c6679a63..6993f5fe 100644
--- a/emacs-init.el
+++ b/emacs-init.el
@@ -95,6 +95,22 @@
:config (counsel-mode +1)
:diminish counsel-mode)
+(defun tw/counsel-dash-is-help ()
+ "Install `counsel-dash-at-point' as `evil-lookup-func'."
+ (setq-local evil-lookup-func #'counsel-dash-at-point))
+
+(use-package counsel-dash
+ :bind (("<leader>K" . counsel-dash-at-point) ; TODO: just install as `evil-lookup-func'?
+ ("<leader>dK" . counsel-dash)
+ ("<leader>di" . counsel-dash-install-docset)
+ ("<leader>da" . counsel-dash-activate-docset)
+ ("<leader>dd" . counsel-dash-deactivate-docset))
+ :hook (python-mode . tw/counsel-dash-is-help)
+ :custom
+ (counsel-dash-docsets-path (tw/xdg-emacs-subdir 'data "dash-docsets") "Store docsets in the XDG data directory.")
+ (counsel-dash-browser-func 'eww "Open documentation pages using `eww' instead of an external browser.")
+ (counsel-dash-enable-debugging nil "Disable popping up useless warnings."))
+
(use-package rainbow-mode
:after (evil)
:bind (("<leader>tR" . rainbow-mode)))
diff --git a/home-configuration.scm b/home-configuration.scm
index 4b39e189..f65e7bfa 100644
--- a/home-configuration.scm
+++ b/home-configuration.scm
@@ -431,6 +431,7 @@ replacement spec (to which `regexp-substitute/global' is applied)."
"emacs-use-package"
"emacs-eglot"
"emacs-counsel"
+ "emacs-counsel-dash" "sqlite" ; emacs-counsel-dash requires the sqlite3 binary
"emacs-ivy" "emacs-ivy-posframe"
"emacs-company" "emacs-company-quickhelp" "emacs-company-posframe"
"emacs-autothemer" ; for catppuccin/emacs