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

Detect extensions on templates #40285

Closed
ephracis opened this issue Dec 15, 2017 · 4 comments
Closed

Detect extensions on templates #40285

ephracis opened this issue Dec 15, 2017 · 4 comments
Labels
*extension-candidate Issue identified as good extension implementation feature-request Request for new features or functionality languages-basic Basic language support issues
Milestone

Comments

@ephracis
Copy link

I have a lot of files that are templates. They are usually named like so:

  • my_file.yml.ejs
  • another_file.coffee.j2

Currently Code assumes that all ejs are HTML files but this is not always the case. It would be better if Code could detect both the yml part and the ejs part, and properly highlight the code according to this.

Now I have to manually switch language on all files which is tedious, and I also lose the proper highlighting of the template tags. This affects more than just pretty colors to. For example when I paste in large blocks of code I get the wrong indentation if the language is not correct.

@vscodebot vscodebot bot added editor editor-core Editor basic functionality labels Dec 15, 2017
@alexdima alexdima added feature-request Request for new features or functionality languages-basic Basic language support issues and removed editor editor-core Editor basic functionality labels Dec 19, 2017
@alexdima alexdima added this to the Backlog milestone Dec 19, 2017
@alexdima alexdima removed their assignment Dec 19, 2017
@myrdd
Copy link

myrdd commented Oct 9, 2018

as a workaround, I'm using file associations like the following:

{
    "files.associations": {
    "*.html.j2": "html",
    "*.ini.j2": "ini",
    "*.yml.j2": "yaml",
  }
}

@ephracis
Copy link
Author

Yeah I'm doing that too right now. But that won't make VS Code detect the jinja. 😒

@theballdredge
Copy link

started some work with templates recently, this would be super nice

@mjbvz mjbvz added the *extension-candidate Issue identified as good extension implementation label May 1, 2019
@vscodebot
Copy link

vscodebot bot commented May 1, 2019

We try to keep VS Code lean and we think the functionality you're asking for is great for a VS Code extension. Maybe you can already find one that suits you in the VS Code Marketplace. Just in case, in a few simple steps you can get started writing your own extension. See also our issue reporting guidelines.

Happy Coding!

@vscodebot vscodebot bot closed this as completed May 1, 2019
@vscodebot vscodebot bot locked and limited conversation to collaborators Jun 16, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
*extension-candidate Issue identified as good extension implementation feature-request Request for new features or functionality languages-basic Basic language support issues
Projects
None yet
Development

No branches or pull requests

5 participants