mirror of
https://github.com/doomemacs/doomemacs
synced 2025-08-01 12:17:25 -05:00
lang/sh: use (wo)man for docs lookup handler
i.e. Press K to look symbol at point up in man pages.
This commit is contained in:
@ -36,3 +36,13 @@
|
||||
(with-current-buffer "*shell*"
|
||||
(rename-buffer (format "*shell [%s]*" dest-sh))
|
||||
(current-buffer))))
|
||||
|
||||
;;;###autoload
|
||||
(defun +sh-lookup-documentation-handler ()
|
||||
"Look up documentation in `man' or `woman'."
|
||||
(interactive)
|
||||
(call-interactively
|
||||
(if (executable-find "man")
|
||||
#'man
|
||||
#'woman))
|
||||
(current-buffer))
|
||||
|
@ -16,6 +16,7 @@
|
||||
:config
|
||||
(set-electric! 'sh-mode :words '("else" "elif" "fi" "done" "then" "do" "esac" ";;"))
|
||||
(set-repl-handler! 'sh-mode #'+sh/open-repl)
|
||||
(set-lookup-handlers! 'sh-mode :documentation #'+sh-lookup-documentation-handler)
|
||||
(set-ligatures! 'sh-mode
|
||||
;; Functional
|
||||
:def "function"
|
||||
|
Reference in New Issue
Block a user