Open fbricon opened 3 years ago
That is an interesting subject. I am not sure what is the recommendation mechanism on this as my impression was the vscode itself does recommend other extensions based on what they declare as supporting.
I am inside the same board as creator of vscode-ansible extension which extends vscode-yaml. Obviously I would not mind prompting user to install it when specific files are found inside the repository.
At this moment I am not aware of a programatic way an extension could conditionally recommend other extensions. The only option I seen is to configure recommended extensions at workspace level, meaning that each repository owner is expected to populate them in order to work.
I am curious if someone finds something else that can be used.
vscode-java recommends the installation of the dependency analytics extension, when opening a pom.xml: https://github.com/redhat-developer/vscode-java/commit/bdacd431c8c7a97d014891a1dfa279c715715473
Super, now we have the code that we can reuse there in a bit more generic form as we will need a list of patterns. For Ansible code, a safe list of patterns would be:
# Recommend zbr.vscode-ansible extension
**/{collections,requirements,molecule,galaxy}.yml
**/{.ansible-lint,.yamllint}
**/playbooks/*.{yml,yaml}
**/{host_vars,group_vars,vars,defaults}/**/*.{yaml,yml}
**/meta/main.{yaml,yml}
The list above is a subset of https://github.com/ansible-community/ansible-lint/blob/master/src/ansiblelint/config.py#L14 but it likely covers >99% of the files.
Same issues. Is there any solution we could find it out?
Is your enhancement related to a problem? Please describe.
Some users expect vscode-yaml to support Helm charts, which is actually supported by vscode-kubernetes-tools. See
Describe the solution you would like
Detect the Helm chart syntaxt in a Yaml document. If vscode-kubernetes-tools is not already installed, the display a message recommending to install it.