Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement workspace/didChangeConfiguration #29

Closed
tromey opened this issue Jun 23, 2018 · 3 comments
Closed

Implement workspace/didChangeConfiguration #29

tromey opened this issue Jun 23, 2018 · 3 comments

Comments

@tromey
Copy link
Contributor

tromey commented Jun 23, 2018

At least RLS uses workspace/didChangeConfiguration; see https://github.com/rust-lang-nursery/rls#configuration.

Maybe configuration could be handled similarly to .dir-locals.el somehow - just a file with a sexp in it that is passed to the LSP server when it changes?

@joaotavora
Copy link
Owner

.dir-locals.el sounds very good, and I would probably use it directly, i.e. I would make a dump JSON object out of some eglot-workspace-confliguration variable which could be an alist with a slightly sophisticated safe-local-variable property`.

The only drawback is that both LSP and project.el support multiple roots (this isn't implemented yet). What to do in that situation? There aren't "project-local variables yet". But I would worry about this later and go with dir-locals.el.

What do you think, wanna give it a shot? :-)

joaotavora added a commit that referenced this issue Jun 23, 2018
* README.md (Supported Protocol Features, Commands and
keybindings): mention workspace/didChangeConfiguration.

* eglot.el (eglot-server-initialized-hook): New hook.
(eglot--connect): Run it.
(eglot-workspace-configuration): New variable.
(eglot-signal-didChangeConfiguration): New command.
@joaotavora
Copy link
Owner

What do you think, wanna give it a shot? :-)

Actually, I had a look and this looked trivial so I tried it myself. 100% untested (and still missing the safe-local-variable bit`. But tell me if it works.

@joaotavora
Copy link
Owner

ping? @tromey do you have any comments on the fix I proposed for this issue?

bhankas pushed a commit to bhankas/emacs that referenced this issue Sep 18, 2022
… (#40)

* README.md (Supported Protocol Features, Commands and
keybindings): mention workspace/didChangeConfiguration.

* eglot.el (eglot-server-initialized-hook): New hook.
(eglot--connect): Run it.
(eglot-workspace-configuration): New variable.
(eglot-signal-didChangeConfiguration): New command.
bhankas pushed a commit to bhankas/emacs that referenced this issue Sep 19, 2022
… (#40)

* README.md (Supported Protocol Features, Commands and
keybindings): mention workspace/didChangeConfiguration.

* eglot.el (eglot-server-initialized-hook): New hook.
(eglot--connect): Run it.
(eglot-workspace-configuration): New variable.
(eglot-signal-didChangeConfiguration): New command.
bhankas pushed a commit to bhankas/emacs that referenced this issue Sep 19, 2022
* README.md (Supported Protocol Features, Commands and
keybindings): mention workspace/didChangeConfiguration.

* eglot.el (eglot-server-initialized-hook): New hook.
(eglot--connect): Run it.
(eglot-workspace-configuration): New variable.
(eglot-signal-didChangeConfiguration): New command.
#29: joaotavora/eglot#29
(#40: joaotavora/eglot#40
jollaitbot pushed a commit to sailfishos-mirror/emacs that referenced this issue Oct 12, 2022
* README.md (Supported Protocol Features, Commands and
keybindings): mention workspace/didChangeConfiguration.

* eglot.el (eglot-server-initialized-hook): New hook.
(eglot--connect): Run it.
(eglot-workspace-configuration): New variable.
(eglot-signal-didChangeConfiguration): New command.

GitHub-reference: close joaotavora/eglot#29
GitHub-reference: close joaotavora/eglot#40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants