AdamNiederer / AdamNiederer/vue-mode

Autocomplete, editorconfig, and linting not working

未关闭
#84 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
主要语言
Emacs Lisp
星标
341
派生
59
PR 合并指标
30 天内没有已合并 PR

描述

#### Reproduction guide :beetle:
- `$ npm install -g vue-language-server`
- Start Emacs
- Configure dot file:
```elisp
...
dotspacemacs-additional-packages '(editorconfig
add-node-modules-path
vue-mode
lsp-mode
lsp-vue
lsp-ui
company-lsp)
...

(defun dotspacemacs/user-config ()
(editorconfig-mode 1)

;; ## Vue.JS stuff Start ##
;; https://medium.com/@aria_39488/improving-vue-mode-for-better-vue-js-editing-inside-of-spacemacs-4509f0577ea0
(require 'vue-mode)
(add-to-list 'vue-mode-hook #'smartparens-mode)

(require 'lsp-mode)
(require 'lsp-vue)
(add-hook 'vue-mode-hook #'lsp-vue-mmm-enable)
;; Error: (Spacemacs) Error in dotspacemacs/user-config: Flycheck support has been moved
;; to package lsp-ui. Please consult https://github.com/emacs-lsp/lsp-ui for documentation on lsp-ui-flycheck.
;;(with-eval-after-load 'lsp-mode
;; (require 'lsp-flycheck))
(require 'lsp-ui)
(add-hook 'lsp-mode-hook 'lsp-ui-mode)
(add-hook 'lsp-ui-mode-hook 'flycheck-mode)
(add-hook 'lsp-ui-mode-hook 'add-node-modules-path)

(require 'company-lsp)
(push 'company-lsp company-backends)
(add-to-list 'company-backends 'company-tern)
(add-hook 'js-mode-hook #'tern-mode)

(require 'company)
(global-company-mode)
(global-set-key (kbd "TAB") #'company-indent-or-complete-common)

;; https://github.com/emacs-lsp/lsp-mode/issues/318

(setq lsp-ui-doc-enable nil
lsp-ui-peek-enable nil
lsp-ui-sideline-enable nil
lsp-ui-imenu-enable nil
lsp-ui-flycheck-enable t)
;; ## Vue.JS stuff End ##
)
```

*Observed behaviour:* :eyes: :broken_heart:
Autocomplete works for Javascript only (but not CSS as exemplified in this project's readme). Linting does not work at all (it does work just fine in plain old .js files (or if it run `vue-mode-edit-all-indirect` and `M-x flycheck-mode`, but this is not ideal).

*Expected behaviour:* :heart: :smile:
HTML, CSS, and Javascript all lint, autocomplete, and pick up editorconfig settings

#### System Info :computer:
- OS: gnu/linux
- Emacs: 26.1
- Spacemacs: 0.200.13
- Spacemacs branch: master (rev. c7a103a77)
- Graphic display: t
- Distribution: spacemacs
- Editing style: vim
- Completion: helm
- Layers:
```elisp
(html javascript auto-completion c-c++ emacs-lisp git vagrant ruby themes-megapack
(python :variables python-test-runner 'pytest)
ess colors markdown org
(shell :variables shell-default-height 30 shell-default-position 'bottom)
spell-checking syntax-checking html yaml version-control)
```
- System configuration features: XPM JPEG TIFF GIF PNG SOUND DBUS GSETTINGS NOTIFY GNUTLS FREETYPE XFT ZLIB TOOLKIT_SCROLL_BARS GTK3 X11 THREADS

#### Backtrace :paw_prints:
The only error I see in messages is the following. I have no idea if this is related:
```
Not enabling jit-lock: it does not work in indirect buffer
```
Syntax Checkers appear to be enabled (`SPC e v`):
```
lsp-ui
- may enable: yes
- predicate: t

javascript-eslint
- may enable: yes
- executable: Found at ****/node_modules/.bin/eslint
- config file: found

javascript-jshint
- may enable: Automatically disabled!
- executable: Not found
- configuration file: Not found

javascript-standard
- may enable: Automatically disabled!
- executable: Not found

The following checker is explicitly selected for this buffer:

lsp-ui
- major mode: `js-mode' supported
- may enable: yes
- predicate: t

Flycheck Mode is enabled. Use SPC u C-c ! x to enable disabled checkers.
```

贡献指南

这个仓库没有索引到贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。