[PR #5252] feat: add dockerfile language server #11310

Closed
opened 2026-02-16 18:16:07 -05:00 by yindo · 0 comments
Owner

Original Pull Request: https://github.com/anomalyco/opencode/pull/5252

State: closed
Merged: Yes


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
**Original Pull Request:** https://github.com/anomalyco/opencode/pull/5252 **State:** closed **Merged:** Yes --- ## 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
yindo added the pull-request label 2026-02-16 18:16:07 -05:00
yindo closed this issue 2026-02-16 18:16:07 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#11310