vscode-docker icon indicating copy to clipboard operation
vscode-docker copied to clipboard

Duplicated IntelliSense with YAML extension

Open Igorgro opened this issue 2 years ago • 5 comments

When both this extension and the YAML Support extension are enabled, the IntelliSense suggestions for docker compose files are duplicated like this:

image

Igorgro avatar Apr 01 '22 18:04 Igorgro

I've noticed this too 😕

I'm not sure of the best approach other than to use the docker.enableDockerComposeLanguageService setting to disable the language server provided by the Docker extension. They YAML extension may offer a way to selectively disable itself for files of the language type "Compose" (id: dockercompose), but I have not checked.

bwateratmsft avatar Apr 01 '22 19:04 bwateratmsft

We could add auto-detection so if we see YAML is also installed, maybe prompt if they want to disable the Docker language server.

bwateratmsft avatar Apr 01 '22 19:04 bwateratmsft

@bwateratmsft do we feel as though the Docker extension provides more value for Yaml within the Compose file though?

If so would there be a way to instead suppress the YAML support extension just for this specific file type?

ucheNkadiCode avatar May 16 '22 18:05 ucheNkadiCode

We could ask the YAML extension to support that, but it would require them to make changes. VSCode might also have a way to choose one language server or another for a given language, but I'm not sure.

bwateratmsft avatar May 16 '22 18:05 bwateratmsft

Added over here https://github.com/redhat-developer/yaml-language-server/issues/715

ucheNkadiCode avatar May 17 '22 16:05 ucheNkadiCode

@bwateratmsft I have an idea of how this can be solved. You can add a new separate Docker compose "language" which will be associated with this extension and corresponding language server and which won't be conflicting with YAML. This is what was done for example in Ansible extension: they also have separate "Ansible" language and language server

Igorgro avatar Feb 24 '23 17:02 Igorgro

@Igorgro this was already done; there is a separate dockercompose language definition built in to VSCode. The YAML extension is explicitly targeting that language as well as yaml.

bwateratmsft avatar Feb 24 '23 17:02 bwateratmsft

This is largely mitigated at this point; we did some deconfliction work with the YAML extension so that only some of the advanced completions show up if the YAML extension is present.

bwateratmsft avatar Nov 07 '23 16:11 bwateratmsft