Syntax 如何在Atom中为细枝文件设置默认语法高亮显示?
根据,这个功能应该内置到Atom中,我应该能够使用Syntax 如何在Atom中为细枝文件设置默认语法高亮显示?,syntax,twig,syntax-highlighting,atom-editor,color-coding,Syntax,Twig,Syntax Highlighting,Atom Editor,Color Coding,根据,这个功能应该内置到Atom中,我应该能够使用customFileTypes来实现这一点。我的配置是这样的: "*": "exception-reporting": userId: "" welcome: showOnStartup: false core: themes: [ "atom-light-ui" "atom-light-syntax" ] customFileTypes:
customFileTypes
来实现这一点。我的配置是这样的:
"*":
"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?)语法高亮显示 我只是在安装了这个软件包之后才得到了Twig支持:我也在寻找同样的东西,使php Twig软件包也能用于html文件类型,同时还允许呈现html语法。我已将您的source.twig
更改为text.html.twig
,这似乎有效:
"*":
core:
customFileTypes:
"text.html.twig": [
"html"
]