Skip to content

Quirks surrounding inlay hints #554

@tinder-tannerbennett

Description

@tinder-tannerbennett

Inlay hints provided by this extension pose a couple of issues.

  1. First, hints for tuple payload types look strange; the types are surrounded with parenthesis, like this:

    Screenshot 2023-06-13 at 4 54 23 PM
  2. Second, you can double click to insert these hints, and they are not all valid syntax.

Regarding the first one, I suppose SourceKit-LSP is giving us back bad data. I can open an issue on that repo if someone here can confirm that is a change Apple needs to make.

As for the second issue, I believe it may be possible to disable interacting with certain hints (via the vscode headers), or at the very least, disable inserting any of the hints at all. Best case scenario, we can make it so that double clicking on "partially valid" hints—such as type labels for closure arguments—inserts the required parenthesis surrounding the parameters, as well as the selected type, and disable interacting with tuple payload hints entirely.

I am happy to help with this if this is something you want to move forward with!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions