Function: eglot-booster--init

eglot-booster--init is a natively compiled function defined in eglot-booster.el.

Signature

(eglot-booster--init SERVER)

Documentation

Register eglot SERVER as boosted if it is.

Source Code

;; Defined in /nix/store/qd8jjgh8k2c0q3lbcy0sw59mn9h6khis-emacs-packages-deps/share/emacs/site-lisp/eglot-booster.el
(defun eglot-booster--init (server)
  "Register eglot SERVER as boosted if it is."
  (when-let ((server)
	     (proc (jsonrpc--process server))
	     (com (process-command proc))
	     (buf (process-buffer proc)))
    (unless (and (file-remote-p default-directory) eglot-booster-no-remote-boost)
      (if (file-remote-p default-directory) ; com will likely be /bin/sh -i or so
	  (when (seq-find (apply-partially #'string-search "emacs-lsp-booster")
			  (process-get proc 'remote-command)) ; tramp applies this
	    (with-current-buffer buf (setq eglot-booster-boosted t)))
	(when (string-search "emacs-lsp-booster" (car-safe com))
	  (with-current-buffer buf (setq eglot-booster-boosted t)))))))