-
Notifications
You must be signed in to change notification settings - Fork 48
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Overlapping functionality with the VSCode YAML extension #230
Comments
I have reported this in parallel here: redhat-developer/vscode-yaml#178 |
The duplicate entries only show if the selected language mode for the file is yaml. If set to ansible it's fine. |
This also breaks settings for the YAML extension. E.g. in settings.json
If I open a YAML file that uses those tags, VS Code will tell me the tags are invalid
The only way to work around this is to disable the ansible extension and reload vs code. |
Here's a better workaround: Edit IMO, the maintainers should make this modification instead of broadly taking over the YAML filetype. |
When you say "edit |
You need to remove this line from the installed copy of the extension: Line 28 in 2201b21
On my laptop, this was located in |
Thanks abohne! For anyone else interested in this workaround after making the change I had to disable/enable the extension. Restarting vscode wasn't enough. This also solves the problem of ansible intellisense running on yaml files that aren't ansible files. |
Considering that the current behavior if this extension breaks almost all other YAML using extensions by overriding user configuration I am really annoyed amount of time wasted trying to debug an issue. I think is more than obvious that an extension related to Ansible, should not mess any YAML file. Unless the file-type is marked as Ansible, this extension should not interfere with them. I know that bug happen, but this bug was reported almost one year ago and this extension still breaks other YAML extensions, which I do not find acceptable. |
One thing to keep in mind is that this wasn't always the behavior for extensions that are trying to tie multiple languages together. It used to work differently about 2-3 years ago where issues like this wouldn't have been a problem. Issues exist for it in the VScode project, but have not been resolved or prioritized. I have tried to develop the same functionality that this extension provides (pre-exists this one in fact), but unfortunately there is not a lot of great control that the extension editors have over the editor's language behaviors. Especially the built-in languages as those are treated differently by the editor than community ones. |
Simple workaround, disable the extension at workspace level (
{
"ansible.autocompletion": false,
"serverlessIDE.completion": true,
"yaml.customTags": [
"!Equals sequence",
"!FindInMap sequence",
"!GetAtt",
"!GetAtt sequence",
"!GetAZs",
"!ImportValue",
"!Join sequence",
"!Ref",
"!Ref sequence",
"!Select sequence",
"!Split sequence",
"!Sub",
"!Base64 mapping",
"!And",
"!And sequence",
"!If",
"!If sequence",
"!Not",
"!Not sequence",
"!Equals",
"!Or",
"!Or sequence",
"!FindInMap",
"!Base64",
"!Join",
"!Cidr",
"!Sub sequence",
"!ImportValue sequence",
"!Select",
"!Split"
],
} |
Environment
Summary
The functionality of this extension seems to overlap with the YAML extension (
redhat.vscode-yaml
). Both extensions populate the Outline view as well as Go to symbol. So all elements are displayed twice.This is not really a bug but keeps irritating me when working with Ansible and YAML files.
Reproduce steps
Install both this extension and
redhat.vscode-yaml
. Open a YAML file and see duplicate entries in the Outline view and Go to symbol.The text was updated successfully, but these errors were encountered: