feature/lookup: rewrite dash docset integration
+ Uses alist variable to store config, rather than hooks + Added check for installed docsets in +lookup/documentation + Set docsets for various language modules (c-mode, c++-mode, css-mode, scss-mode, sass-mode, web-mode, go-mode, racket-mode, emacs-lisp-mode, js2-mode, rjsx-mode, typescript-mode, rust-mode, and php-mode) + Made *eww* popups for dash docsets larger + Renamed set-docset! => set-docsets! (set-docset! is aliased to set-docsets!) + New +lookup/install-docset alias
This commit is contained in:
parent
2df2622329
commit
fd8f8c5108
13 changed files with 119 additions and 35 deletions
|
@ -63,6 +63,10 @@ properties:
|
|||
`(set-lookup-handlers! ,modes ,@plist))
|
||||
|
||||
|
||||
;;
|
||||
;; Library
|
||||
;;
|
||||
|
||||
;; Helpers
|
||||
(defun +lookup--online-provider (&optional force-p namespace)
|
||||
(let ((key (or namespace major-mode)))
|
||||
|
@ -201,17 +205,18 @@ Goes down a list of possible backends:
|
|||
3. Fall back to an online search, with `+lookup/online'"
|
||||
(interactive
|
||||
(list (+lookup--symbol-or-region)))
|
||||
(cond ((and +lookup-documentation-functions
|
||||
(cond ((null identifier) (user-error "Nothing under point"))
|
||||
|
||||
((and +lookup-documentation-functions
|
||||
(+lookup--jump-to :documentation identifier)))
|
||||
|
||||
((and (featurep! +docsets)
|
||||
(or (require 'counsel-dash nil t)
|
||||
(require 'helm-dash nil t))
|
||||
(or (bound-and-true-p counsel-dash-docsets)
|
||||
(bound-and-true-p helm-dash-docsets))
|
||||
;; counsel-dash uses helm-dash under the hood
|
||||
(helm-dash-installed-docsets))
|
||||
(+lookup/in-docsets identifier))
|
||||
(let ((docsets (+lookup-docsets-for-buffer)))
|
||||
(when (cl-some #'+lookup-docset-installed-p docsets)
|
||||
(+lookup/in-docsets identifier docsets)
|
||||
t))))
|
||||
|
||||
((+lookup/online
|
||||
identifier
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue