-
Notifications
You must be signed in to change notification settings - Fork 9
Open
Labels
enhancementNew feature or requestNew feature or request
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.
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request