在Rubymine的Typescript文件中注入红宝石语言(intellij)

时间:2018-11-04 13:32:33

标签: ruby-on-rails ruby typescript rubymine intellij-14

我正在使用Rails的生成器来创建打字稿文件。这是一个模板示例:

my_template.ts

export class <%=@my_class_name %>{
    <%=@some_field %>:<%=@some_type %>
}

它运行良好并且生成了代码,但是Rubymine无法理解我的文件包含Typescript和Ruby。它会尝试将其解析为一种或另一种语言,具体取决于包含文件的扩展名。

现在,有了html.erb,我们没有遇到这个问题。

index.html.erb

<div>hello <%=@world %></div>

与ts文件相反,ts.html文件将包含许多错误消息,因此html.erb代码将具有精美的颜色。

有没有一种方法可以使IDE在IDE内进行某些配置或使用官方插件工作?

0 个答案:

没有答案