[angular/angular] feat(language-service): add Angular-specific Inlay Hints (LSP 3.17) (PR #66755)
DRANK

# PR: feat(language-service): add Angular-specific Inlay Hints (LSP 3.17) > **Note:** This PR supersedes #66731 which was closed for rebasing. ## ⚠️ Dependency This PR depends on #66734 (feat(language-server): add shared workspace/configuration utilities) and must be merged after that PR. **Merge Order:** 1. First merge #66734 (workspace/configuration infrastructure) 2. Then this PR can be merged ## Description Implements comprehensive Angular-specific Inlay Hints for the Angular Language Service, providing inline type annotations directly in template code. This feature achieves **full parity with TypeScript's inlay hints** while adding Angular-specific capabilities. --- ## 📍 Inlay Hints by Location This PR implements **13 hint locations** with full configuration: 1. `@for` loop variables 2. `@if`/`@else if` alias variables 3. `@let` declarations 4. Template references (`#ref`) 5. Event bindings (`(event)`) 6. Property bindings (`[property]`) 7. Two-way bindings (`[(model)]`) 8. Pipes (`| pipe`) 9. Function calls (parameter names) 10. Arrow functions 11. `@switch` expressions 12. `@defer` triggers 13. Host bindings (`@HostListener`/`@HostBinding`/`host:`) --- ## 🎯 TypeScript Parity Summary | TypeScript Option | Angular Implementation | Status | |---|---|---| | `includeInlayVariableTypeHints` | `forLoopVariableTypes`, `ifAliasTypes`, `letDeclarationTypes`, `referenceVariableTypes` | ✅ | | `includeInlayVariableTypeHintsWhenTypeMatchesName` | `variableTypeHintsWhenTypeMatchesName` | ✅ | | `includeInlayParameterNameHints` | `parameterNameHints` | ✅ | | `includeInlayParameterNameHintsWhenArgumentMatchesName` | `parameterNameHintsWhenArgumentMatchesName` | ✅ | | `includeInlayFunctionParameterTypeHints` | `arrowFunctionParameterTypes` | ✅ | | `includeInlayFunctionLikeReturnTypeHints` | `arrowFunctionReturnTypes` | ✅ | | `interactiveInlayHints` | `interactiveInlayHints` | ✅ | --- ## 🧪 Test Coverage - **95+ unit tests** covering all hint types - **LSP integration tests** for end-to-end testing - **Edge cases**: nested blocks, generics, overloads, signals, required inputs --- ## ⚙️ Configuration Configuration is fetched dynamically via LSP `workspace/configuration` request using the shared utilities from #66734, allowing settings to take effect immediately without restarting the language server. --- ## 🔄 Breaking Changes None --- ## 📚 Related Issues Closes #66730 (feat: Angular-specific Inlay Hints) --- ## 🤖 AI Disclosure This PR was developed using Claude Opus 4.5 AI assistant under human orchestration and review by @kbrilla.

github.com
Related Topics: Angular
1 comments