lang/javascript: fix eldoc in tide-mode

This commit is contained in:
Henrik Lissner 2019-08-26 14:57:24 -04:00
parent a5096ff86b
commit 43ebba886f
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395

View file

@ -176,10 +176,12 @@ to tide."
;; cleanup tsserver when no tide buffers are left
(add-hook! 'tide-mode-hook
(add-hook 'kill-buffer-hook #'+javascript-cleanup-tide-processes-h nil t))
;; Eldoc is activated too soon and disables itself, thinking there is no eldoc
;; support in the current buffer, so we must re-enable it later once eldoc
;; support exists.
(add-hook 'tide-mode-hook #'eldoc-mode)
;; support exists. It is set *after* tide-mode is enabled, so enabling it on
;; `tide-mode-hook' is too early, so...
(advice-add #'tide-setup :after #'eldoc-mode)
(define-key tide-mode-map [remap +lookup/documentation] #'tide-documentation-at-point)