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:
parent
949d5ab343
commit
5e3c8c5f92
1 changed files with 3 additions and 2 deletions
|
@ -160,14 +160,15 @@
|
||||||
;; navigation
|
;; navigation
|
||||||
(set-lookup-handlers! 'tide-mode :async t
|
(set-lookup-handlers! 'tide-mode :async t
|
||||||
:definition #'tide-jump-to-definition
|
:definition #'tide-jump-to-definition
|
||||||
:references #'tide-references
|
:references #'tide-references)
|
||||||
:documentation #'tide-documentation-at-point)
|
|
||||||
;; resolve to `doom-project-root' if `tide-project-root' fails
|
;; resolve to `doom-project-root' if `tide-project-root' fails
|
||||||
(advice-add #'tide-project-root :override #'+javascript*tide-project-root)
|
(advice-add #'tide-project-root :override #'+javascript*tide-project-root)
|
||||||
;; cleanup tsserver when no tide buffers are left
|
;; cleanup tsserver when no tide buffers are left
|
||||||
(add-hook! 'tide-mode-hook
|
(add-hook! 'tide-mode-hook
|
||||||
(add-hook 'kill-buffer-hook #'+javascript|cleanup-tide-processes nil t))
|
(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! :localleader
|
||||||
:map tide-mode-map
|
:map tide-mode-map
|
||||||
"R" #'tide-restart-server
|
"R" #'tide-restart-server
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue