-
Notifications
You must be signed in to change notification settings - Fork 25
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
Add configuration for basedpyright #106
Add configuration for basedpyright #106
Conversation
a96b27d
to
c91506c
Compare
@@ -228,6 +256,10 @@ Current LSP WORKSPACE should be passed in." | |||
(,(concat lsp-pyright-langserver-command ".disableOrganizeImports") lsp-pyright-disable-organize-imports t) | |||
(,(concat lsp-pyright-langserver-command ".disableTaggedHints") lsp-pyright-disable-tagged-hints t) | |||
(,(concat lsp-pyright-langserver-command ".typeCheckingMode") lsp-pyright-type-checking-mode) | |||
("basedpyright.analysis.inlayHints.variableTypes" lsp-pyright-basedpyright-inlay-hints-variable-types t) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does Pyright ignore settings it doesn't recognize? Have you tested this with Pyright? If this works, does Pyright make any guarantees it'll always ignore settings it doesn't recognize?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As you can see the S expression, lsp-register-custom-settings
does NOT associate settings with lsp-client
.
In order to get configuration, each client executable server executable sends workspace/configuration
request. lsp-mode
send the configuration ONLY if pyright
send request to get basedpyright.*
In the other word, if pyright
executable should require even java
section, lsp-mode
pass the setting for lsp-java
to pyright
.
If we need the proof that this configuration does not affect pyright
, we should see all lsp-client
in lsp-mode
, since all lsp-register-custom-settings
expressions can affect pyright
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In conclusion, as long as pyright
do not send request to get basedpyright.*
, lsp-mode
never send this configuration.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the clarification, just to aid my understanding, it's actually the server that sends the workspace/configuration
request, not the client right? This seems to be what the latest version of the protocol requires. The server requests a section, and then the client finds that section and then respond, is this right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, I was confused. You are right. The server sends workspace/configuraiton
request.
Hello, thanks for your maintenance.
Some configuration variables are added to basedpyright, so I added them.
https://docs.basedpyright.com/latest/configuration/language-server-settings/
Thanks!