question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Duplicated IntelliSense with YAML + Docker extension

See original GitHub issue

As our team has added the Docker Compose Language service to yaml files that are given the Docker Compose language designation in VS Code, users are getting dual suggestions in IntelliSense if they have the Docker extension installed.

Original Issue: https://github.com/microsoft/vscode-docker/issues/3480

Our suggestion would be, could there be a setting or an experience to suppress these suggestions if

Options:

  1. Docker extension is detected and the user gives a Docker Compose file designation in VS Code
  2. User has a file named docker-compose.yml

I like the first option. Althrough the majority of users name their Docker Compose file docker-compose.yml, this provides the greatest flexibility.

Adding @bwateratmsft

Issue Analytics

  • State:open
  • Created a year ago
  • Comments:9 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
bwateratmsftcommented, May 18, 2022

It would partway fix it, but if YAML got activated anyway for another reason, this would still occur. I talked to @isidorn and there’s not an existing way in VSCode to choose one language server or another. I think the “best” solution would be a shared setting between Docker and YAML; an easier solution would be a setting in YAML to turn off for dockercompose language entirely (including the language client document selector), but would require the user to manage two separate settings.

I don’t think it’s particularly urgent; as a workaround the Docker extension has a setting to disable its language server for compose, leaving only the YAML one.

0reactions
fbriconcommented, Jul 8, 2022

Other vscode extensions, like Kubernetes simply contribute new functionalities (validation/completion) to the yaml language server by injecting a custom schema, that can be computed on-the-fly. See https://github.com/vscode-kubernetes-tools/vscode-kubernetes-tools/blob/92582a57ce722e166d25482b443c37a58d16305a/src/yaml-support/yaml-schema.ts.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Duplicated IntelliSense with YAML extension · Issue #3480 ... - GitHub
When both this extension and the YAML Support extension are enabled, the IntelliSense suggestions for docker compose files are duplicated like this:
Read more >
VS Code IntelliSense enabled when developing inside a ...
The Visual Studio Code Remote - Containers extension lets you use a Docker container as a full-featured development environment.
Read more >
The newest Docker VS Code extension feature you're not using
That's right, the Docker Extension will now provide Docker Compose files with IntelliSense, Tooltips, and syntax validation.
Read more >
Avoid code duplication in docker-compose.yml ... - Codinghaus
Let us have a look straight at how the docker-compose.yml file seems when we use extension fields here to remove the duplicated code:...
Read more >
Code Quality - GitLab Docs
Can be extended through Analysis Plugins or a custom tool. ... add a file named .codeclimate.yml containing the enablement code for the plugin...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found