Skip to content
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

Inlay hints should accept a list of files, not individual files #45380

Open
DanielRosenwasser opened this issue Aug 9, 2021 · 3 comments
Open
Labels
API Relates to the public API for TypeScript Domain: Inlay Hints Domain: TSServer Issues related to the TSServer Revisit An issue worth coming back to

Comments

@DanielRosenwasser
Copy link
Member

Inlay hints can be affected by edits in other files. That means you can end up in situations where 2 files can be edited side-by-side where one ends up with stale inlay hints.

image

To spare editors from making multiple requests, we should consider accepting a list of files instead of a single file as an argument.

Tracking on VS Code's side: microsoft/vscode#130430

@DanielRosenwasser DanielRosenwasser added API Relates to the public API for TypeScript Domain: TSServer Issues related to the TSServer Domain: Inlay Hints labels Aug 9, 2021
@DanielRosenwasser
Copy link
Member Author

If we do this, we'll have a mismatch in client/server for a bit. We can have the public API accept a list, and temporarily support individual files.

@Kingwl
Copy link
Contributor

Kingwl commented Aug 10, 2021

Sorry my bad. Would we just add a new command?

@DanielRosenwasser
Copy link
Member Author

We discussed it in our editor sync; it seems like there's not a huge win from changing TSServer - but at the least, we think editors should try to request on visible files (in an optimal order). We'll revisit if this comes up again.

@DanielRosenwasser DanielRosenwasser removed this from the TypeScript 4.4.1 (RC) milestone Aug 11, 2021
@DanielRosenwasser DanielRosenwasser added the Revisit An issue worth coming back to label Aug 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
API Relates to the public API for TypeScript Domain: Inlay Hints Domain: TSServer Issues related to the TSServer Revisit An issue worth coming back to
Projects
None yet
Development

No branches or pull requests

3 participants