Also run a hook when connected
* eglot-tests.el (eglot--with-dirs-and-files)
(eglot--make-file-or-dirs, eglot--call-with-dirs-and-files)
(eglot--find-file-noselect): New helpers.
(auto-detect-running-server, auto-reconnect): New actual tests.
* eglot.el (eglot-connect): Run hook when connected
(eglot-connect-hook): New variable
* .travis.yml: Use rust stable and install rls
* README.md: Update mention of automated tests
:publishDiagnostics `(:relatedInformation :json-false))
:experimental (eglot--obj)))
+(defvar eglot-connect-hook nil "Hook run after connecting in `eglot--connect'.")
+
(defun eglot--connect (project managed-major-mode short-name contact interactive)
"Connect for PROJECT, MANAGED-MAJOR-MODE, SHORT-NAME and CONTACT.
INTERACTIVE is t if inside interactive call."
(null eglot-autoreconnect)))))))
(setf (eglot--short-name proc) short-name)
(push proc (gethash project eglot--processes-by-project))
+ (run-hook-with-args 'eglot-connect-hook proc)
(erase-buffer)
(read-only-mode t)
(cl-destructuring-bind (&key capabilities)