AdamNiederer / AdamNiederer/vue-mode
how to activate web-mode for template
- 主要语言
- Emacs Lisp
- 星标
- 341
- 派生
- 59
- PR 合并指标
- 30 天内没有已合并 PR
描述
Hi,
I've read that mixing web-mode with vue-mode brings unsolved issues, but I've been using web-mode so much (and still continues on non vue projects) that using something different is painful.
So I thought I'd nevertheless try to mix them and see if the benefits of vue-mode would outweight the cons of the issues.
I tried to activate web-mode using this configuration
```elisp
(use-package vue-mode
:config
(add-to-list 'vue-modes '(:type template :name nil :mode web-mode))
(add-to-list 'vue-modes '(:type template :name html :mode web-mode)))
```
in a .vue SFC file, I then have vue-modes' value being
```
vue-modes is a variable defined in vue-mode.el.
Value
((:type template :name html :mode web-mode)
(:type template :name nil :mode web-mode)
(:type template :name nil :mode vue-html-mode)
(:type template :name html :mode vue-html-mode)
(:type template :name jade :mode jade-mode)
...
```
According to this [SE answer](https://emacs.stackexchange.com/questions/3397/how-to-replace-an-element-of-an-alist), I understand the elements I've added at the top of the list would override the default ones.
But when opening a .vue file, the active mode inside a `` section is
```
vue[vue-html] mode defined in ‘vue-html-mode.el’:
Major mode for Vue.js templates.
```
Any idea of what is wrong here ?
贡献指南
这个仓库没有索引到贡献指南
评估
这个 Issue 还没有评估数据。