feature/lookup: remove devdocs support (for now)

devdocs-lookup is broken at the moment. devdocs search is still
available through +lookup/online as a provider however. This may be
reversed later, when (and if) we find a better devdocs backend.
This commit is contained in:
Henrik Lissner 2018-08-28 20:48:49 +02:00
parent 5021b0dbb6
commit a57c0fbede
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395
7 changed files with 2 additions and 61 deletions

View file

@ -7,7 +7,6 @@
(evil +everywhere); come to the dark side, we have cookies (evil +everywhere); come to the dark side, we have cookies
file-templates ; auto-snippets for empty files file-templates ; auto-snippets for empty files
(lookup ; helps you navigate your code and documentation (lookup ; helps you navigate your code and documentation
+devdocs ; ...on devdocs.io online
+docsets) ; ...or in Dash docsets locally +docsets) ; ...or in Dash docsets locally
snippets ; my elves. They type so I don't have to snippets ; my elves. They type so I don't have to
spellcheck ; tasing you for misspelling mispelling spellcheck ; tasing you for misspelling mispelling

View file

@ -59,7 +59,6 @@ command from the current directory instead of the project root."
;; TODO (ex! "go[ogle]" #'doom:google-search) ;; TODO (ex! "go[ogle]" #'doom:google-search)
(ex! "lo[okup]" #'+lookup:online) (ex! "lo[okup]" #'+lookup:online)
(ex! "dash" #'+lookup:dash) (ex! "dash" #'+lookup:dash)
(ex! "dd" #'+lookup:devdocs)
(ex! "http" #'httpd-start) ; start http server (ex! "http" #'httpd-start) ; start http server
(ex! "repl" #'+eval:repl) ; invoke or send to repl (ex! "repl" #'+eval:repl) ; invoke or send to repl
;; TODO (ex! "rx" 'doom:regex) ; open re-builder ;; TODO (ex! "rx" 'doom:regex) ; open re-builder

View file

@ -1,22 +0,0 @@
;;; feature/lookup/autoload/devdocs.el -*- lexical-binding: t; -*-
;;;###if (featurep! +devdocs)
;;;###autodef
(defun set-devdocs! (modes docset)
"Map major MODES (one major-mode symbol or a list of them) to a devdocs
DOCSET (a string).
See `devdocs-alist' for the defaults. "
(defer-until! (boundp 'devdocs-alist)
(dolist (mode (doom-enlist modes))
(setf (alist-get mode devdocs-alist) docset))))
;; FIXME obsolete :devdocs
;;;###autoload
(def-setting! :devdocs (modes docset)
"Map major MODES (one major-mode symbol or a list of them) to a devdocs
DOCSET (a string).
See `devdocs-alist' for the defaults. "
:obsolete set-devdocs!
`(set-devdocs! ,modes ,docset))

View file

@ -14,9 +14,3 @@ engine."
"TODO" "TODO"
(interactive "<a><!>") (interactive "<a><!>")
(+lookup/in-docsets query (if bang 'blank))) (+lookup/in-docsets query (if bang 'blank)))
;;;###autoload (autoload '+lookup:devdocs "feature/lookup/autoload/evil" nil t)
(evil-define-command +lookup:devdocs (query &optional bang)
"TODO"
(interactive "<a><!>")
(+lookup/in-devdocs query (if bang 'blank)))

View file

@ -198,8 +198,7 @@ Goes down a list of possible backends:
1. The :documentation spec defined with by `set-lookup-handlers!' 1. The :documentation spec defined with by `set-lookup-handlers!'
2. If the +docsets flag is active for :feature lookup, use `+lookup/in-docsets' 2. If the +docsets flag is active for :feature lookup, use `+lookup/in-docsets'
3. If the +devdocs flag is active for :feature lookup, run `+lookup/in-devdocs' 3. Fall back to an online search, with `+lookup/online'"
4. Fall back to an online search, with `+lookup/online'"
(interactive (interactive
(list (+lookup--symbol-or-region))) (list (+lookup--symbol-or-region)))
(cond ((and +lookup-documentation-functions (cond ((and +lookup-documentation-functions
@ -214,9 +213,6 @@ Goes down a list of possible backends:
(helm-dash-installed-docsets)) (helm-dash-installed-docsets))
(+lookup/in-docsets identifier)) (+lookup/in-docsets identifier))
((featurep! +devdocs)
(call-interactively #'+lookup/in-devdocs))
((+lookup/online ((+lookup/online
identifier identifier
(+lookup--online-provider (not current-prefix-arg)))))) (+lookup--online-provider (not current-prefix-arg))))))
@ -272,9 +268,6 @@ Otherwise, falls back on `find-file-at-point'."
;; Source-specific commands ;; Source-specific commands
;; ;;
;;;###autoload
(defalias #'+lookup/in-devdocs #'devdocs-lookup)
(defvar counsel-dash-docsets) (defvar counsel-dash-docsets)
(defvar helm-dash-docsets) (defvar helm-dash-docsets)
;;;###autoload ;;;###autoload

View file

@ -5,11 +5,7 @@
;; + `+lookup/definition': a jump-to-definition that should 'just work' ;; + `+lookup/definition': a jump-to-definition that should 'just work'
;; + `+lookup/references': find a symbol's references in the current project ;; + `+lookup/references': find a symbol's references in the current project
;; + `+lookup/online'; look up a symbol on online resources ;; + `+lookup/online'; look up a symbol on online resources
;; + `+lookup/docs-at-point' ;; + `+lookup/in-docsets': look up in Dash docsets
;; + `+lookup/docs-dash'
;; + `+lookup/docs-dash-at-point'
;; + `+lookup/devdocs'
;; + `+lookup/devdocs-at-point'
;; ;;
;; This module uses `xref', an experimental new library in Emacs. It may change ;; This module uses `xref', an experimental new library in Emacs. It may change
;; in the future. When xref can't be depended on it will fall back to ;; in the future. When xref can't be depended on it will fall back to
@ -140,18 +136,3 @@ argument: the identifier at point.")
(featurep! :completion ivy)) (featurep! :completion ivy))
:commands counsel-dash-install-docset :commands counsel-dash-install-docset
:config (setq counsel-dash-min-length 2)) :config (setq counsel-dash-min-length 2))
;;
;; devdocs.io integration
;;
(when (featurep! +devdocs)
(after! devdocs-lookup
(unless (assoc "SCSS" devdocs-subjects)
(setq devdocs-subjects
(append '(("SCSS" "scss")
("GFM" "markdown")
("Typescript" "typescript"))
devdocs-subjects)))))

View file

@ -19,6 +19,3 @@
(package! helm-dash)) (package! helm-dash))
(when (featurep! :completion ivy) (when (featurep! :completion ivy)
(package! counsel-dash))) (package! counsel-dash)))
(when (featurep! +devdocs)
(package! devdocs-lookup :recipe (:fetcher github :repo "skeeto/devdocs-lookup")))