Skip to content

feat(lsp): add Vue Language Server support#12

Merged
amondnet merged 3 commits intomainfrom
11-featlsp-add-vue-language-server-support
Dec 17, 2025
Merged

feat(lsp): add Vue Language Server support#12
amondnet merged 3 commits intomainfrom
11-featlsp-add-vue-language-server-support

Conversation

@amondnet
Copy link
Copy Markdown
Contributor

Summary

  • Add Vue Language Server support to packages/lsp with Full Hybrid Mode architecture
  • Implements dual-server coordination: Vue LS + companion TypeScript LS
  • npm-based auto-install of dependencies to ~/.cache/dora/vue-lsp/

Changes

  • Add VueServer definition in packages/lsp/src/server.ts
  • Add npm-based dependency management (similar to Kotlin/Dart patterns)
  • Add unit tests for VueServer
  • Add integration tests with Vue project fixture

Architecture

  • VueServer - Main Vue language server using @vue/language-server with hybridMode: true
  • Companion TypeScript Server - typescript-language-server + @vue/typescript-plugin

Closes #11

Test plan

  • Unit tests pass for VueServer definition
  • Integration tests verify LSP server starts and responds
  • Manual testing with Vue project

- Add VueServer definition in packages/lsp/src/server.ts with Full Hybrid Mode
- Implements npm-based auto-install of Vue LSP dependencies to ~/.cache/dora/vue-lsp/
- Dual-server coordination: @vue/language-server + companion TypeScript LS
- Export VueServer from packages/lsp/src/index.ts
- Add VueServer to LSP_SERVERS array for plugin integration

Closes #11
@amondnet amondnet linked an issue Dec 17, 2025 that may be closed by this pull request
9 tasks
- Enhance VueServer with hybridMode initialization options
- Add VUE_RUNTIME_DEPS with structured version management
- Add getVueExpectedVersion() for version tracking
- Improve setupVueDependencies() to return dependency paths
- Add comprehensive unit tests for VueServer:
  - Basic server properties (id, extensions, root, spawn)
  - Root detection for package.json and lock files
  - Deno project exclusion (deno.json and deno.jsonc)
  - Monorepo nested package detection
- Add vue-project test fixture with App.vue, Calculator.vue, math.ts
- Add integration tests for Vue LSP server operations:
  - Server connection and status
  - Diagnostics for Vue files
  - Hover, workspace symbols, document symbols
  - Cross-file TypeScript utility support

Closes #11
@amondnet amondnet marked this pull request as ready for review December 17, 2025 18:48
Error handling improvements:
- Check for ENOENT specifically when accessing executables
- Check for ENOENT specifically when reading version file
- Log unexpected errors instead of silently swallowing them
- Isolate version file write failure (non-fatal)
- Verify each required path individually with specific error messages

Additional unit tests:
- Add 'no package.json fallback' test for VueServer.root
- Add 'deep nesting root detection' test for VueServer.root

These changes follow the established patterns from KotlinServer and
DartServer for consistent error handling across LSP implementations.
@amondnet amondnet merged commit 8e820e7 into main Dec 17, 2025
3 checks passed
@passionfactory-bot passionfactory-bot bot mentioned this pull request Dec 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(lsp): add Vue Language Server support

1 participant