-
Notifications
You must be signed in to change notification settings - Fork 199
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
workspace configuration options not working with pyls #590
Comments
Looks like {":pyls":{":plugins":{":pydocstyle":{":enabled":true},":jedi_completion":{":fuzzy":true,":follow_builtin_imports":false}}}} which is what's getting passed to the server and causing the configuration to fail. I'll examine further. |
So turns out the issue is entirely just because I'm using plists (more specifically using keywords for keys). If I change to symbols then everythings working fine. (setq eglot-workspace-configuration
'((pyls
(plugins
(pydocstyle
(enabled . t))
(jedi_completion
(fuzzy . t)
(follow_builtin_imports . :json-false)))))) I feel like the README needs to be updated. |
I am unable to reproduce this. I installed all the Python libraries mentioned above on Debian GNU/Linux stable (at a system level), then I did
And then I ran Are you still seeing this? If yes, could you please tell me what version of pyls, Emacs and eglot you are using? Thanks! |
Here are the packages I installed, if anyone wants to try reproducing this:
|
@skangas it should work when flymake reports the same warnings as running I tested it with the configuration you posted above, and did not see those warnings via eglot. But when I use symbols instead of keywords (except for the |
I don't think I understand this point. Could you explain what you mean by "it should work", more specifically what is "it" and how should it work?
Thanks for testing! The OP suggests that you should use symbols instead of keywords. If I understand you correctly, you are saying that it is the other way around? In other words: the instructions in |
Yup, if they aren't, it's a question of fixing them, I think. |
Sorry, by "it should work" I meant that the configuration for enabling pydocstyle should work. The pydocstyle plugin works when the lsp server is reporting the pydocstyle warnings.
No. think I think there is a bug when serializing nested keywords:
is being serialized as
|
@joaotavora should the Lines 2013 to 2017 in ea530b6
Edit: sorry, that doesn't seem to be the case. |
Perhaps more clear, with:
After starting eglot, I see this in the eglot events buffer:
|
Yes, this is definitely a bug. Overall, this is one of the most fragile aspects of Eglot. The syntax in the variable is hard to get right. Partially because it's very LSP-loose by nature, but also there are no safeguards at all in Eglot. It is also an aspect that should be reasonably easy to fix, by introducing run-time checks on the structure of the variable and/or some automated tests. Thanks for your investigation @fbergroth if you come up with a fix, it'd be awesome. Feel free to fix/overhaul the README.md instructions, too. |
…-configuration * eglot.el (eglot--dump-configuration): Add function (eglot-signal-didChangeConfiguration): Dump configuration recursively
…guration * eglot.el (eglot--dump-configuration): Add function (eglot-signal-didChangeConfiguration): Dump configuration recursively
…ce configuration" This reverts commit 127234d.
…encoding to json
Also tweak eglot-show-workspace-configuration a bit. * README.md (Workspace configuration): Rework. * eglot.el (eglot-show-workspace-configuration): Rework.
Also tweak eglot-show-workspace-configuration a bit. * README.md (Workspace configuration): Rework. * eglot.el (eglot-show-workspace-configuration): Rework. (eglot--workspace-configuration-plist): New helper.
* README.md (eglot-workspace-configuration): Rework.
OK. Here's the current status. I think the Over at #790, @fbergroth has a WIP pull request that adds some sanity-checking functionality which may be useful. But each of those are tangent functionality in my opinion, and I think this issue (#590) is now resolved. |
Suggested-by: Augusto Stoffel <[email protected]> * NEWS.md: Mention change. * README.md (eglot-workspace-configuration): Update yet again. * eglot.el (eglot--workspace-configuration-plist): Noop if already a plist. (eglot-handle-request workspace/configuration): Use eglot--workspace-configuration-plist.
Suggested-by: Augusto Stoffel <[email protected]> * NEWS.md: Mention change. * README.md (eglot-workspace-configuration): Update yet again. Update examples to use pylsp. * eglot.el (eglot--workspace-configuration-plist): Noop if already a plist. (eglot-handle-request workspace/configuration): Use eglot--workspace-configuration-plist. (eglot-workspace-configuration): Document variable.
…pace configurations Also see joaotavora/eglot#790, joaotavora/eglot#1033.
…ion again Also tweak eglot-show-workspace-configuration a bit. * README.md (Workspace configuration): Rework. * eglot.el (eglot-show-workspace-configuration): Rework. (eglot--workspace-configuration-plist): New helper.
…out workspace configuration * README.md (way): Adjust. * eglot.el (json): Don't require needlessly. (eglot-show-workspace-configuration): Don't depend on json-mode.
… Allow eglot-workspace-configuration to be a plist Suggested-by: Augusto Stoffel <[email protected]> * NEWS.md: Mention change. * README.md (eglot-workspace-configuration): Update yet again. Update examples to use pylsp. * eglot.el (eglot--workspace-configuration-plist): Noop if already a plist. (eglot-handle-request workspace/configuration): Use eglot--workspace-configuration-plist. (eglot-workspace-configuration): Document variable.
…pace configurations Also see joaotavora/eglot#790, joaotavora/eglot#1033.
…ion again Also tweak eglot-show-workspace-configuration a bit. * README.md (Workspace configuration): Rework. * eglot.el (eglot-show-workspace-configuration): Rework. (eglot--workspace-configuration-plist): New helper.
…out workspace configuration * README.md (way): Adjust. * eglot.el (json): Don't require needlessly. (eglot-show-workspace-configuration): Don't depend on json-mode.
… Allow eglot-workspace-configuration to be a plist Suggested-by: Augusto Stoffel <[email protected]> * NEWS.md: Mention change. * README.md (eglot-workspace-configuration): Update yet again. Update examples to use pylsp. * eglot.el (eglot--workspace-configuration-plist): Noop if already a plist. (eglot-handle-request workspace/configuration): Use eglot--workspace-configuration-plist. (eglot-workspace-configuration): Document variable.
Also see #790, #1033. #590: joaotavora/eglot#590 #790: joaotavora/eglot#790 #1033: joaotavora/eglot#1033
Also tweak eglot-show-workspace-configuration a bit. * README.md (Workspace configuration): Rework. * eglot.el (eglot-show-workspace-configuration): Rework. (eglot--workspace-configuration-plist): New helper. #590: joaotavora/eglot#590
* README.md (way): Adjust. * eglot.el (json): Don't require needlessly. (eglot-show-workspace-configuration): Don't depend on json-mode. #790: joaotavora/eglot#790 #590: joaotavora/eglot#590
Suggested-by: Augusto Stoffel <[email protected]> * NEWS.md: Mention change. * README.md (eglot-workspace-configuration): Update yet again. Update examples to use pylsp. * eglot.el (eglot--workspace-configuration-plist): Noop if already a plist. (eglot-handle-request workspace/configuration): Use eglot--workspace-configuration-plist. (eglot-workspace-configuration): Document variable. #590: joaotavora/eglot#590 #790: joaotavora/eglot#790 #1033: joaotavora/eglot#1033
Also see joaotavora/eglot#790, joaotavora/eglot#1033. GitHub-reference: per joaotavora/eglot#590
Also tweak eglot-show-workspace-configuration a bit. * README.md (Workspace configuration): Rework. * eglot.el (eglot-show-workspace-configuration): Rework. (eglot--workspace-configuration-plist): New helper. GitHub-reference: per joaotavora/eglot#590
* README.md (way): Adjust. * eglot.el (json): Don't require needlessly. (eglot-show-workspace-configuration): Don't depend on json-mode. GitHub-reference: per joaotavora/eglot#790 GitHub-reference: per joaotavora/eglot#590
Suggested-by: Augusto Stoffel <[email protected]> * NEWS.md: Mention change. * README.md (eglot-workspace-configuration): Update yet again. Update examples to use pylsp. * eglot.el (eglot--workspace-configuration-plist): Noop if already a plist. (eglot-handle-request workspace/configuration): Use eglot--workspace-configuration-plist. (eglot-workspace-configuration): Document variable. GitHub-reference: per joaotavora/eglot#590 GitHub-reference: per joaotavora/eglot#790 GitHub-reference: per joaotavora/eglot#1033
Also see joaotavora/eglot#790, joaotavora/eglot#1033. GitHub-reference: per joaotavora/eglot#590
Also tweak eglot-show-workspace-configuration a bit. * README.md (Workspace configuration): Rework. * eglot.el (eglot-show-workspace-configuration): Rework. (eglot--workspace-configuration-plist): New helper. GitHub-reference: per joaotavora/eglot#590
* README.md (way): Adjust. * eglot.el (json): Don't require needlessly. (eglot-show-workspace-configuration): Don't depend on json-mode. GitHub-reference: per joaotavora/eglot#790 GitHub-reference: per joaotavora/eglot#590
Suggested-by: Augusto Stoffel <[email protected]> * NEWS.md: Mention change. * README.md (eglot-workspace-configuration): Update yet again. Update examples to use pylsp. * eglot.el (eglot--workspace-configuration-plist): Noop if already a plist. (eglot-handle-request workspace/configuration): Use eglot--workspace-configuration-plist. (eglot-workspace-configuration): Document variable. GitHub-reference: per joaotavora/eglot#590 GitHub-reference: per joaotavora/eglot#790 GitHub-reference: per joaotavora/eglot#1033
I'm trying to configure pyls to use the pydocstyle plugin (which is disabled by default) but it doesn't seem to be working :-(.
I've been testing use this python file.
Setup Instructions
If I run
(message (json-encode eglot-workspace-configuration))
I get:which all appears to be correct to me :/.
stderr
It looks like eglot is sending the workspace configuration with each key containing a leading
:
, is this not how we're supposed to set configurations?Server Transcript
Version Information
GNU Emacs 27.1 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.22, cairo version 1.17.3) of 2020-08-28
20210110.1646
Linux mk-desktop 5.9.14-arch1-1 #1 SMP PREEMPT Sat, 12 Dec 2020 14:37:12 +0000 x86_64 GNU/Linux
The text was updated successfully, but these errors were encountered: