From c585db1ef38c27bc764ed19c8c1eb3f5510643b3 Mon Sep 17 00:00:00 2001 From: Walter Oggioni Date: Thu, 5 Mar 2026 21:54:01 +0800 Subject: [PATCH] added LSP configuration to opencode --- opencode/Dockerfile | 1 + opencode/opencode.json | 30 ++++++++++++++++++++++++++++++ 2 files changed, 31 insertions(+) create mode 100644 opencode/opencode.json diff --git a/opencode/Dockerfile b/opencode/Dockerfile index ece9b82..a33500b 100644 --- a/opencode/Dockerfile +++ b/opencode/Dockerfile @@ -20,6 +20,7 @@ ADD https://github.com/anomalyco/opencode/releases/download/v${OPENCODE_VERSION} FROM builder-${TARGETPLATFORM//\//_} AS release RUN tar -xvf ./opencode.tgz -C /usr/bin RUN rm opencode.tgz +ADD --chown=opencode:opencode ./opencode.json /var/lib/opencode/.config/opencode/opencode.json USER opencode WORKDIR /workspace ENTRYPOINT ["opencode"] diff --git a/opencode/opencode.json b/opencode/opencode.json new file mode 100644 index 0000000..6ee9804 --- /dev/null +++ b/opencode/opencode.json @@ -0,0 +1,30 @@ +{ + "$schema": "https://opencode.ai/config.json", + "lsp": { + "java": { + "command": [ + "jdtls" + ], + "extensions": [ + ".java" + ] + }, + "python": { + "command": [ + "pyright" + ], + "extensions": [ + ".py", + "pyi" + ] + }, + "rust": { + "command": [ + "rust-analyzer" + ], + "extensions": [ + ".rs" + ] + } + } +} \ No newline at end of file