diff options
author | Timo Wilken | 2022-11-24 00:36:26 +0100 |
---|---|---|
committer | Timo Wilken | 2022-11-24 00:36:26 +0100 |
commit | e2c24becafc21f474a9f84a668350e40ffe48d4c (patch) | |
tree | 3752a5173e698bbb0807980f9320c752ea8a79a4 | |
parent | 5be2166a34479a2fe7cd0021149d9b18e20a6265 (diff) |
Install and set up Dash docs in Emacs
-rw-r--r-- | emacs-init.el | 16 | ||||
-rw-r--r-- | home-configuration.scm | 1 |
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 |