【问题标题】:Creating custom language in PhpStorm that EXTEND all html language features在 PhpStorm 中创建扩展所有 html 语言功能的自定义语言
【发布时间】:2016-04-08 03:38:30
【问题描述】:

是否可以在 PhpStorm 中创建自定义语言来扩展 HTML 语言。 我想向 HTML 添加 CoffeeScript 和 Mammouth 支持。像这样:

<!Doctype html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>Second</title>
</head>
<body>
  <p>{{ echo 'mammouth' }}</p>
  <script>
    alert 'Hello CoffeScript!'
  </script>
</body>
</html>

将编译为:

<!Doctype html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>Second</title>
</head>
<body>
  <p><?php echo "mammouth"; ?></p>
  <script>
    alert ('Hello CoffeScript!');
  </script>
</body>
</html>

【问题讨论】:

    标签: javascript html coffeescript phpstorm


    【解决方案1】:

    CoffeeScript 已经被 IntelliJ 平台支持,请在the official website 了解更多信息。至于 Mammouth 你可以使用方便的Custom Language Support TutorialIntelliJ Platform SDK Documentation 来学习如何创建自己的插件。

    【讨论】:

      猜你喜欢
      • 2014-05-30
      • 1970-01-01
      • 2017-09-13
      • 1970-01-01
      • 1970-01-01
      • 2015-08-21
      • 2017-03-02
      • 2011-12-14
      相关资源
      最近更新 更多