fix: provide inline suggestions in Docker Compose files#141
Draft
laileni-aws wants to merge 1 commit into
Draft
Conversation
VS Code assigns docker-compose files the 'dockercompose' language id rather than 'yaml', so Amazon Q reported the language as unsupported and did not offer inline suggestions. Map 'dockercompose' to the YAML runtime language (and register it as a supported platform language id) so completions are provided as they are for other YAML files.
laileni-aws
force-pushed
the
fix/inline-completion-dockercompose-language
branch
from
July 15, 2026 02:25
bb22f89 to
544916d
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Amazon Q inline suggestions do not work in Docker Compose files. In a
docker-compose.yaml(or.yml) file, completions fail with a "language is not supported" style result, even though inline suggestions work in a plain.yamlfile.The cause is the editor language id: VS Code identifies Docker Compose files with the
dockercomposelanguage id (notyaml). The runtime language mapping did not know aboutdockercompose, so the language was treated as unsupported and no suggestions were requested.Fix
Treat
dockercomposeas YAML:packages/core/src/codewhisperer/util/runtimeLanguageContext.ts: map thedockercomposeplatform language id to theyamlruntime language insupportedLanguageMap.packages/core/src/codewhisperer/models/constants.ts: adddockercomposetoplatformLanguageIdsso it is recognized as a supported platform language id (this is also the key type used by the map above).With this change, Docker Compose files receive the same inline suggestion support as other YAML files.
Testing
packages/amazonq/test/unit/codewhisperer/util/runtimeLanguageContext.test.ts:isLanguageSupported('dockercompose')returnstrue;getLanguageContext('dockercompose')resolves toyaml.corepackage (tsc -p ./ --noEmit): no type errors in the changed files.Notes
dockercomposeis the language id VS Code assigns todocker-compose.yaml/docker-compose.yml(andcompose.yaml) files; mapping it to YAML is consistent with how the extension already treatsymlandyaml.