typescript: Fix eldoc hooks
This commit is contained in:
parent
971719f55c
commit
31dc961ef8
|
@ -65,9 +65,3 @@
|
||||||
(list (point-min) (point-max))))
|
(list (point-min) (point-max))))
|
||||||
(browse-url (concat "http://www.typescriptlang.org/Playground#src="
|
(browse-url (concat "http://www.typescriptlang.org/Playground#src="
|
||||||
(url-hexify-string (buffer-substring-no-properties start end)))))
|
(url-hexify-string (buffer-substring-no-properties start end)))))
|
||||||
|
|
||||||
(defun spacemacs/typescript-setup-tide-mode ()
|
|
||||||
(tide-setup)
|
|
||||||
;; Enable eldoc-mode after tide-setup or it won't work
|
|
||||||
(when (configuration-layer/package-used-p 'eldoc)
|
|
||||||
(eldoc-mode)))
|
|
||||||
|
|
|
@ -30,7 +30,9 @@
|
||||||
:modes typescript-mode typescript-tsx-mode))
|
:modes typescript-mode typescript-tsx-mode))
|
||||||
|
|
||||||
(defun typescript/pre-init-eldoc ()
|
(defun typescript/pre-init-eldoc ()
|
||||||
(spacemacs|use-package-add-hook tide :post-config (eldoc-mode)))
|
(spacemacs|use-package-add-hook tide :post-init
|
||||||
|
(add-hook 'typescript-tsx-mode-hook 'eldoc-mode t)
|
||||||
|
(add-hook 'typescript-mode-hook 'eldoc-mode t)))
|
||||||
|
|
||||||
(defun typescript/post-init-flycheck ()
|
(defun typescript/post-init-flycheck ()
|
||||||
(spacemacs/enable-flycheck 'typescript-mode)
|
(spacemacs/enable-flycheck 'typescript-mode)
|
||||||
|
|
Loading…
Reference in a new issue