feat(lsp): add Vue Language Server support#12
Merged
Conversation
- 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
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
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.
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
packages/lspwith Full Hybrid Mode architecture~/.cache/dora/vue-lsp/Changes
VueServerdefinition inpackages/lsp/src/server.tsArchitecture
@vue/language-serverwithhybridMode: truetypescript-language-server+@vue/typescript-pluginCloses #11
Test plan