feat(language-service): add Angular-specific Inlay Hints (LSP 3.17)#66731
feat(language-service): add Angular-specific Inlay Hints (LSP 3.17)#66731kbrilla wants to merge 1 commit intoangular:mainfrom
Conversation
|
Will post some screenshots and tabral with VS Code extension later and will try to create stackblitz demo. |
2058ff5 to
9f669cf
Compare
|
Really cool! Would the readme be updated to include information about how to enable and configure this? I don’t see where any of the listed configuration options are used in the client or server. Should these be part of the configuration settings in the package.json? |
| // 1. Get TypeScript's inlay hints (for TS code in .ts files) | ||
| // This includes parameter names, return types, variable types, etc. | ||
| try { | ||
| const tsHints = languageService.provideInlayHints( |
There was a problem hiding this comment.
Are these filtered on the client side then? Or do we need to be sure to pass the client config to the server?
Are inlay hints also not additive? We had to include the TS inlay hints because our hints from our server aren’t combined with hints from other hint providers (eg ts server)?
41bbbf4 to
b42cde7
Compare
This commit adds infrastructure for features to request configuration from the VS Code client using the LSP workspace/configuration protocol. This is the preferred approach over CLI arguments because: 1. Configuration changes take effect immediately without restarting 2. Supports per-workspace and per-folder configuration 3. VS Code automatically merges settings from different scopes: - Default settings - User settings (global) - Workspace settings - Workspace folder settings - Language-specific settings The new utilities include: - getWorkspaceConfiguration: Request multiple config sections at once - getConfigurationSection: Convenience wrapper for single sections - flattenConfiguration: Flatten nested config to dot-notation keys This infrastructure will be used by: - Inlay hints feature (PR angular#66731) - Document symbols feature (PR angular#66690)
b42cde7 to
33f8b6e
Compare
🔗 Dependency UpdateThis PR now depends on #66734 (feat(language-server): add shared workspace/configuration utilities). Changes in this update:
Merge Order:
The PR has been rebased onto the |
33f8b6e to
d97488b
Compare
|
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |













PR: feat(language-service): add Angular-specific Inlay Hints (LSP 3.17)
This PR depends on #66734 (feat(language-server): add shared workspace/configuration utilities) and must be merged after that PR.
Merge Order:
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:
@forloop variables@if/@else ifalias variables@letdeclarations#ref)(event))[property])[(model)])| pipe)@switchexpressions@defertriggers@HostListener/@HostBinding/host:)🎯 TypeScript Parity Summary
includeInlayVariableTypeHintsforLoopVariableTypes,ifAliasTypes,letDeclarationTypes,referenceVariableTypesincludeInlayVariableTypeHintsWhenTypeMatchesNamevariableTypeHintsWhenTypeMatchesNameincludeInlayParameterNameHintsparameterNameHintsincludeInlayParameterNameHintsWhenArgumentMatchesNameparameterNameHintsWhenArgumentMatchesNameincludeInlayFunctionParameterTypeHintsarrowFunctionParameterTypesincludeInlayFunctionLikeReturnTypeHintsarrowFunctionReturnTypesinteractiveInlayHintsinteractiveInlayHints🧪 Test Coverage
⚙️ Configuration
Configuration is fetched dynamically via LSP
workspace/configurationrequest 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.