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

Feature request: Add .sls to supported formats #4

Closed
mmisztal1980 opened this issue Jul 15, 2016 · 6 comments
Closed

Feature request: Add .sls to supported formats #4

mmisztal1980 opened this issue Jul 15, 2016 · 6 comments

Comments

@mmisztal1980
Copy link

This would provide support for SaltStack's state files using Jinja templates :)

@wholroyd wholroyd added this to the 1.0 milestone Jul 15, 2016
@wholroyd wholroyd self-assigned this Jul 15, 2016
@wholroyd
Copy link
Owner

So I see two actual requests in this issue.

  1. Adding the file extension (the easy part).
  2. Recognizing the filepath that SaltStack uses prior to the YAML declaration (the hard part).

Visual Studio Code has issues with mixing languages, especially if you are mixing with a language that ships embedded with Code. See microsoft/vscode#1751 for more information on what I mean. This makes the second request harder to achieve without rewriting the YAML syntax, which I have thought about doing but have no time to do.

I can add the file extension in the next minor update (0.7), but full support of the syntax won't be there until I can find a way around the issue I just referenced.

@mmisztal1980
Copy link
Author

ad.1 that'd be great. How long till you release 0.7 ? (btw, can I set this locally until then? I'm unable to find the extension's file that contains the supported formats list)

@wholroyd
Copy link
Owner

I just pushed 0.0.7 up to the marketplace for the .sls file format, so it's available now. 😄

All Code extensions will define their file extensions in the package.json file that sits at the root of the project. There the author can define what syntax should be associated with the extension. See https://github.com/wholroyd/vscode-jinja/blob/master/package.json#L52 as an example.

@wholroyd
Copy link
Owner

As I mentioned over in #3 , I don't see myself being able to rewrite the YAML language to make this work and this is technically not a bug with the plugin, but a limitation of Code. As such, there is nothing I can really do about this until I get time or they fix language overrides in Code. I'm closing as Won't Fix for now.

@wholroyd wholroyd removed this from the 1.0 milestone Nov 10, 2016
@sebw
Copy link

sebw commented May 18, 2017

Despite running the latest version of the plugin, highlighting doesn't work for my state files.

In my settings.json I added this to get sls files highlighted as yaml:

"files.associations": {"*.sls": "yaml"}

@Silvenga
Copy link
Contributor

@sebw the default file associations were removed due to #15. files.associations is the proper way to apply custom associations overrides now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants