]> git.eshelyaron.com Git - emacs.git/commit
Eglot: fix M-x eglot-show-workspace-configuration (bug#61866)
authorJoão Távora <joaotavora@gmail.com>
Wed, 1 Mar 2023 01:22:15 +0000 (01:22 +0000)
committerJoão Távora <joaotavora@gmail.com>
Wed, 1 Mar 2023 01:22:40 +0000 (01:22 +0000)
commit97a83ff31fa9e3e2455d3168a789649dcd20a635
tree87343af30beb439780c1e66063ce13359326e0f0
parent48a0804d10d02c2aa94664e0db8315239950225f
Eglot: fix M-x eglot-show-workspace-configuration (bug#61866)

Now consult .dir-locals.el every time the workspace configuration is
needed:

- workspace/configuration server request
- workspace/didChangeConfiguration signal
- M-x eglot-show-workspace-configuration

The major-mode/hack-dir-local-variables-non-file-buffer trick is used.
When there is more than one, the server connection's "main" major mode
is used to find the relevant .dir-locals.el section.

* lisp/progmodes/eglot.el (eglot--lookup-mode): Fix docstring.
(eglot--connect): Simplify.
(eglot-show-workspace-configuration): Fix.
(eglot--workspace-configuration): Remove.
(eglot--workspace-configuration-plist): Rework.
(eglot-handle-request): Simplify.
lisp/progmodes/eglot.el