From b58e92a54d78f7ee5df7f779dce7c7bca14291de Mon Sep 17 00:00:00 2001 From: Tyler Jewell Date: Thu, 25 Dec 2025 11:40:48 -0700 Subject: [PATCH 1/5] feat: add Dart/Flutter language server plugin MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add dart-analyzer LSP plugin using the Dart Analysis Server bundled with the Dart SDK. Includes Flutter-optimized initialization options and a session hook to verify SDK installation. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 --- .claude-plugin/marketplace.json | 11 ++++++++++ dart-analyzer/.lsp.json | 27 +++++++++++++++++++++++ dart-analyzer/hooks/check-dart.sh | 36 +++++++++++++++++++++++++++++++ dart-analyzer/hooks/hooks.json | 16 ++++++++++++++ 4 files changed, 90 insertions(+) create mode 100644 dart-analyzer/.lsp.json create mode 100755 dart-analyzer/hooks/check-dart.sh create mode 100644 dart-analyzer/hooks/hooks.json diff --git a/.claude-plugin/marketplace.json b/.claude-plugin/marketplace.json index c5b9a52..280ca69 100644 --- a/.claude-plugin/marketplace.json +++ b/.claude-plugin/marketplace.json @@ -129,6 +129,17 @@ "author": { "name": "Jan Kott" } + }, + { + "name": "dart-analyzer", + "version": "1.0.0", + "source": "./dart-analyzer", + "description": "Dart/Flutter language server", + "category": "development", + "tags": ["dart", "flutter", "lsp"], + "author": { + "name": "Tyler Jewell" + } } ] } diff --git a/dart-analyzer/.lsp.json b/dart-analyzer/.lsp.json new file mode 100644 index 0000000..8226b4e --- /dev/null +++ b/dart-analyzer/.lsp.json @@ -0,0 +1,27 @@ +{ + "dart": { + "command": "dart", + "args": ["language-server", "--client-id=claude-code.dart-analyzer", "--client-version=1.0.0"], + "extensionToLanguage": { + ".dart": "dart" + }, + "transport": "stdio", + "initializationOptions": { + "onlyAnalyzeProjectsWithOpenFiles": false, + "suggestFromUnimportedLibraries": true, + "closingLabels": false, + "outline": true, + "flutterOutline": true + }, + "settings": { + "dart": { + "completeFunctionCalls": true, + "enableSnippets": true, + "showTodos": false, + "documentation": "full", + "includeDependenciesInWorkspaceSymbols": true + } + }, + "maxRestarts": 3 + } +} diff --git a/dart-analyzer/hooks/check-dart.sh b/dart-analyzer/hooks/check-dart.sh new file mode 100755 index 0000000..bb473b2 --- /dev/null +++ b/dart-analyzer/hooks/check-dart.sh @@ -0,0 +1,36 @@ +#!/bin/bash + +# Check if Dart SDK is installed and available in PATH + +if command -v dart &> /dev/null; then + DART_VERSION=$(dart --version 2>&1) + exit 0 +fi + +# Check common Dart/Flutter installation paths +FLUTTER_DART="$FLUTTER_ROOT/bin/cache/dart-sdk/bin/dart" +if [ -n "$FLUTTER_ROOT" ] && [ -x "$FLUTTER_DART" ]; then + echo "[dart-analyzer] Dart found via FLUTTER_ROOT: $FLUTTER_ROOT" + echo " Add to PATH: export PATH=\"\$PATH:\$FLUTTER_ROOT/bin/cache/dart-sdk/bin\"" + exit 0 +fi + +# Check for Flutter in common locations +for FLUTTER_PATH in "$HOME/flutter" "$HOME/.flutter" "/opt/flutter" "/usr/local/flutter"; do + if [ -x "$FLUTTER_PATH/bin/cache/dart-sdk/bin/dart" ]; then + echo "[dart-analyzer] Dart found at: $FLUTTER_PATH/bin/cache/dart-sdk/bin/dart" + echo " Add to PATH: export PATH=\"\$PATH:$FLUTTER_PATH/bin/cache/dart-sdk/bin\"" + exit 0 + fi +done + +# Dart not found +echo "[dart-analyzer] Dart SDK not found in PATH." +echo "" +echo "Install options:" +echo " 1. Flutter (includes Dart): https://docs.flutter.dev/get-started/install" +echo " 2. Dart only: https://dart.dev/get-dart" +echo "" +echo "After installation, ensure 'dart' is in your PATH." + +exit 0 diff --git a/dart-analyzer/hooks/hooks.json b/dart-analyzer/hooks/hooks.json new file mode 100644 index 0000000..8fff46e --- /dev/null +++ b/dart-analyzer/hooks/hooks.json @@ -0,0 +1,16 @@ +{ + "description": "Check for Dart SDK installation on session start", + "hooks": { + "SessionStart": [ + { + "hooks": [ + { + "type": "command", + "command": "bash ${CLAUDE_PLUGIN_ROOT}/hooks/check-dart.sh", + "timeout": 30 + } + ] + } + ] + } +} From 3891d8c274cac4bec4a8994e4d5dca5db9a17762 Mon Sep 17 00:00:00 2001 From: Tyler Jewell Date: Thu, 25 Dec 2025 11:56:32 -0700 Subject: [PATCH 2/5] feat: add Dart/Flutter language server plugin (v1.1.0) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 --- .claude-plugin/marketplace.json | 2 +- dart-analyzer/.claude-plugin/plugin.json | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) create mode 100644 dart-analyzer/.claude-plugin/plugin.json diff --git a/.claude-plugin/marketplace.json b/.claude-plugin/marketplace.json index 280ca69..48eb9ad 100644 --- a/.claude-plugin/marketplace.json +++ b/.claude-plugin/marketplace.json @@ -3,7 +3,7 @@ "name": "claude-code-lsps", "metadata": { "description": "LSP plugins for Claude Code", - "version": "1.0.0" + "version": "1.1.0" }, "owner": { "name": "Jan Kott" diff --git a/dart-analyzer/.claude-plugin/plugin.json b/dart-analyzer/.claude-plugin/plugin.json new file mode 100644 index 0000000..493b7ef --- /dev/null +++ b/dart-analyzer/.claude-plugin/plugin.json @@ -0,0 +1,8 @@ +{ + "name": "dart-analyzer", + "description": "Dart/Flutter language server", + "version": "1.0.0", + "author": { + "name": "Tyler Jewell" + } +} From dba6996f99742eaad8f447e1625aed31f82f08f6 Mon Sep 17 00:00:00 2001 From: Tyler Jewell Date: Thu, 25 Dec 2025 12:02:27 -0700 Subject: [PATCH 3/5] fix: update dart-analyzer plugin version to 1.1.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 --- .claude-plugin/marketplace.json | 2 +- dart-analyzer/.claude-plugin/plugin.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.claude-plugin/marketplace.json b/.claude-plugin/marketplace.json index 48eb9ad..280ca69 100644 --- a/.claude-plugin/marketplace.json +++ b/.claude-plugin/marketplace.json @@ -3,7 +3,7 @@ "name": "claude-code-lsps", "metadata": { "description": "LSP plugins for Claude Code", - "version": "1.1.0" + "version": "1.0.0" }, "owner": { "name": "Jan Kott" diff --git a/dart-analyzer/.claude-plugin/plugin.json b/dart-analyzer/.claude-plugin/plugin.json index 493b7ef..716c943 100644 --- a/dart-analyzer/.claude-plugin/plugin.json +++ b/dart-analyzer/.claude-plugin/plugin.json @@ -1,7 +1,7 @@ { "name": "dart-analyzer", "description": "Dart/Flutter language server", - "version": "1.0.0", + "version": "1.1.0", "author": { "name": "Tyler Jewell" } From d1984f70ef29936410be8e411cc9c127385e89e5 Mon Sep 17 00:00:00 2001 From: Tyler Jewell Date: Thu, 25 Dec 2025 12:38:14 -0700 Subject: [PATCH 4/5] fix: rename dart-analyzer plugin to dart-lsp MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Rename directory from dart-analyzer to dart-lsp - Update plugin.json name to dart-lsp - Update .lsp.json client-id to claude-code.dart-lsp 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 --- {dart-analyzer => dart-lsp}/.claude-plugin/plugin.json | 2 +- {dart-analyzer => dart-lsp}/.lsp.json | 2 +- {dart-analyzer => dart-lsp}/hooks/check-dart.sh | 0 {dart-analyzer => dart-lsp}/hooks/hooks.json | 0 4 files changed, 2 insertions(+), 2 deletions(-) rename {dart-analyzer => dart-lsp}/.claude-plugin/plugin.json (81%) rename {dart-analyzer => dart-lsp}/.lsp.json (85%) rename {dart-analyzer => dart-lsp}/hooks/check-dart.sh (100%) rename {dart-analyzer => dart-lsp}/hooks/hooks.json (100%) diff --git a/dart-analyzer/.claude-plugin/plugin.json b/dart-lsp/.claude-plugin/plugin.json similarity index 81% rename from dart-analyzer/.claude-plugin/plugin.json rename to dart-lsp/.claude-plugin/plugin.json index 716c943..78be25b 100644 --- a/dart-analyzer/.claude-plugin/plugin.json +++ b/dart-lsp/.claude-plugin/plugin.json @@ -1,5 +1,5 @@ { - "name": "dart-analyzer", + "name": "dart-lsp", "description": "Dart/Flutter language server", "version": "1.1.0", "author": { diff --git a/dart-analyzer/.lsp.json b/dart-lsp/.lsp.json similarity index 85% rename from dart-analyzer/.lsp.json rename to dart-lsp/.lsp.json index 8226b4e..fbd8714 100644 --- a/dart-analyzer/.lsp.json +++ b/dart-lsp/.lsp.json @@ -1,7 +1,7 @@ { "dart": { "command": "dart", - "args": ["language-server", "--client-id=claude-code.dart-analyzer", "--client-version=1.0.0"], + "args": ["language-server", "--client-id=claude-code.dart-lsp", "--client-version=1.0.0"], "extensionToLanguage": { ".dart": "dart" }, diff --git a/dart-analyzer/hooks/check-dart.sh b/dart-lsp/hooks/check-dart.sh similarity index 100% rename from dart-analyzer/hooks/check-dart.sh rename to dart-lsp/hooks/check-dart.sh diff --git a/dart-analyzer/hooks/hooks.json b/dart-lsp/hooks/hooks.json similarity index 100% rename from dart-analyzer/hooks/hooks.json rename to dart-lsp/hooks/hooks.json From 454dc5cb3a281ed28a027aa1a9c5fd318f9aa05c Mon Sep 17 00:00:00 2001 From: Jan Kott <51777660+boostvolt@users.noreply.github.com> Date: Sat, 3 Jan 2026 00:04:48 +0100 Subject: [PATCH 5/5] fix: address PR review comments for dart-analyzer - Rename dart-lsp directory to dart-analyzer - Update plugin name to dart-analyzer (matching marketplace.json) - Update version to 1.0.0 (matching marketplace.json) - Update client-id to claude-code.dart-analyzer - Remove default initialization options and settings - Add dart-analyzer to README table and install instructions --- README.md | 22 +++++++++++++++ dart-analyzer/.claude-plugin/plugin.json | 8 ++++++ dart-analyzer/.lsp.json | 13 +++++++++ .../hooks/check-dart.sh | 0 {dart-lsp => dart-analyzer}/hooks/hooks.json | 0 dart-lsp/.claude-plugin/plugin.json | 8 ------ dart-lsp/.lsp.json | 27 ------------------- 7 files changed, 43 insertions(+), 35 deletions(-) create mode 100644 dart-analyzer/.claude-plugin/plugin.json create mode 100644 dart-analyzer/.lsp.json rename {dart-lsp => dart-analyzer}/hooks/check-dart.sh (100%) rename {dart-lsp => dart-analyzer}/hooks/hooks.json (100%) delete mode 100644 dart-lsp/.claude-plugin/plugin.json delete mode 100644 dart-lsp/.lsp.json diff --git a/README.md b/README.md index 6587a41..5321e0a 100644 --- a/README.md +++ b/README.md @@ -33,6 +33,7 @@ The Language Server Protocol provides IDE-like intelligence to Claude Code. On s | [rust-analyzer](./rust-analyzer) | Rust | [rust-analyzer](https://github.com/rust-lang/rust-analyzer) | | [solargraph](./solargraph) | Ruby | [Solargraph](https://github.com/castwide/solargraph) | | [vscode-html-css](./vscode-html-css) | HTML/CSS | [vscode-langservers](https://github.com/hrsh7th/vscode-langservers-extracted) | +| [dart-analyzer](./dart-analyzer) | Dart/Flutter | [Dart SDK](https://dart.dev/tools/dart-analyze) | ## Getting Started @@ -73,6 +74,7 @@ Install individual plugins: /plugin install rust-analyzer@claude-code-lsps /plugin install solargraph@claude-code-lsps /plugin install vscode-html-css@claude-code-lsps +/plugin install dart-analyzer@claude-code-lsps ``` Or browse and install interactively: @@ -210,6 +212,26 @@ npm install -g vscode-langservers-extracted +
+Dart/Flutter (dart-analyzer) + +Install Dart SDK: + +```bash +brew tap dart-lang/dart +brew install dart +``` + +Or install Flutter (includes Dart): + +```bash +# See https://docs.flutter.dev/get-started/install +``` + +Ensure `dart` is in your PATH. + +
+ --- ## Creating Your Own Plugin diff --git a/dart-analyzer/.claude-plugin/plugin.json b/dart-analyzer/.claude-plugin/plugin.json new file mode 100644 index 0000000..5b6e7ef --- /dev/null +++ b/dart-analyzer/.claude-plugin/plugin.json @@ -0,0 +1,8 @@ +{ + "name": "dart-analyzer", + "description": "Dart/Flutter language server", + "version": "1.0.0", + "author": { + "name": "Jan Kott" + } +} diff --git a/dart-analyzer/.lsp.json b/dart-analyzer/.lsp.json new file mode 100644 index 0000000..b2ccbb9 --- /dev/null +++ b/dart-analyzer/.lsp.json @@ -0,0 +1,13 @@ +{ + "dart": { + "command": "dart", + "args": ["language-server", "--client-id=claude-code.dart-analyzer", "--client-version=1.0.0"], + "extensionToLanguage": { + ".dart": "dart" + }, + "transport": "stdio", + "initializationOptions": {}, + "settings": {}, + "maxRestarts": 3 + } +} diff --git a/dart-lsp/hooks/check-dart.sh b/dart-analyzer/hooks/check-dart.sh similarity index 100% rename from dart-lsp/hooks/check-dart.sh rename to dart-analyzer/hooks/check-dart.sh diff --git a/dart-lsp/hooks/hooks.json b/dart-analyzer/hooks/hooks.json similarity index 100% rename from dart-lsp/hooks/hooks.json rename to dart-analyzer/hooks/hooks.json diff --git a/dart-lsp/.claude-plugin/plugin.json b/dart-lsp/.claude-plugin/plugin.json deleted file mode 100644 index 78be25b..0000000 --- a/dart-lsp/.claude-plugin/plugin.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "name": "dart-lsp", - "description": "Dart/Flutter language server", - "version": "1.1.0", - "author": { - "name": "Tyler Jewell" - } -} diff --git a/dart-lsp/.lsp.json b/dart-lsp/.lsp.json deleted file mode 100644 index fbd8714..0000000 --- a/dart-lsp/.lsp.json +++ /dev/null @@ -1,27 +0,0 @@ -{ - "dart": { - "command": "dart", - "args": ["language-server", "--client-id=claude-code.dart-lsp", "--client-version=1.0.0"], - "extensionToLanguage": { - ".dart": "dart" - }, - "transport": "stdio", - "initializationOptions": { - "onlyAnalyzeProjectsWithOpenFiles": false, - "suggestFromUnimportedLibraries": true, - "closingLabels": false, - "outline": true, - "flutterOutline": true - }, - "settings": { - "dart": { - "completeFunctionCalls": true, - "enableSnippets": true, - "showTodos": false, - "documentation": "full", - "includeDependenciesInWorkspaceSymbols": true - } - }, - "maxRestarts": 3 - } -}