Skip to content

Commit feef9ce

Browse files
ducpm2303claude
andcommitted
fix: correct .lsp.json schema for jdtls
Claude Code expects lspServers.command (string) and lspServers.extensionToLanguage (record) directly — not nested under a language key. The previous "java": { command, ... } structure caused "Unrecognized key: java" and "expected string, received undefined" errors. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 3bcc8b0 commit feef9ce

1 file changed

Lines changed: 3 additions & 28 deletions

File tree

plugins/java-core/.lsp.json

Lines changed: 3 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,8 @@
11
{
22
"lspServers": {
3-
"java": {
4-
"command": "jdtls",
5-
"args": [],
6-
"initializationOptions": {
7-
"settings": {
8-
"java": {
9-
"format": {
10-
"enabled": true,
11-
"settings": {
12-
"profile": "GoogleStyle"
13-
}
14-
},
15-
"saveActions": {
16-
"organizeImports": true
17-
},
18-
"completion": {
19-
"importOrder": ["java", "javax", "jakarta", "org", "com"]
20-
},
21-
"inlayHints": {
22-
"parameterNames": {
23-
"enabled": "all"
24-
}
25-
}
26-
}
27-
}
28-
},
29-
"filetypes": ["java"],
30-
"notes": "Requires Eclipse JDT Language Server (jdtls). Install via: brew install jdtls (macOS), or https://github.com/eclipse-jdtls/eclipse.jdt.ls"
3+
"command": "jdtls",
4+
"extensionToLanguage": {
5+
".java": "java"
316
}
327
}
338
}

0 commit comments

Comments
 (0)