Feature Request: Add Dart/Flutter LSP support
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
- Dart SDK: https://dart.dev/get-dart
- Flutter SDK: https://flutter.dev/docs/get-started/install
- Dart Language Server Protocol: https://github.com/dart-lang/sdk/blob/main/pkg/analysis_server/doc/lsp.md
Showing cached comments. Read the full discussion on GitHub ↗
13 Comments
+1
I'd set it up immediately. Super-nice-to-have feature for sure.
https://github.com/anthropics/claude-plugins-official/pull/57
I found a PR in the anthropics/claude-plugins-official repo for this. FYI.
Nice!
Like!
+
Like !
why the PR was closed?
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?
Hey! I published a dart-lsp plugin in my personal marketplace that provides exactly this.
To install, use
/pluginto add the marketplace using the repo URLhttps://github.com/michelsciortino/claude-pluginsthen run:
/plugin install dart-lsp@michelsciortino-marketplace.@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.jsonmechanism 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.jsonat 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.jsonat the plugin root, which gets copied to~/.claude/plugins/cache/<marketplace>/<plugin>/<version>/.lsp.jsonon install. The runtime loader reads from that path. ThelspServers-in-plugin.json approach also works — that's the third valid path alongside.lsp.json. The one config location that's empirically inert islspServersinmarketplace.jsonfor non-claude-plugins-officialmarketplaces.For Dart, that means a
plugins/dart-lsp/.lsp.jsonlike:…or keep it inline in
plugin.jsonper @michelsciortino's setup — both work.One important caveat for any third-party LSP plugin: do not include
restartOnCrashormaxRestartsin 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.startupTimeoutis 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:
claude --debuglog containsLoaded 1 LSP server(s) from plugin: <name>andTotal LSP servers loaded: <N>.Checking plugin <name>with no followingLoadedline — the loader sees the plugin but doesn't pick up its server config. OrFailed to initialize LSP server— usually means a bad/unimplemented field in the config.💯 🙏 👍