Skip to content
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

.yml files are ignored #87

Closed
giovannicandido opened this issue May 25, 2018 · 12 comments
Closed

.yml files are ignored #87

giovannicandido opened this issue May 25, 2018 · 12 comments

Comments

@giovannicandido
Copy link

Using it with ansible, all .yml files has no syntax highlight
Renaming file to .yaml enables but is not compeling to rename all my files.

@giovannicandido giovannicandido changed the title Ignoring .yml files .yml files are ignored May 25, 2018
@JPinkney
Copy link
Contributor

JPinkney commented May 28, 2018

I've just tested this out using kubernetes schema and it works fine for me.

screenshot from 2018-05-28 13-25-53

What ansible schema are you using and how are you setting it?

@giovannicandido
Copy link
Author

giovannicandido commented May 30, 2018

Kubernetes works fine. But treats all non kuberntes as not being yaml files, unless renamed to .yaml

problem

@giovannicandido
Copy link
Author

giovannicandido commented May 31, 2018

I test in Windows and is ok. Problem is on Ubuntu Linux.

@giovannicandido
Copy link
Author

The highlight is not working on folders:
roles
playbooks

This video show the behaviour: https://1drv.ms/v/s!AoHvV-Rb6N9QgoJ4ulk8Z7RUq2kCUg

@JPinkney
Copy link
Contributor

Ah, thats such weird behaviour. I'll look into it and fix it for the next release.

@timm088
Copy link

timm088 commented Jun 11, 2018

Hrmm, not sure if related, but in my case, when using the 'comment' shortcut in .yaml files, i now get /* my thing */ .. i would be expecting # mything

New behaviour, does not occur in .yml files

Looks like i can force this in files.associations in settings, likely not related to the vscode-yaml addon, add behaviour though

@JPinkney
Copy link
Contributor

JPinkney commented Oct 1, 2018

Upon examination again I think that this isn't vscode-yaml, it looks like for some reason the .yml file is not getting registered as the yaml file type when opened. Though I'm not entirely why it isn't registering shrugs

@nomoresecrets
Copy link

had the same issue with *.yml files not being recognized as "Yaml" filetype, Check your settings (user, directory and workspace) for "files.associations" settings.

@JPinkney
Copy link
Contributor

@nomoresecrets In your case did one of your plugins associate yml files with some other type? It looks like the vscode-ansible extension for example associates *.yml files with ansible (https://github.com/VSChina/vscode-ansible#usage) and i'm guessing that overrides the default association with yaml

@nomoresecrets
Copy link

yeah, I had manually set the association to "ansible" in all three settings files which drove me crazy b/c I didn't know you can have three different files^^

@Morriz
Copy link

Morriz commented Jan 29, 2020

Can we please get a fix for this simple problem?

@JPinkney
Copy link
Contributor

JPinkney commented Apr 3, 2020

Re-examining the problem, it looks like the filetype wasn't set to YAML it was set to plaintext (you can see it in the bottom right of the video when you open up one of the files that weren't highlighted) and that was the cause of this issue.

Both .yml and .yaml files should automatically associate to the YAML filetype and if they aren't it ends up as an issue with vscode itself, not with this extension so I'm going to close this.

@JPinkney JPinkney closed this as completed Apr 3, 2020
bleach31 pushed a commit to bleach31/vscode-yaml that referenced this issue Jan 25, 2022
support generate snippets for object and array according to schema
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants