lang/javascript: fix documentation lookup

Due to how tide-documentation-at-point is designed, it isn't compatible
with lookup handlers. A better solution is needed.
This commit is contained in:
Henrik Lissner 2019-03-18 01:08:59 -04:00
parent 949d5ab343
commit 5e3c8c5f92
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395

View file

@ -160,14 +160,15 @@
;; navigation
(set-lookup-handlers! 'tide-mode :async t
:definition #'tide-jump-to-definition
:references #'tide-references
:documentation #'tide-documentation-at-point)
:references #'tide-references)
;; resolve to `doom-project-root' if `tide-project-root' fails
(advice-add #'tide-project-root :override #'+javascript*tide-project-root)
;; cleanup tsserver when no tide buffers are left
(add-hook! 'tide-mode-hook
(add-hook 'kill-buffer-hook #'+javascript|cleanup-tide-processes nil t))
(define-key tide-mode-map [remap +lookup/documentation] #'tide-documentation-at-point)
(map! :localleader
:map tide-mode-map
"R" #'tide-restart-server