Feature Request: Add Dart/Flutter LSP support

Status Fixed / completed
Maintainer reply None cached
Activity 14 comments · opened Jan 8, 2026 · closed Aug 17, 2026

Summary

Add official Dart/Flutter language server support to Claude Code's LSP plugin system.

Motivation

Flutter is one of the most popular cross-platform mobile development frameworks, and Dart is its programming language. Currently, Claude Code supports LSP for many languages (TypeScript, Swift, Python, Go, Rust, Java, Kotlin, C#, C/C++, PHP, Lua) but lacks Dart/Flutter support.

This limits code intelligence features (go-to-definition, find references, hover info, document symbols) when working on Flutter projects.

Proposed Solution

Add a dart-lsp plugin to claude-plugins-official that enables the built-in Dart Analysis Server, similar to how other LSP plugins work.

The Dart SDK includes a language server that can be invoked with:

dart language-server

Suggested Configuration

{
  "dart": {
    "command": "dart",
    "args": ["language-server"],
    "extensionToLanguage": {
      ".dart": "dart"
    }
  }
}

Prerequisites

Users would need the Dart SDK or Flutter SDK installed, which includes the Dart language server.

Alternatives Considered

Attempted using a third-party plugin (dart-analyzer@claude-code-lsps), but Claude Code only supports built-in LSP implementations - external plugins can enable them but not add new language servers.

Additional Context

View original on GitHub ↗

13 Comments

fatihsever · 7 months ago

+1

DrAlexHarrison · 7 months ago

I'd set it up immediately. Super-nice-to-have feature for sure.

fatihsever · 7 months ago
DrAlexHarrison · 7 months ago

Nice!

rosherman2 · 7 months ago

Like!

meerhelm · 6 months ago

+

chrisjoe · 6 months ago

Like !

souoberg · 5 months ago
anthropics/claude-plugins-official#57 I found a PR in the anthropics/claude-plugins-official repo for this. FYI.

why the PR was closed?

neokree · 5 months ago

seems like @tyler-jewell deleted his repo with the change. I think we should open another one. Would be amazing to have this

tyler-jewell · 5 months ago
seems like @tyler-jewell deleted his repo with the change. I think we should open another one. Would be amazing to have this

Yea, sorry. Would be happy to help contribute, can someone more responsible for me start it back up and I can contribute and test out?

michelsciortino · 5 months ago

Hey! I published a dart-lsp plugin in my personal marketplace that provides exactly this.

To install, use /plugin to add the marketplace using the repo URL https://github.com/michelsciortino/claude-plugins
then run: /plugin install dart-lsp@michelsciortino-marketplace.

avifenesh · 4 months ago

@michelsciortino — thanks for shipping the community plugin (https://github.com/michelsciortino/dart-lsp). Quick correction to a warning I posted earlier in this thread: I cast doubt on the lspServers-inline-in-plugin.json mechanism your plugin uses. After more empirical testing on Claude Code 2.1.119 I can confirm it works — it's a third valid config location alongside .lsp.json at the plugin root.

I just spent a session investigating the same question for a Zig plugin and the empirically-working shape on Claude Code 2.1.119 is .lsp.json at the plugin root, which gets copied to ~/.claude/plugins/cache/<marketplace>/<plugin>/<version>/.lsp.json on install. The runtime loader reads from that path. The lspServers-in-plugin.json approach also works — that's the third valid path alongside .lsp.json. The one config location that's empirically inert is lspServers in marketplace.json for non-claude-plugins-official marketplaces.

For Dart, that means a plugins/dart-lsp/.lsp.json like:

{
  "dart": {
    "command": "dart",
    "args": ["language-server", "--client-id=claude-code", "--client-version=1.0"],
    "extensionToLanguage": { ".dart": "dart" }
  }
}

…or keep it inline in plugin.json per @michelsciortino's setup — both work.

One important caveat for any third-party LSP plugin: do not include restartOnCrash or maxRestarts in the manifest. They're in the plugins reference but the runtime rejects them at init with "restartOnCrash is not yet implemented. Remove this field from the configuration." — the whole LSP server fails to initialize. startupTimeout is fine. Working reference layout (Zig, but the shape generalizes): https://github.com/agent-sh/zig-lsp v0.1.1. Empirical writeup of the third-party path with the full A/B comparison: https://github.com/anthropics/claude-code/issues/53399.

To verify any third-party LSP plugin loads:

  • Working: claude --debug log contains Loaded 1 LSP server(s) from plugin: <name> and Total LSP servers loaded: <N>.
  • Broken: log contains Checking plugin <name> with no following Loaded line — the loader sees the plugin but doesn't pick up its server config. Or Failed to initialize LSP server — usually means a bad/unimplemented field in the config.
dawid-niedzwiecki · 2 months ago

💯 🙏 👍

Showing cached comments. Read the full discussion on GitHub ↗