opencode icon indicating copy to clipboard operation
opencode copied to clipboard

jdtls lsp custom config failed

Open sincebyte opened this issue 2 days ago • 4 comments

Description

I have a opencode.json config in the project root dir. and I configed jdtls lsp for my project. when open code run , the cli stack here and output:

➜  skytech git:(dev) opencode --log-level DEBUG --print-logs
INFO  2026-01-13T10:30:36 +363ms service=default version=1.1.10 args=["--log-level","DEBUG","--print-logs"] opencode
INFO  2026-01-13T10:30:36 +1ms service=config path=/Users/van/.config/opencode/config.json loading
INFO  2026-01-13T10:30:36 +1ms service=config path=/Users/van/.config/opencode/opencode.json loading
INFO  2026-01-13T10:30:36 +9ms service=config path=/Users/van/.config/opencode/opencode.jsonc loading

I'm sure the command could start the mcp server, cause I use it in aider-ce, all things works well

{
  "$schema": "https://opencode.ai/config.json",
  "permission": {
    "bash": "allow",
    "edit": "allow"
  },
  "keybinds": {
    "input_backspace": "backspace,shift+backspace,ctrl+h"
  },
  "tui": {
    "scroll_speed": 3,
    "scroll_acceleration": {
      "enabled": true
    },
    "diff_style": "stacked"
  },
  "lsp": {
    "custom-lsp": {
      "enable": true,
      "command": [
        "mcp-language-server",
        "--workspace",
        "/Users/van/ZY/workspace/skytech/",
        "--lsp",
        "/Users/van/soft/jdk/jdk-21.0.6.jdk/Contents/Home/bin/java",
        " ",
        "-Declipse.application=org.eclipse.jdt.ls.core.id1",
        "-Dosgi.bundles.defaultStartLevel=4",
        "-Declipse.product=org.eclipse.jdt.ls.core.product",
        "-Xms128m",
        "-javaagent:/Users/van/.doom.d/neoemacs/lombok1.18.38.jar",
        "-Djava.import.generatesMetadataFilesAtProjectRoot=false",
        "-jar",
        "/Users/van/lsp-java/plugins/org.eclipse.equinox.launcher_1.7.0.v20250519-0528.jar",
        "-configuration",
        "/Users/van/lsp-java/config_mac",
        "-data",
        "/Users/van/lsp-java-mcp/workspace"
      ],
      "extensions": [".java"]
    }
  }
}

Plugins

no

OpenCode version

1.1.10

Steps to reproduce

copy the config file on a java project root dir .and use opencode.

Screenshot and/or share link

No response

Operating System

macos 26.1 (25B78)

Terminal

iterm2

sincebyte avatar Jan 13 '26 10:01 sincebyte