doomemacs/modules/tools/lsp/autoload/common.el
Henrik Lissner 7784c0b6e9
No-op (lsp) if already enabled #3390
`lsp-deferred` calls `lsp` and `lsp` seems to do something expensive
whether or not lsp-mode is already active. Over TRAMP, this is much too
expensive, so we no-op lsp-deferred if lsp-mode is already active.
2020-08-02 16:27:09 -04:00

11 lines
279 B
EmacsLisp

;;; tools/lsp/autoload/common.el -*- lexical-binding: t; -*-
;;;###autodef
(defun lsp! ()
"Dispatch to call the currently used lsp client entrypoint"
(interactive)
(if (featurep! +eglot)
(eglot-ensure)
(unless (bound-and-true-p lsp-mode)
(lsp-deferred))))