I am running v 0.26 of the Docker extension and version 1.21.1 of VSCode.
I am using Ubuntu 17.10.
The Intellisense does not try to autocomplete unless I hit the CTRL+Space keyboard shortcut
@lukebrewerton Are you editing Dockerfiles or Docker Compose YAML files?
It is only when i'm editing Docker Compose files. I've tried disabling every other extension too to rule out other extensions.
@lukebrewerton This has been brought up before by other users. See #128.
So apparently in Dockerfile Intellisense shows up automatically, whereas with docker-compose.yml you have to press CTRL+SPACE to get suggestions.
In other file types (e.g. .ts), I'm seeing autocomplete coming up mostly by itself.
Current work-around: Use CTRL+SPACE
For people (like me) who don't know the syntax of docker-compose files by heart (especially since it evolved quite a bit throughout versions), intellisense and auto-completion is essential to avoid typos or having to scroll the doc on a browser window on the side. CTRL+Space is one way to check what the options are, but suggestions as-you-type would be much more helpful for beginners.
As a workaround, if you want to have suggestions pop up automatically try adding this to your settings.json:
"[yaml]": {
"editor.quickSuggestions": {
"other": true,
"comments": true,
"strings": true
}
}
Comments and strings are false by default for YAML, which means you have to press CTRL+SPACE to get suggestions in docker-compose files.
This change will likely make editing any other YAML files a mess of suggestions though so it might be better to add this at the workspace level rather than globally.
@BigMorty This should just be an issue of adjusting the trigger characters option for the completion provider.
Thanks @StephenWeatherford! I assigned this to @philliphoff to take a look at for our next release.
Some of the confusion around this issue (at least for me) is that there is another VS Code extension, YAML, which enables Intellisense by default for YAML files (i.e. without requiring CTRL+SPACE). This extension happens to be a dependency of other YAML-heavy extensions (such as for Kubernetes). Depending on whether those extensions are installed (or not), you'll get automatic Docker Compose IntelliSense (or not).
The solution is probably to enable YAML IntelliSense by default in our extension as well.
Most helpful comment
For people (like me) who don't know the syntax of
docker-composefiles by heart (especially since it evolved quite a bit throughout versions), intellisense and auto-completion is essential to avoid typos or having to scroll the doc on a browser window on the side. CTRL+Space is one way to check what the options are, but suggestions as-you-type would be much more helpful for beginners.