Atom: j2 icon?

Created on 10 Mar 2017  路  4Comments  路  Source: file-icons/atom

I miss the j2 icon for jinja2 templates (f.ex. .html.j2). Unfortunately, I'm not sure how to add it. I thought that it was as trivial as adding

[".j2", "medium-red", alias:"jinja2"]

to the jinja part of config.scon, but that doesn't work for me, so... could someone show me how to do this? Thanks a lot!

enhancement filetype-support styling

Most helpful comment

Yeah, apparently the auto-compiler only obeys me for some reason. Bitch-slapping it into being more cooperative is on the todo list.

All 4 comments

Remember, when all else fails, your user stylesheet always takes precedence over everything else (and it always will):

~less
.icon[data-name$=".j2"]:before{
color: #ac4142;
content: "\e944";
font: 15px file-icons;
}
~

Now then... regarding the cleaner solution of updating config.cson: you were actually correct.
If nothing's changed, make sure you've installed the package's devDependencies first:

~bash
apm install file-icons
~

Changes to the config aren't reflected in the workspace in realtime, so a refresh is needed.
I kinda did this deliberately to keep the recompilation procedures simpler.

Optionally, you can add "j2" as a customFileType in your user config (this will update in real-time):

~coffee
"*":
core:
customFileTypes:
"source.jinja": [
"j2"
]
~

Since this appears to be a common extension, I'll add it to the config for the next release. =)

Alright, it's done! =)

I'm afraid I can't tell you when the next release will drop... I'm planning some infrastructure changes to the package, so it might be a little while. I recommend following one of the above procedures until v2.1.0 is finished.

Nice. I don't know what's wrong with my setup, but atom doesn't look into my config.cson. I'll just stick to the stylesheet until the next release then... Thanks!

Yeah, apparently the auto-compiler only obeys me for some reason. Bitch-slapping it into being more cooperative is on the todo list.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

MaxGiting picture MaxGiting  路  4Comments

fepegar picture fepegar  路  4Comments

gperdomor picture gperdomor  路  3Comments

daltones picture daltones  路  3Comments

UziTech picture UziTech  路  3Comments