Function: eglot-booster-mode

eglot-booster-mode is an interactive and natively compiled function defined in eglot-booster.el.

Signature

(eglot-booster-mode &optional ARG)

Documentation

Minor mode which boosts plain eglot server programs with emacs-lsp-booster.

The emacs-lsp-booster program must be compiled and available on variable exec-path(var)/exec-path(fun). Only local stdin/out-based lsp servers can be boosted.

This is a global minor mode. If called interactively, toggle the Eglot-Booster mode mode. If the prefix argument is positive, enable the mode, and if it is zero or negative, disable the mode.

If called from Lisp, toggle the mode if ARG is toggle. Enable the mode if ARG is nil, omitted, or is a positive number. Disable the mode if ARG is a negative number.

To check whether the minor mode is enabled in the current buffer, evaluate (default-value \=eglot-booster-mode)'.

The mode's hook is called both when the mode is enabled and when it is disabled.

Key Bindings

This command is not in any keymaps.

Source Code

;; Defined in /nix/store/qd8jjgh8k2c0q3lbcy0sw59mn9h6khis-emacs-packages-deps/share/emacs/site-lisp/eglot-booster.el
;;;###autoload
(define-minor-mode eglot-booster-mode
  "Minor mode which boosts plain eglot server programs with emacs-lsp-booster.
The emacs-lsp-booster program must be compiled and available on
variable `exec-path'.  Only local stdin/out-based lsp servers can
be boosted."
  :global t
  :group 'eglot
  (cond
   (eglot-booster-mode
    (unless (executable-find "emacs-lsp-booster")
      (setq eglot-booster-mode nil)
      (user-error "The emacs-lsp-booster program is not installed"))
    (unless eglot-booster-io-only
      (advice-add 'jsonrpc--json-read :around #'eglot-booster--jsonrpc--json-read))
    (advice-add 'eglot--connect :filter-args #'eglot-booster--wrap-contact)
    (add-hook 'eglot-server-initialized-hook #'eglot-booster--init))
   (t
    (advice-remove 'jsonrpc--json-read #'eglot-booster--jsonrpc--json-read)
    (advice-remove 'eglot--connect #'eglot-booster--wrap-contact)
    (remove-hook 'eglot-server-initialized-hook #'eglot-booster--init))))