Skip to content

Commit 8a069ca

Browse files
committed
feat: add inlay hints for implicit variables
Signed-off-by: Fred Bricon <[email protected]>
1 parent 4b0ae52 commit 8a069ca

File tree

3 files changed

+11
-0
lines changed

3 files changed

+11
-0
lines changed

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ Features
4848
* Diagnostic tags
4949
* Call Hierarchy
5050
* Type Hierarchy
51+
* Inlay Hints
5152

5253
To launch and debug your Java programs, it's recommended you install *[Java Debug Extension for Visual Studio Code](https://marketplace.visualstudio.com/items?itemName=vscjava.vscode-java-debug)*.
5354

@@ -258,6 +259,9 @@ The following settings are supported:
258259
* `java.references.includeDeclarations`: Include declarations when finding references. Defaults to `true`
259260
* `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.
260261

262+
New in 1.46.0
263+
* `java.inlayHints.variableTypes.enabled`: Enable/disable inlay hints for implicit variable types.
264+
261265
Semantic Highlighting
262266
===============
263267
[Semantic Highlighting](https://github.com/redhat-developer/vscode-java/wiki/Semantic-Highlighting) fixes numerous syntax highlighting issues with the default Java Textmate grammar. However, you might experience a few minor issues, particularly a delay when it kicks in, as it needs to be computed by the Java Language server, when opening a new file or when typing. Semantic highlighting can be disabled for all languages using the `editor.semanticHighlighting.enabled` setting, or for Java only using [language-specific editor settings](https://code.visualstudio.com/docs/getstarted/settings#_languagespecific-editor-settings).

package.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1510,6 +1510,12 @@
15101510
"scope": "window",
15111511
"order": 90
15121512
},
1513+
"java.inlayHints.variableTypes.enabled": {
1514+
"type": "boolean",
1515+
"default": false,
1516+
"markdownDescription": "Enable/disable inlay hints for implicit variable types:\n```java\n\nvar foo /* :Path */ = Path.of(\"foo\");\n \n```",
1517+
"scope": "window"
1518+
},
15131519
"java.search.scope": {
15141520
"type": "string",
15151521
"enum": [

src/telemetry.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ export namespace Telemetry {
6161
"java.completion.collapseCompletionItems", "java.completion.guessMethodArguments",
6262
"java.cleanup.actionsOnSave", "java.completion.postfix.enabled",
6363
"java.sharedIndexes.enabled", "java.inlayHints.parameterNames.enabled",
64+
"java.inlayHints.variableTypes.enabled",
6465
"java.server.launchMode", "java.autobuild.enabled"
6566
];
6667
// settings where we only record their existence

0 commit comments

Comments
 (0)