feat(lsp): add Dart Language Server support#9
Merged
Conversation
Add Dart LSP support with system-first fallback and auto-download: - Check for system `dart` in PATH first - Auto-download Dart SDK 3.7.1 if not found - Support all major platforms: linux-x64, linux-arm64, osx-x64, osx-arm64, win-x64 - Root detection via pubspec.yaml and pubspec.lock Closes #8
7 tasks
- Extract process event handlers to attachLSPProcessHandlers() helper - Add documentation explaining setupDartDependencies vs Kotlin pattern - Add behavioral tests for root detection (pubspec.yaml/pubspec.lock) - Update CLAUDE.md to include Dart in supported servers table
- Add test for nested monorepo package detection (inner pubspec.yaml) - Add test for deep directory structure root detection
- Move tests from src/__tests__/ to test/ directory - Add test/unit/ for unit tests - Add test/integration/ for integration tests - Add test/fixtures/ for test data - Create Dart project fixture for LSP integration tests - Add DartServer integration tests (serena pattern) - Update package.json with test:unit and test:integration scripts Directory structure follows Bun/Elysia conventions: test/ ├── unit/ # Unit tests ├── integration/ # Integration tests └── fixtures/ # Test data
- Use `bun run test` which runs turbo for all packages - Generate coverage from packages/lsp separately - Update coverage file path for Codecov
- Create codecov.yml with component configuration - Define components for each package: code, code-format, code-lsp, dora - Generate coverage reports for all packages with tests - Upload multiple coverage files to Codecov
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
Add Dart Language Server support to
packages/lspwith system-first fallback and auto-download capability.Key Features
dartin PATH firstpubspec.yamlandpubspec.lockChanges
packages/lsp/src/server.ts: Add DartServer definition with DART_RUNTIME_DEPS, getDartResourcesDir(), setupDartDependencies()packages/lsp/src/index.ts: Export DartServerpackages/lsp/src/__tests__/server.test.ts: Add DartServer testsArchitecture
Test Plan
Closes #8