How can make the vue 3 lsp work with typescript? #13671
-
Hello, so first of all i know there are discussions already on this, but they dont seem to work for typescript integration. How can i make vue work with helix? when i helix -v and look at the logs i get this:
hx --health vue doesnt give any indications. those were some of the config i tried but didnt worked: [language-server.vue-language-server]
command = "vue-language-server"
args = ["--stdio"]
config = { typescript = { tsdk = "C:\\Users\\myname\\AppData\\Roaming\\npm\\node_modules\\typescript\\lib" } }
[[language]]
name = "vue"
scope = "source.vue"
file-types = ["vue"]
language-servers = ["vue-language-server"]
auto-format = true
roots = ["package.json"]
injection-regex = "vue"
formatter = { command = "dprint", args = [ "fmt", "--stdin", "vue" ] } my current one:
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
This is basically my setup, primarily referencing the discussion at #10691 and another issue (though I can't recall which one specifically). The configurations mentioned in those issues might not be entirely correct or could be somewhat outdated, especially considering how frequently Vue LSP updates. So, I've made some adjustments. For Helix, I generally think it's best to prioritize the simplest configuration possible. You could try setting things up without linters or other extras first, aiming for a minimal working LSP implementation. Then, you can gradually add other configurations on top of that. If your project doesn't strictly require ESLint, I'd recommend looking into Biome or OxLint. These modern tools often have better CLI experiences and are quite easy to integrate into various editors. One more thing: using a globally installed TypeScript might seem a bit like a workaround, but it works quite reliably – at least it isn't affected by workspace-specific setups or similar issues. Hope this helps! |
Beta Was this translation helpful? Give feedback.
with ur config i get
but i found a config that works!