syl20bnr / spacemacs

A community-driven Emacs distribution - The best editor is neither Emacs nor Vim, it's Emacs *and* Vim!
http://spacemacs.org
GNU General Public License v3.0
23.68k stars 4.89k forks source link

vue layer: vls keeps throwing code action errors #14044

Closed NANASHI0X74 closed 4 years ago

NANASHI0X74 commented 4 years ago

Description :octocat:

vue-mode vls langserver keeps throwing errors: LSP :: Error from the Language Server: Request textDocument/codeAction failed with message: Cannot read property 'codeActions' of undefined (Internal Error) [3 times]

This is similar to: https://github.com/vuejs/vetur/issues/2355 which is supposedly fixed by https://github.com/emacs-lsp/lsp-mode/commit/46d1a7e4029fb141d41504095e0e10741c7fb624 but I'm not sure how to find out which version of lsp-mode emacs and the vue layer is using? :sweat_smile:

Reproduction guide :beetle:

Observed behaviour: :eyes: :broken_heart:

Expected behaviour: :heart: :smile:

System Info :computer:

Backtrace :paw_prints:

none

thanhvg commented 4 years ago

If there is an update from upstream then you need to update your packages. SPC b h then click or enter on [Update Packages]

duianto commented 4 years ago

I'm not seeing any errors on the latest develop branch with updated packages. With this example.vue file:

<div id="app">
<h1>{{ message }}</h1>
</div>

<script>
var myObject = new Vue({
    el: '#app',
    data: {message: 'Hello Vue!'}
})
</script>

You can view your lsp-mode version in: ~/.emacs.d/elpa/27.1/develop/lsp-mode-20201016.1633/lsp-mode.el

Currently it's: ;; Version: 7.1.0

Manjaro, System Info (Click to expand)
#### System Info :computer:
- OS: gnu/linux
- Emacs: 27.1
- Spacemacs: 0.300.0
- Spacemacs branch: develop (rev. f2b17d8cd)
- Graphic display: t
- Distribution: spacemacs
- Editing style: vim
- Completion: helm
- Layers:
```elisp
(emacs-lisp git helm lsp multiple-cursors
            (org :variables org-agenda-files
                 '("~/org/notes.org"))
            rust spell-checking syntax-checking version-control
            (vue :variables vue-backend 'lsp)
            treemacs)
```
- System configuration features: XPM JPEG TIFF GIF PNG RSVG CAIRO SOUND GPM DBUS GSETTINGS GLIB NOTIFY INOTIFY ACL GNUTLS LIBXML2 FREETYPE HARFBUZZ M17N_FLT LIBOTF ZLIB TOOLKIT_SCROLL_BARS GTK3 X11 XDBE XIM MODULES THREADS LIBSYSTEMD JSON PDUMPER LCMS2 GMP

Windows 10, System Info (Click to expand)
#### System Info :computer:
- OS: windows-nt
- Emacs: 27.1
- Spacemacs: 0.300.0
- Spacemacs branch: develop (rev. ac3c3546a)
- Graphic display: t
- Distribution: spacemacs
- Editing style: vim
- Completion: ivy
- Layers:
```elisp
(autohotkey emacs-lisp
            (erlang :variables erlang-enable-lsp-mode t)
            git ivy javascript lsp multiple-cursors
            (org :variables org-agenda-files
                 '("c:/Users/username/org/")
                 org-enable-jira-support t org-enable-roam-support t)
            python rust shell spell-checking syntax-checking version-control treemacs
            (vue :variables vue-backend 'lsp)
            yaml)
```
- System configuration features: XPM JPEG TIFF GIF PNG RSVG SOUND NOTIFY W32NOTIFY ACL GNUTLS LIBXML2 HARFBUZZ ZLIB TOOLKIT_SCROLL_BARS MODULES THREADS JSON PDUMPER LCMS2 GMP

NANASHI0X74 commented 4 years ago

thanks, updating packages fixed it :see_no_evil: