Skip to content

Resolve code lenses, request inlay hints.#195

Merged
DanielRosenwasser merged 1 commit intomainfrom
testFormattingAndResolveCodeLenses
Feb 23, 2026
Merged

Resolve code lenses, request inlay hints.#195
DanielRosenwasser merged 1 commit intomainfrom
testFormattingAndResolveCodeLenses

Conversation

@DanielRosenwasser
Copy link
Member

I noticed we weren't requesting anything for formatting, and weren't actually resolving the code lenses.

Disclaimer: I haven't tested it locally yet.

Copy link
Member

@jakebailey jakebailey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems fine?

const inlayHintsPromise = request("textDocument/inlayHint", {
textDocument: { uri: openFileUri },
// TODO - this is still a hack.
// Could just move it to the end after we've iterated through the file.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this a hack?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because clients and servers are supposed to agree not to index past any given line's length. Instead of counting the lines of the file up front and calculating a line map, I just used the character position.

@DanielRosenwasser DanielRosenwasser merged commit 6b554b7 into main Feb 23, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants