hassio-addons / addon-vscode

Studio Code Server - Home Assistant Community Add-ons
https://addons.community
MIT License
501 stars 80 forks source link

[FR] Add file association for .jinga files #638

Closed SirGoodenough closed 1 year ago

SirGoodenough commented 1 year ago

Problem/Motivation

The addition of template imports and includes has us creating *.jinja files. As currently set-up, these show as text in the editor page and have no file association.

Expected behavior

Code Server knows it's a .jinja and knows to 2-space indent along with coloring the variables properly.

Actual behavior

The file shows as text with no highlighting.

Steps to reproduce

This is default behavior for .jinja files.

Proposed changes

In settings add a file association to type jinja YAML as that seemed to work the best.

I don't know if that is technically correct, but it seemed to set to 2 spaces where jinja python indented 4 spaces by default. The homeassistant format is currently 2 and is what we are used to working with.

Perhaps setting jinja to also use the homeassistant format would work, but I wasn't sure if it would work or if it would have other implications. RE: syntax errors highlighting.

github-actions[bot] commented 1 year ago

There hasn't been any activity on this issue recently, so we clean up some of the older and inactive issues. Please make sure to update to the latest version and check if that solves the issue. Let us know if that works for you by leaving a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thanks!