Vue's LSP only partially supported #10691
Replies: 7 comments 4 replies
-
It's weird that Helix has no proper support for Vue because Vue is very popular, some people will just refuse to use Helix because they write vue |
Beta Was this translation helpful? Give feedback.
-
Run |
Beta Was this translation helpful? Give feedback.
-
Here is the log I use macOS, build from source code 5c11af1 and it's the same on any terminal emulators |
Beta Was this translation helpful? Give feedback.
-
Volar changed the way the server works...again.I'd recommend you adapt this https://github.com/vuejs/language-tools?tab=readme-ov-file#none-hybrid-modesimilar-to-takeover-mode-configuration-requires-vuelanguage-server-version-207 I've stopped using Helix for Volar based LSPs just because I'm tired of dealing with the pacing of the tooling(this is not the fault of Helix). [language_server.typescript-language-server]
filetypes = ["javascript", "typescript"]
roots = ["package.json", "tsconfig.json", "jsconfig.json", ".git", ".hg"]
command = "typescript-language-server"
args = ["--stdio"]
settings_section = "_"
[language_server.typescript-language-server.settings._]
quotePreference = "double"
typescript.format.semicolons = "insert"
plugins = [{name = "@vue/typescript-plugin", location = "/path/to/bin/vue-language-server", languages = ["vue"]}]
[language_server.vuels]
filetypes = ["vue"]
command = "vue-language-server"
roots = ["package.json", ".git"]
args = ["--stdio"]
settings_section = "_"
[language_server.vuels.settings._]
vue = { hybridMode = false }
typescript = { tsdk = "node_modules/typescript/lib/" } |
Beta Was this translation helpful? Give feedback.
-
After searching the web and trying a lot, I finally got it working in Helix: [language-server.typescript-language-server.config]
plugins = [{ name = "@vue/typescript-plugin", location = <path to "/@vue/language-server">, languages = ["vue"] }]
[language-server.volar]
command = "vue-language-server"
args = ["--stdio"]
[language-server.volar.config]
vue = { hybridMode = false }
typescript = { tsdk = <path to "/typescript/lib" }
[[language]]
name = "vue"
scope = "source.vue"
injection-regex = "vue"
file-types = ["vue"]
roots = ["package.json", ".git"]
auto-format = true
language-servers = ["volar"]
formatter = { command = 'prettier', args = ["--parser", "vue"] } |
Beta Was this translation helpful? Give feedback.
-
@stefanfrede Thank you so much! Your config finally worked for me as well in Vue! I was ready to give up on Helix tbh, thank you! |
Beta Was this translation helpful? Give feedback.
-
Actually I found two ways to configure Vue's LSP: with Hybrid mode was added to There is more written about it in the README. Find the text "How to configure vue language server with neovim and lsp?", click on it to expand some recommendations. I did this research to better decide whether to enable or disable it. With
|
Beta Was this translation helpful? Give feedback.
-
https://github.com/vuejs/language-tools mostly works only in script tag and has no completion for css and template parts
Beta Was this translation helpful? Give feedback.
All reactions