Skip to content

Commit caca5a7

Browse files
committed
feat: add inlay hints for lambda parameter types
Signed-off-by: Fred Bricon <[email protected]>
1 parent f68c986 commit caca5a7

File tree

3 files changed

+11
-2
lines changed

3 files changed

+11
-2
lines changed

README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -214,6 +214,7 @@ The following settings are supported:
214214
* `java.configuration.workspaceCacheLimit` : The number of days (if enabled) to keep unused workspace cache data. Beyond this limit, cached workspace data may be removed.
215215
* `java.import.generatesMetadataFilesAtProjectRoot` : Specify whether the project metadata files(.project, .classpath, .factorypath, .settings/) will be generated at the project root. Defaults to `false`.
216216
* `java.inlayHints.parameterNames.enabled`: Enable/disable inlay hints for parameter names. Supported values are: `none`(disable parameter name hints), `literals`(Enable parameter name hints only for literal arguments) and `all`(Enable parameter name hints for literal and non-literal arguments). Defaults to `literals`.
217+
* `java.inlayHints.parameterTypes.enabled`: Enable/disable inlay hints for (lambda) parameter types. Defaults to `false`.
217218
* `java.compile.nullAnalysis.nonnull`: Specify the Nonnull annotation types to be used for null analysis. If more than one annotation is specified, then the topmost annotation will be used first if it exists in your project dependencies. This setting will be ignored if `java.compile.nullAnalysis.mode` is set to `disabled`.
218219
* `java.compile.nullAnalysis.nullable`: Specify the Nullable annotation types to be used for null analysis. If more than one annotation is specified, then the topmost annotation will be used first if it exists in your project dependencies. This setting will be ignored if `java.compile.nullAnalysis.mode` is set to `disabled`.
219220
* `java.compile.nullAnalysis.nonnullbydefault`: Specify the NonNullByDefault annotation types to be used for null analysis. If more than one annotation is specified, then the topmost annotation will be used first if it exists in your project dependencies. This setting will be ignored if `java.compile.nullAnalysis.mode` is set to `disabled`.
@@ -259,8 +260,8 @@ The following settings are supported:
259260
* `java.references.includeDeclarations`: Include declarations when finding references. Defaults to `true`
260261
* `java.jdt.ls.appcds.enabled` : [Experimental] Enable Java AppCDS (Application Class Data Sharing) for improvements to extension activation. When set to `auto`, AppCDS will be enabled in Visual Studio Code - Insiders, and for pre-release versions.
261262

262-
New in 1.46.0
263-
* `java.inlayHints.variableTypes.enabled`: Enable/disable inlay hints for implicit variable types.
263+
New in 1.47.0
264+
* `java.inlayHints.parameterTypes.enabled`: Enable/disable inlay hints for (lambda) parameter types. Defaults to `false`.
264265

265266
Semantic Highlighting
266267
===============

package.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1519,6 +1519,12 @@
15191519
"markdownDescription": "Enable/disable inlay hints for implicit variable types:\n```java\n\nvar foo /* :Path */ = Path.of(\"foo\");\n \n```",
15201520
"scope": "window"
15211521
},
1522+
"java.inlayHints.parameterTypes.enabled": {
1523+
"type": "boolean",
1524+
"default": false,
1525+
"markdownDescription": "Enable/disable inlay hints for (lambda) parameter types:\n```java\n\nList.of(1, 2, 3, 4).filter(/*Integer */ n -> n % 2 == 0).toList();\n \n```",
1526+
"scope": "window"
1527+
},
15221528
"java.search.scope": {
15231529
"type": "string",
15241530
"enum": [

src/telemetry.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,10 @@ export namespace Telemetry {
6262
"java.cleanup.actionsOnSave", "java.completion.postfix.enabled",
6363
"java.sharedIndexes.enabled", "java.inlayHints.parameterNames.enabled",
6464
"java.inlayHints.variableTypes.enabled",
65+
"java.inlayHints.parameterTypes.enabled",
6566
"java.server.launchMode", "java.autobuild.enabled"
6667
];
68+
6769
// settings where we only record their existence
6870
const SETTINGS_CUSTOM = [
6971
"java.settings.url", "java.format.settings.url"

0 commit comments

Comments
 (0)