Add ty.inlayHints.variableTypes setting#112
Merged
dhruvmanila merged 2 commits intomainfrom Aug 7, 2025
Merged
Conversation
Member
Author
|
Note that the default value is |
MichaReiser
reviewed
Aug 7, 2025
package.json
Outdated
| "type": "string" | ||
| }, | ||
| "ty.inlayHints.variableTypes": { | ||
| "default": false, |
Member
There was a problem hiding this comment.
Can you tell me more about the reason for defaulting to false?
Member
Author
There was a problem hiding this comment.
I don't have a strong reason except for the fact that it's disabled by default in the Python extension as well.
Member
Author
There was a problem hiding this comment.
I'm going to change the default back to true to avoid any breakage, we can decide later if it should be off by default or not.
MichaReiser
approved these changes
Aug 7, 2025
dhruvmanila
added a commit
to astral-sh/ruff
that referenced
this pull request
Aug 7, 2025
## Summary This PR adds a new `ty.inlayHints.variableTypes` server setting to configure ty to include / exclude inlay hints at variable position. Currently, we only support inlay hints at this position so this option basically translates to enabling / disabling inlay hints for now :) The VS Code extension PR is astral-sh/ty-vscode#112. closes: astral-sh/ty#472 ## Test Plan Add E2E tests.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR adds the
ty.inlayHints.variableTypesas added in the server in astral-sh/ruff#19780.Test Plan
Screen.Recording.2025-08-07.at.18.36.18.mov