Skip to content

fix(lsp): treat files in any Flutter SDK as dependencies - #539

Merged
sidlatau merged 1 commit into
mainfrom
fix/sdk-dependency-detection
Sep 25, 2026
Merged

sidlatau merged 1 commit into
mainfrom
fix/sdk-dependency-detection

Conversation

@sidlatau

Copy link
Copy Markdown
Collaborator
  • Detect Flutter SDK files by the bin/flutter + bin/cache/dart-sdk markers (same as Dart-Code) instead of only .pub-cache//fvm/versions/ path fragments. SDKs installed via mise, asdf, puro, Homebrew, etc. are now read-only and reuse the project's dartls client instead of starting one rooted at the SDK (whose pubspec.yaml is a pub workspace root).
  • attach() resolves the root from the buffer it was called for; with flutter_lookup_cmd the config callback is async and previously used whichever buffer was current.

Fixes #534

Detect the SDK by its bin/flutter and bin/cache/dart-sdk markers instead of
path fragments, so SDKs installed via mise, asdf, puro, etc. are read-only
and reuse the project's dartls client. Resolve the root from the attached
buffer rather than whichever buffer is current when the async config
callback runs.

Fixes #534
@sidlatau
sidlatau merged commit 48a2a7c into main Sep 25, 2026
3 checks passed
@sidlatau
sidlatau deleted the fix/sdk-dependency-detection branch September 25, 2026 08:24
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.

[BUG] Opening a file inside a version-manager-installed SDK roots dartls in the Flutter SDK itself

1 participant