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

feat: Introduce InlayHints #532

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

chadhietala
Copy link
Contributor

This introduces InlayHints to the Glint language server.

As part of this I noticed that for the extension we were not massaging TypeScript and JavaScript preferences and formatting configs correctly. I have largely borrowed how vscode does this re-mapping for TypeScript.

Copy link
Member

@dfreeman dfreeman left a comment

Choose a reason for hiding this comment

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

I feel silly having to ask, but I pulled this branch to try it out and I can't seem to get any inlays in .gts files. I've cranked my inlay settings up to 11 in my user settings, and I see everything appearing in .ts files from the built-in TS tooling, but nothing in any of the GTS files.

I saw the gif you posted of this working in a GTS file in Discord—is there an additional setting I'm missing?

Comment on lines +394 to +404
this.getTransformedOffsetsFromPositions(
uri,
{
line: range.start.line,
character: range.start.character,
},
{
line: range.end.line,
character: range.end.character,
}
);
Copy link
Member

Choose a reason for hiding this comment

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

Can this just be getTransformedOffsetsFromPositions(uri, range.start, range.end)?

{
"type": "node",
"request": "launch",
"name": "Debug Current Test File",
Copy link
Member

Choose a reason for hiding this comment

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

Nice!

@dfreeman dfreeman added the enhancement New feature or request label Mar 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants