`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.
10 lines
279 B
EmacsLisp
10 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))))
|