opencode icon indicating copy to clipboard operation
opencode copied to clipboard

feat: add dockerfile language server

Open edlsh opened this issue 2 weeks ago • 2 comments

Summary

Add Dockerfile LSP support via dockerfile-language-server-nodejs.

Changes

  • Add DockerfileLS LSP server with auto-install from npm
  • Supports files named Dockerfile and files with .dockerfile extension

Features

  • Code completion for Dockerfile instructions (FROM, RUN, COPY, etc.)
  • Hover documentation
  • Diagnostics for syntax errors
  • Formatting support
  • Go-to-definition
  • Document symbols
  • Rename support

Note

Files like Dockerfile.dev or Dockerfile.prod are not supported due to extension-based matching limitations. Pattern matching support would be needed (see #2182).

Tests Run

  • bun run typecheck (opencode package) - passed
  • bun test - 255 passed, 1 skipped, 0 failed
  • Verified extension matching logic with path.parse() for:
    • Dockerfile → matches via filename fallback
    • app.dockerfile → matches via .dockerfile extension
  • Verified asset naming against dockerfile-language-server-nodejs npm package

edlsh avatar Dec 08 '25 18:12 edlsh

/review

rekram1-node avatar Dec 11 '25 04:12 rekram1-node

lgtm

github-actions[bot] avatar Dec 11 '25 04:12 github-actions[bot]