Skip to content

feat(lsp): add Dart Language Server support #8

Description

@amondnet

Summary

Add Dart Language Server support to packages/lsp with system-first fallback and auto-download capability.

Background

Based on reference implementations:

  • ref/multispy/src/multilspy/language_servers/dart_language_server/
  • ref/serena/test/solidlsp/dart/

Key Decisions

  • SDK Fallback: System-first - Check if dart is in PATH first, only download SDK if not found
  • SDK Version: Dart SDK 3.7.1 (stable)
  • Storage: ~/.cache/dora/dart-lsp/
  • Root Detection: pubspec.yaml, pubspec.lock

Tasks

  • T001 [P] Add DART_RUNTIME_DEPS constant with platform-specific SDK URLs
  • T002 [P] Add getDartResourcesDir() function
  • T003 Add setupDartDependencies() function (depends on T001, T002)
  • T004 Add DartServer definition (depends on T003)
  • T005 Export DartServer from index.ts (depends on T004)
  • T006 Add DartServer to LSP_SERVERS array (depends on T004)
  • T007 Add tests for DartServer (depends on T006)

Dependencies & Execution Order

Parallel Group 1 (independent):

  • T001: Add DART_RUNTIME_DEPS constant
  • T002: Add getDartResourcesDir() function

Sequential:

  1. T003: setupDartDependencies() (needs T001, T002)
  2. T004: DartServer definition (needs T003)
  3. T005 + T006: Export and add to array (needs T004)
  4. T007: Tests (needs T006)

Files to Modify

  • packages/lsp/src/server.ts - Add DartServer definition with auto-download
  • packages/lsp/src/index.ts - Export DartServer
  • packages/lsp/src/__tests__/server.test.ts - Add DartServer tests

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions