Fix #1765: enabling tide when lsp is active

This commit is contained in:
Henrik Lissner 2019-09-08 12:55:23 -04:00
parent 1539387747
commit d0e3bc3455
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395
2 changed files with 4 additions and 5 deletions

View file

@ -145,9 +145,7 @@ to tide."
;; necessary because `tide-setup' and `lsp' will error if not a
;; file-visiting buffer
(add-hook 'after-save-hook #'+javascript-init-tide-or-lsp-maybe-h nil 'local)
(or (and (featurep! +lsp)
(lsp!)
(bound-and-true-p lsp-mode))
(or (and (featurep! +lsp) (lsp!))
;; fall back to tide
(if (executable-find "node")
(and (require 'tide nil t)

View file

@ -10,8 +10,9 @@ been moved out to their respective modules, or these hooks:
+ `+lsp-init-company-h' (on `lsp-mode-hook')
+ `+lsp-init-ui-flycheck-or-flymake-h' (on `lsp-ui-mode-hook')"
(if (bound-and-true-p lsp-mode)
t
(require 'lsp-mode)
(unless lsp-mode
(when lsp-auto-configure
(require 'lsp-clients))
(when (and (buffer-file-name)