By autoloading the add-hook form and the eglot--setup-rls-idiosyncrasies
definition, a user can start rust-mode without loading eglot.el along
with it.
* eglot.el (rust-mode-hook)
(eglot--setup-rls-idiosyncrasies): Wrap in autoloaded progn.
(and (equal "Indexing" what) done))))
;;;###autoload
-(add-hook 'rust-mode-hook 'eglot--setup-rls-idiosyncrasies)
-
-;;;###autoload
-(defun eglot--setup-rls-idiosyncrasies ()
- "RLS needs special treatment..."
- (add-hook 'eglot--ready-predicates 'eglot--rls-probably-ready-for-p t t))
+(progn
+ (add-hook 'rust-mode-hook 'eglot--setup-rls-idiosyncrasies)
+ (defun eglot--setup-rls-idiosyncrasies ()
+ "Prepare `eglot' to deal with RLS's special treatment."
+ (add-hook 'eglot--ready-predicates 'eglot--rls-probably-ready-for-p t t)))
(cl-defun eglot--server-window/progress
(process &key id done title message &allow-other-keys)