Skip to content

Commit 71f395c

Browse files
robstrykerclaude
andcommitted
Add java.jshell.enabled setting to disable .jsh content assist
Companion to eclipse-jdtls/eclipse.jdt.ls#3985/redhat-developer#3986: exposes the server's java.jshell.enabled preference as a VS Code setting, matching java.foldingRange.enabled's exact shape (a pure server-side toggle with no client-side code needed - confirmed foldingRange.enabled has zero references in src/, since getJavaConfig() forwards the whole java.* configuration object to the server generically). Note: .jsh's association with the java language id is a static package.json manifest declaration (contributes.languages[].extensions), not a runtime registration, so it can't be dynamically gated on this setting - disabling it turns off completion/diagnostics/hover on the server side, but doesn't affect syntax highlighting. Documented in the setting's own description rather than attempting a partial/misleading client-side gate. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
1 parent 10e3d0e commit 71f395c

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

‎package.json‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1699,6 +1699,12 @@
16991699
"description": "Enable/disable smart folding range support. If disabled, it will use the default indentation-based folding range provided by VS Code.",
17001700
"scope": "window"
17011701
},
1702+
"java.jshell.enabled": {
1703+
"type": "boolean",
1704+
"default": true,
1705+
"description": "Enable/disable classpath-aware content assist (completion, diagnostics, hover) for .jsh (JShell script) files. Disabling this does not affect syntax highlighting.",
1706+
"scope": "window"
1707+
},
17021708
"java.selectionRange.enabled": {
17031709
"type": "boolean",
17041710
"default": true,

0 commit comments

Comments
 (0)