-
Notifications
You must be signed in to change notification settings - Fork 23
Unable to disable plugin #11
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
Comments
Hmm, this is odd indeed, I can reproduce this issue even when setting @hookimpl
def pylsp_settings():
return {
"plugins": {
"ruff": {
"enabled": False,
},
}
} in the package itself. Do you have any idea @ccordoba12? I think pylsp is messing up here |
I checked this and (I don't know why), third-party plugins can only be disabled by passing their module names. So, the above configuration should be:
That works for me in Spyder. |
Ok, I understood what happens. Plugins are enabled/disabled according to their entry point names. In this case, that name is python-lsp-ruff/pyproject.toml Lines 23 to 24 in fc6adcd
So, there are two possible solutions for this:
|
Thanks for the help @ccordoba12! I'd rather stick to 1. to keep the plugin configurations consistent. Unfortunately I am unfamiliar with [project.entry-points.pylsp]
ruff = "pylsp_ruff.ruff_lint" doesn't fix it on my side. Am I missing something? |
Yes, changing the name is not enough. Afterwards, you need to uninstall the plugin and reinstall it again in development mode for the change to take effect. I tested it locally and it works for me with Spyder, so I'll submit a PR for it. |
Right, that was it. Thanks for the help! |
Setting enabled key here does not affect anything.
However, setting ignore key causes ruff to ignore the specified key.
pylsp settings
Without ignore key

With ignore key

The text was updated successfully, but these errors were encountered: