Skip to content

Go to definition is not working in vue SFC components (*.vue files) #27891

Closed Answered by road2coder
FreshHead asked this question in Q&A
Discussion options

You must be logged in to vote

which version? Volar's go to definition doesn't work for vue2.
In addition,the location should be the path of volar otherwise it doesn't work for me.

local data_path = vim.fn.stdpath('data')
local location = data_path.."/mason/packages/vue-language-server/node_modules/@vue/language-server"

return {
  init_options = {
    plugins = {
      {
        name = "@vue/typescript-plugin",
        location = location,
        languages = {"javascript", "typescript", "vue"},
      },
    },
  },
  filetypes = {
    "javascript",
    "typescript",
    "vue",
  },
}

Replies: 1 comment 1 reply

Comment options

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

Answer selected by FreshHead
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #27885 on March 16, 2024 23:29.