在 PhpStorm 中创建扩展所有 html 语言功能的自定义语言

Creating custom language in PhpStorm that EXTEND all html language features

是否可以在扩展 HTML 语言的 PhpStorm 中创建自定义语言。 我想为 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>

CoffeeScript 已被 IntelliJ 平台支持,请在 the official website. As to Mammouth you can use handy Custom Language Support Tutorial and IntelliJ Platform SDK Documentation 了解更多信息以研究如何创建您自己的插件。