opencode icon indicating copy to clipboard operation
opencode copied to clipboard

Use latest Vue LSP and integrate with Typescript LSP

Open drevantonder opened this issue 4 months ago • 3 comments

  • In my last PR, I added the Vue LSP (#1952).

  • Turns out @vue/language-tools v3 was released 3 weeks ago.

  • Updates in this PR:

    • Integrated changes from @vue/language-tools v3.
    • Correctly wired Vue + TypeScript LSP so .vue files report TypeScript errors.
    • Added /src/lsp/vue.ts to isolate Vue complexity from server.ts and index.ts.

    If helpful, here's a minimal test I put together of what it takes to get Vue + Typescript working in isolation: https://gist.github.com/drevantonder/29f70c9629e9234866285c2dab98e021

drevantonder avatar Aug 20 '25 06:08 drevantonder

bumping this up! would be really great to have this merged. right now lsp support for .vue files is broken. @thdxr

tanayvk avatar Sep 10 '25 22:09 tanayvk

@thdxr would love to know if/when we can get this merged (or closed if it needs to be).

It's currently a tad bit of friction for me to use opencode with Vue in having to use my dev version. (Its alright though, I'll live 😆)

drevantonder avatar Sep 18 '25 13:09 drevantonder

In the meanwhile, in case it helps someone, I created a patch from this PR to quickly apply updates to dev: opencode-vue-lsp.patch

Just download and save the patch file, pull the latest dev, then do: git apply /path/to/opencode-vue-lsp.patch

Then, run OPENCODE_DRY=true bun run ./script/publish.ts and CTRL-C once the build is ready for your OS. I only made some minor changes to the publish script so that it doesn't mess with the version numbers.

tanayvk avatar Sep 20 '25 08:09 tanayvk