Add python.ty.disableLanguageServices config#36
Conversation
|
@dhruvmanila Can you say more about why this is blocked on microsoft/vscode-python#25041? What are the next steps for getting this merged? |
|
This PR as is will work only for the ty extension i.e., when |
But couldn't we ship "our half" of the changes separately from coordianting the setting with pylance (meaning, users would have to toggle the settings manually for now) |
We could, that's what I'm recommending in astral-sh/ruff#18650 (comment) now that I'm looking at it again. |
dfba961 to
e7af1b3
Compare
| await runServer(); | ||
| }), | ||
| onDidChangeConfiguration(async (e: vscode.ConfigurationChangeEvent) => { | ||
| // TODO(dhruvmanila): Notify the server with `DidChangeConfigurationNotification` and let |
There was a problem hiding this comment.
I assume you plan to work on this as part of the client settings issue where you also want to explore a pull configuration model.
## Summary PR adding support for it in the VS Code extension: astral-sh/ty-vscode#36 This PR adds support for `python.ty.disableLanguageServices` to the ty language server by accepting this as server setting. This has the same issue as astral-sh/ty#282 in that it only works when configured globally. Fixing that requires support for multiple workspaces in the server itself. I also went ahead and did a similar refactor as the Ruff server to use "Options" and "Settings" to keep the code consistent although the combine functionality doesn't exists yet because workspace settings isn't supported in the ty server. ## Test Plan Refer to astral-sh/ty-vscode#36 for the test demo.
Summary
PR adding support for it in the language server: astral-sh/ruff#18230
This PR adds support for
python.ty.disableLanguageServicesin the extension to extract the value and pass it as server setting.Closes: #20
Test Plan
The video starts by the commented out
python.ty.disableLanguageServicesand you can see that there are inlay hints, hover support, diagnostics, etc.The hover content for
xisLiteral[1].Once it's set to true, the server restarts and inlay hints are gone, hover content is gone but the diagnostics still remain as expected.
Screen.Recording.2025-05-20.at.15.14.41.mov