根據this answer,此功能應該內置到Atom中,我應該能夠使用customFileTypes
來完成此操作。這是我的配置是這樣的:如何在Atom for Twig文件中設置默認語法突出顯示?
"*":
"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
請注意,我已經刪除我的安全userId
價值,但我確實有它在我的實際配置。
奇怪的是,如果我將customFileTypes
的順序改爲themes
,我的主題就會中斷。這是爲什麼?
更重要的是,我如何設置所有.twig
文件使用HTML(或HTML Mustache?)語法突出顯示?
似乎工作。 –