docker / docker/vscode-extension

Proposal: Enhance Bake LSP Support

Open
#107 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
TypeScript
Stars
59
Forks
23
PR merge metrics
No merged PRs in 30d

Description

Problem

The current LSP support for docker-bake.hcl files in the Docker DX VS Code extension is functional but limited:

  • Syntax: highlighting, code completion, formatting
  • Hover information only shows the type, without any helpful documentation or usage guidance.
  • There’s no support for visualizing the inheritance hierarchy of targets (e.g., inherits = ["_common"]), making it hard to reason about multi-target setups.
  • Outline a view outline of Bake file targets
  • Image references inside fields like tags = ["ghcr.io/abc/def"] are plain strings with no ability to click and inspect the image source (e.g., opening the URL in a browser).
  • Navigation from variable references to definitions and from docker-bake.hcl build stage references to corresponding Dockerfile declarations

These limitations reduce developer productivity and make it harder for users—especially those new to docker-bake.hcl—to understand, refactor, and explore their configurations confidently.

Proposed Solution

Enhance the Bake LSP implementation with the following capabilities:

  1. Hover and code completion improvements
    • Show helpful documentation (not just the type) when hovering over attributes.
    • Include usage examples, common values, and links to relevant docs.
  2. Target hierarchy visualization
    • Display how a target inherits from others (inherits = ["_common"]), similar to class inheritance in object-oriented languages.
    • Optional tree/graph view or inline hover/tooltip linking to inherited targets.
  3. Rename support
    • Allow developers to rename a target and automatically update all references (especially inherited relationships) across the file.
  4. Linkable image tags
    • Make values like tags = ["ghcr.io/abc/def"] clickable, opening the corresponding container registry page in the browser.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No file, test, or concrete entry point is named. Start by locating the existing Bake LSP implementation and documenting how its current syntax, completion, formatting, hover, and navigation support is organized. Before implementation, narrow the scope and define done criteria for each proposed capability, including hierarchy, rename, image links, outline, and navigation support.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, typescript, vscode
Domain
developer-experience, devtools, tooling
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.