-
-
Notifications
You must be signed in to change notification settings - Fork 933
Open
Labels
Description
Thank you for the bug report
- I am using the latest version of
lsp-mode
related packages.I checked FAQ and Troubleshooting sectionsYou may also try reproduce the issue using clean environment using the following command:M-x lsp-start-plain
To pick up a draggable item, press the space bar. While dragging, use the arrow keys to move the item. Press space again to drop the item in its new position, or press escape to cancel.
Bug description
Commit 782e1dc by @LaurenceWarne introduced a regression and broke mypy completely for me. That happened, because I had set the same lsp-server settings that the commit modified.
Further research shown that there's nothing wrong with the commit per se, instead the problem is in how lsp-mode
handles lsp-server settings. Whatever user sets with lsp-register-custom-settings
is being overwritten by lsp-mode
, leading to random problems like this one.
Instead lsp-register-custom-settings
should not overwrite settings that a user has set.
Steps to reproduce
- Create
/tmp/.emacs
with the following content:(package-initialize) (use-package lsp-mode :config (setq lsp-log-io t) (lsp-register-custom-settings '(("pylsp.plugins.pylsp_mypy.enabled" t t))))
- Start emacs as
emacs -Q -l /tmp/.emacs test.py
- Start
lsp-mode
in thetest.py
buffer by evaluating M-x lsp - Switch to buffer with communication log by evaluating M-x lsp-workspace-show-log
- Search for word
pylsp_mypy
and look at the value ofenabled
just below thepylsp_mypy
line
Expected behavior
It is true
.
Which Language Server did you use?
pylsp
OS
Linux
Error callstack
No response
Anything else?
No response
Metadata
Metadata
Assignees
Labels
Type
Projects
Milestone
Relationships
Development
Select code repository
Activity
treewide: do not overwrite lsp-client-settings changed by user
Hi-Angel commentedon Apr 8, 2024
Should be fixed by #4421
treewide: do not overwrite lsp-client-settings changed by user
treewide: do not overwrite lsp-client-settings changed by user
treewide: do not overwrite lsp-client-settings changed by user
treewide: do not overwrite lsp-client-settings changed by user
treewide: do not overwrite lsp-client-settings changed by user
treewide: do not overwrite lsp-client-settings changed by user