【发布时间】:2016-07-19 15:57:18
【问题描述】:
问题:如何让WebStorm理解scss中的html
说明:
我已经存在基于vue.js的项目
我已将.vue 与html 语言相关联(.vue == .html)。
一般*.vue 文件的结构如下:
<template>
...
</template>
<script>
...
</script>
<style lang="scss">
$some_var: 10px;
.parent_class {
.child_class {
padding: $some_var;
}
}
</style>
问题在于 WebStorm 没想到会在 html 中看到 scss(而不是纯 css)。
我知道“WebStorm”(以及“IDEA”)有language injection。
但是要理解如何正确使用语言注入对我来说有点挑战。
UPD: 看起来现在可能不可能,因为scss 是模板语言(意味着暂时不可注入):https://stackoverflow.com/a/29062183/930170
【问题讨论】:
标签: intellij-idea webstorm vue.js jetbrains-ide