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 ?
貢獻指南
這個儲存庫沒有索引到貢獻指南
研究方向
Start by reading vue-mode.el, especially how vue-modes entries are selected for template sections, and compare that with the reported configuration in the issue. Check vue-html-mode.el and reproduce the behavior in a .vue file; done means determining why the added web-mode entries do not activate or documenting the correct behavior.
由索引模型根據 Issue 內容生成。
評估
- 技術堆疊
- emacs, emacs-lisp
- 領域
- tooling
- Issue 類型
- 缺陷
- 難度
- 3/5
- 預估耗時
- 1-2 天
- 活躍度
- 停滯
- 描述清晰度
- 需要釐清
- 新手友好度
- 25/100