-
Notifications
You must be signed in to change notification settings - Fork 2.3k
fix(pyright): command :LspPyrightOrganizeImports fails #3971
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
Conversation
10b9dbc
to
1ec99a0
Compare
Ok, I did not realize that and that fails because "basedpyright.organizeimports" is a private command (not advertised via capabilities). Whereas So, we can merge this after:
|
@justinmk what about the failing linting checks, is there a way to disable them for the relevant LoC?
|
To pass the lint you can change this line nvim-lspconfig/.github/ci/lint.sh Line 56 in 408cf07
to:
i'll think about how to make it more granular later. |
@justinmk rebased and added the lint exclusion. P.S: added the comments. |
Language server `pyright` does not support command `pyright.organizeimports`. This command may require a client extension.
Thanks for your help. I updated the description to be 100% clear, please consider that next time. |
Problem:
The
pyright.organizeimports
is private, so client:exec_cmd()fails because it refuses to run commands that are not advertised
as capabilities.
Solution:
Call client.request() to side-step the check in client:exec_cmd().
YOLO