GNU bug report logs -
#73280
30.0.90; Eglot: eglot-workspace-configuration might not be found in .dir-locals.el
Previous Next
Full log
View this message in rfc822 format
>> ```elisp
>> ;; Set the major mode to be the first of the managed
>> ;; modes. This is the one the user started eglot in.
>> (setq major-mode (car (eglot--major-modes server)))
>> ```
This code is indeed hackish/heuristic by nature.
I guess the reason for it is that it needs to work regardless of the
buffers that use that server (which could all use different major
modes).
Alternatives:
- Get `eglot-workspace-configuration` "once and for all" when starting
the server, using the major mode currently active the buffer from
which the server's launch was triggered.
- Collect all the buffers currently using that server, take the set of
modes they currently use, fetch the corresponding
`eglot-workspace-configuration` values, and "merge them" (and if they
disagree, maybe emit a warning?).
But in the mean time, it seems `eglot-workspace-configuration` was
designed so that you can have a single setting shared for all modes, as
João mentions, so using nil (or `prog-mode`) instead of `ada-mode` or
`ada-ts-mode` seems like the better option.
Stefan
This bug report was last modified 272 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.