According to this answer, this functionality should be built into Atom, and I should be able to use customFileTypes
to accomplish this. This is what my config looks like:
"*":
"exception-reporting":
userId: ""
welcome:
showOnStartup: false
core:
themes: [
"atom-light-ui"
"atom-light-syntax"
]
customFileTypes:
"source.twig": [
"html"
]
editor:
invisibles: {}
tabLength: 4
showIndentGuide: true
showInvisibles: true
Note that I've removed my userId
value for security, but I do have it in my actual config.
Oddly enough, if I switch the order of customFileTypes
with themes
, my theme breaks. Why is that?
More importantly, how can I set all .twig
files use HTML (or HTML Mustache?) syntax highlighting?
I was looking for the same thing, to enable the php-twig package to also work for html filetypes while also allowing the html syntax to be rendered. I changed your source.twig
to text.html.twig
which seems to be working:
"*":
core:
customFileTypes:
"text.html.twig": [
"html"
]
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With