tools/lookup: lazy load dash-docs

This commit is contained in:
Henrik Lissner 2019-11-08 04:10:16 -05:00
parent bf8ee34c19
commit 8e394ba3f0
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395
2 changed files with 5 additions and 3 deletions

View file

@ -65,9 +65,10 @@ Docsets must be installed with one of the following commands:
+ `dash-docs-async-install-docset-from-file' + `dash-docs-async-install-docset-from-file'
Docsets can be searched directly via `+lookup/in-docsets'." Docsets can be searched directly via `+lookup/in-docsets'."
(when-let (docsets (cl-remove-if-not #'dash-docs-docset-path (dash-docs-buffer-local-docsets))) (when (require 'dash-docs nil t)
(+lookup/in-docsets nil identifier docsets) (when-let (docsets (cl-remove-if-not #'dash-docs-docset-path (dash-docs-buffer-local-docsets)))
'deferred)) (+lookup/in-docsets nil identifier docsets)
'deferred)))
;; ;;

View file

@ -132,6 +132,7 @@ this list.")
(use-package! dash-docs (use-package! dash-docs
:when (featurep! +docsets) :when (featurep! +docsets)
:defer t
:init :init
(add-hook '+lookup-documentation-functions #'+lookup-dash-docsets-backend-fn) (add-hook '+lookup-documentation-functions #'+lookup-dash-docsets-backend-fn)
:config :config