GNU bug report logs -
#60570
29.0.60; Eglot+pyright freeze Emacs when edit a single file in Home director
Previous Next
Full log
View this message in rfc822 format
João Távora <joaotavora <at> gmail.com> writes:
> 5. Stop opening Python scripts in your $HOME *and* auto-activating Eglot
> in them. You may be auto-activating Eglot with eglot-ensure, but this
> is not recommended precisely because it carries with risks like this.
[...]
>
> I recommend restricting your use of eglot-ensure. It's very overrated
> functionality. M-x eglot will probably only need to be typed once
> or twice in a typical Emacs session.
I use a custom function eglot-soft-ensure which only enables eglot if
there is already a LSP server running for the current project. This way
eglot doesn’t auto-start in which files that I don’t want it to start.
(defun eglot-soft-ensure ()
"Turn on eglot when there is an exising server for the current project."
(require 'eglot)
(when-let* ((project (project-current))
(eglot-server (gethash project eglot--servers-by-project)))
(eglot-ensure)))
Yuan
This bug report was last modified 2 years and 216 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.