Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/reporting-services/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Syntax 如何在Atom中为细枝文件设置默认语法高亮显示?_Syntax_Twig_Syntax Highlighting_Atom Editor_Color Coding - Fatal编程技术网

Syntax 如何在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:

根据,这个功能应该内置到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
注意,为了安全起见,我已经删除了我的
userId
值,但我在实际配置中有它

奇怪的是,如果我将
customFileTypes
的顺序切换为
themes
,我的主题就会中断。为什么呢


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

我只是在安装了这个软件包之后才得到了Twig支持:

我也在寻找同样的东西,使php Twig软件包也能用于html文件类型,同时还允许呈现html语法。我已将您的
source.twig
更改为
text.html.twig
,这似乎有效:

"*":
  core:
    customFileTypes:
      "text.html.twig": [
        "html"
      ]