typescript: Fix eldoc hooks

This commit is contained in:
Aaron Jensen 2018-03-03 15:43:26 -08:00 committed by syl20bnr
parent 971719f55c
commit 31dc961ef8
2 changed files with 3 additions and 7 deletions

View File

@ -65,9 +65,3 @@
(list (point-min) (point-max))))
(browse-url (concat "http://www.typescriptlang.org/Playground#src="
(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)))

View File

@ -30,7 +30,9 @@
:modes typescript-mode typescript-tsx-mode))
(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 ()
(spacemacs/enable-flycheck 'typescript-mode)