如何在Atom for Twig文件中设置默认语法高亮显示?

Mic*_*nch 6 syntax syntax-highlighting color-coding twig atom-editor

根据这个答案,这个功能应该内置在Atom中,我应该可以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
Run Code Online (Sandbox Code Playgroud)

请注意,我已经删除了我userId的安全值,但我确实在我的实际配置中有它.

奇怪的是,如果我改变了customFileTypeswith 的顺序themes,我的主题就会破碎.这是为什么?

更重要的是,如何设置所有.twig文件使用HTML(或HTML Moustache?)语法高亮?

Jav*_*luz 0

安装此软件包后我才获得 Twig 支持:https ://atom.io/packages/php-twig