Skip to content

refactor(language-service): enable host binding features - #60433

Closed
crisbeto wants to merge 1 commit into
angular:mainfrom
crisbeto:type-check-host-language-service
Closed

crisbeto wants to merge 1 commit into
angular:mainfrom
crisbeto:type-check-host-language-service

Conversation

@crisbeto

Copy link
Copy Markdown
Member

Reworks the language service to enable features like quick info and definitions inside host bindings.

Note: for the full range of language service features to work, the changes from angular/vscode-ng-language-service#2155 have to be released.

@crisbeto crisbeto added action: review The PR is still awaiting reviews from at least one requested reviewer target: major This PR is targeted for the next major release labels Mar 18, 2025
@angular-robot angular-robot Bot added the area: language-service Issues related to Angular's VS Code language service label Mar 18, 2025
@ngbot ngbot Bot added this to the Backlog milestone Mar 18, 2025
@crisbeto
crisbeto marked this pull request as ready for review March 18, 2025 08:38
@crisbeto
crisbeto requested a review from devversion March 18, 2025 08:38

@devversion devversion left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM, very clean! — just some nits/questions

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Can you quickly refresh me on when a host binding can be an "external resource"?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Right now it can't, because we don't produce the AST for bindings defined outside of the host object (e.g. through a spread operation). In theory it could be external if we started supporting type checking on dynamic host objects.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Is there a way for us to better assert that one is properly mapped into the host bindings?

@crisbeto crisbeto Mar 18, 2025 •

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Hmm, I guess we could check the actual start/end of the span, but I feel like that'll make the test a bit brittle because the position can move depending on the formatting.

Reworks the language service to enable features like quick info and definitions inside host bindings.

**Note:** for the full range of language service features to work, the changes from angular/vscode-ng-language-service#2155 have to be released.
@crisbeto
crisbeto force-pushed the type-check-host-language-service branch from 7fe9eba to 605f6f3 Compare March 18, 2025 11:41
@crisbeto crisbeto added action: merge The PR is ready for merge by the caretaker and removed action: review The PR is still awaiting reviews from at least one requested reviewer labels Mar 18, 2025
@pkozlowski-opensource

Copy link
Copy Markdown
Member

This PR was merged into the repository by commit 1dba2a8.

The changes were merged into the following branches: main

@angular-automatic-lock-bot

Copy link
Copy Markdown

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot Bot locked and limited conversation to collaborators Apr 18, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

action: merge The PR is ready for merge by the caretaker area: language-service Issues related to Angular's VS Code language service target: major This PR is targeted for the next major release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants