vscode icon indicating copy to clipboard operation
vscode copied to clipboard

Should `vscode.executeInlayHintProvider` gain `itemResolveCount` as an argument?

Open DavisVaughan opened this issue 7 months ago • 1 comments

API commands like vscode.executeCodeActionProvider and vscode.executeCompletionItemProvider have an itemResolveCount argument:

https://github.com/microsoft/vscode/blob/70107d1562c0c496e4bc8bbe1ba4607ee56261fe/src/vs/workbench/api/common/extHostApiCommands.ts#L271-L277

https://github.com/microsoft/vscode/blob/70107d1562c0c496e4bc8bbe1ba4607ee56261fe/src/vs/workbench/api/common/extHostApiCommands.ts#L308-L315

This is used to do the 2nd half of these LSP language features, where you sometimes need to "resolve" the items in a more expensive way.

I noticed that vscode.executeInlayHintProvider does not have this argument, meaning that the Inlay Hint Resolve bit can't be called in the same way: https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#inlayHint_resolve

https://github.com/microsoft/vscode/blob/70107d1562c0c496e4bc8bbe1ba4607ee56261fe/src/vs/workbench/api/common/extHostApiCommands.ts#L364-L370

Would it make sense to add itemResolveCount to vscode.executeInlayHintProvider to support this? Or maybe some other hook like vscode.resolveInlayHintProvider?

I assume this might be somewhat hard to do performantly in vscode.executeInlayHintProvider itself, because you probably want to show a lot of inlay hints but only resolve one when the user double clicks on it to retrieve delayed textEdits.

DavisVaughan avatar May 20 '25 14:05 DavisVaughan

This feature request is now a candidate for our backlog. The community has 60 days to upvote the issue. If it receives 20 upvotes we will move it to our backlog. If not, we will close it. To learn more about how we handle feature requests, please see our documentation.

Happy Coding!

This feature request has not yet received the 20 community upvotes it takes to make to our backlog. 10 days to go. To learn more about how we handle feature requests, please see our documentation.

Happy Coding!

:slightly_frowning_face: In the last 60 days, this feature request has received less than 20 community upvotes and we closed it. Still a big Thank You to you for taking the time to create this issue! To learn more about how we handle feature requests, please see our documentation.

Happy Coding!