Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Autocomplete, editorconfig, and linting not working #84

Open
mspinelli opened this issue Jul 31, 2018 · 0 comments
Open

Autocomplete, editorconfig, and linting not working #84

mspinelli opened this issue Jul 31, 2018 · 0 comments

Comments

@mspinelli
Copy link

mspinelli commented Jul 31, 2018

Reproduction guide 🪲

  • $ npm install -g vue-language-server
  • Start Emacs
  • Configure dot file:
...
   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: 👀 💔
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: ❤️ 😄
HTML, CSS, and Javascript all lint, autocomplete, and pick up editorconfig settings

System Info 💻

  • 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:
(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 🐾

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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant