From feef9ce9e1332c1ceca3afb06d0a5ff4d9d25fb1 Mon Sep 17 00:00:00 2001 From: minhducphung Date: Fri, 3 Apr 2026 23:17:20 +0700 Subject: [PATCH] fix: correct .lsp.json schema for jdtls MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- plugins/java-core/.lsp.json | 31 +++---------------------------- 1 file changed, 3 insertions(+), 28 deletions(-) diff --git a/plugins/java-core/.lsp.json b/plugins/java-core/.lsp.json index 3b54a1a..3d8acec 100644 --- a/plugins/java-core/.lsp.json +++ b/plugins/java-core/.lsp.json @@ -1,33 +1,8 @@ { "lspServers": { - "java": { - "command": "jdtls", - "args": [], - "initializationOptions": { - "settings": { - "java": { - "format": { - "enabled": true, - "settings": { - "profile": "GoogleStyle" - } - }, - "saveActions": { - "organizeImports": true - }, - "completion": { - "importOrder": ["java", "javax", "jakarta", "org", "com"] - }, - "inlayHints": { - "parameterNames": { - "enabled": "all" - } - } - } - } - }, - "filetypes": ["java"], - "notes": "Requires Eclipse JDT Language Server (jdtls). Install via: brew install jdtls (macOS), or https://github.com/eclipse-jdtls/eclipse.jdt.ls" + "command": "jdtls", + "extensionToLanguage": { + ".java": "java" } } }