Have lsp! return non-nil if successful

And fix an issue where +javascript-init-lsp-or-tide-maybe-h would
reference lsp-mode in the rare case where lsp-mode isn't defined (likely
because the user forgot to run `doom refresh` after enabling the :tools
lsp module).
This commit is contained in:
Henrik Lissner 2019-09-02 21:43:12 -04:00
parent 713258ee31
commit e996216714
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395
2 changed files with 9 additions and 8 deletions

View file

@ -146,7 +146,8 @@ to tide."
;; file-visiting buffer
(add-hook 'after-save-hook #'+javascript-init-tide-or-lsp-maybe-h nil 'local)
(or (and (featurep! +lsp)
(progn (lsp!) lsp-mode))
(lsp!)
(bound-and-true-p lsp-mode))
;; fall back to tide
(if (executable-find "node")
(and (require 'tide nil t)