Skip to content

Emacs setup for vue + typescript (volar + eglot + web-mode) #1184

Answered by sierkov-bot
aadi58002 asked this question in Q&A
Discussion options

You must be logged in to vote

Had the same issue and this is what worked for me:

;; web-mode setup
(define-derived-mode vue-mode web-mode "Vue")
(add-to-list 'auto-mode-alist '("\\.vue\\'" . vue-mode))

(defun vue-eglot-init-options ()
             (let ((tsdk-path (expand-file-name
                               "lib"
                               (shell-command-to-string "npm list --global --parseable typescript | head -n1 | tr -d \"\n\""))))
               `(:typescript (:tsdk ,tsdk-path
                              :languageFeatures (:completion
                                                 (:defaultTagNameCase "both"
                                                  :defaultAttrNameCase "kebabCase"
         …

Replies: 7 comments 17 replies

Comment options

You must be logged in to vote
1 reply
@pbgc
Comment options

Answer selected by aadi58002
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
2 replies
@trev-dev
Comment options

@trev-dev
Comment options

Comment options

You must be logged in to vote
9 replies
@garyo
Comment options

@pbgc
Comment options

@pbgc
Comment options

@garyo
Comment options

@pbgc
Comment options

Comment options

You must be logged in to vote
1 reply
@pedroprieto
Comment options

Comment options

You must be logged in to vote
2 replies
@garyo
Comment options

@pbgc
Comment options

Comment options

You must be logged in to vote
2 replies
@pbgc
Comment options

@garyo
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
10 participants