docker / docker/vscode-extension
Proposal: Enhance Bake LSP Support
Nobody has claimed this yet.
- 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:
- 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.
- 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.
- Rename support
- Allow developers to rename a target and automatically update all references (especially inherited relationships) across the file.
- Linkable image tags
- Make values like tags = ["ghcr.io/abc/def"] clickable, opening the corresponding container registry page in the browser.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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