ワンクリックで
patch-copied-lsp-sources
Copy JetBrains LSP sources into the Dart plugin and patch them to prevent conflicts and ensure proper configuration.
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
メニュー
Copy JetBrains LSP sources into the Dart plugin and patch them to prevent conflicts and ensure proper configuration.
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
SOC 職業分類に基づく
| name | patch-copied-lsp-sources |
| description | Copy JetBrains LSP sources into the Dart plugin and patch them to prevent conflicts and ensure proper configuration. |
Use this skill whenever JetBrains LSP source files are copied or refreshed from the intellij-community repository into the dart-intellij-third-party plugin. The skill automates the file copying, packaging them under the isolated com.intellij.platform.dartlsp package namespace directly, and applies all necessary adjustments to prevent conflicts with the built-in LSP client of IntelliJ IDEA.
To copy the sources from intellij-community and apply the adjustments automatically:
scripts directory from the repository root, passing the path to the local intellij-community repository as a positional argument:
python3 .agents/skills/patch-copied-lsp-sources/scripts/patch.py /path/to/intellij-community
git diff../gradlew clean compileKotlin --no-build-cache
[!NOTE] If you only need to re-apply the patches to the existing files in the workspace (without copying fresh files from
intellij-community), you can run the script without any arguments:python3 .agents/skills/patch-copied-lsp-sources/scripts/patch.py
Here is the details of the changes made by the patch script:
Direct Package Copy & Rename:
platform/lsp/src/com/intellij/platform/lsp into third_party/thirdPartySrc/platform-lsp/src/com/intellij/platform/dartlsp.com.intellij.platform.lsp to com.intellij.platform.dartlsp across all .kt, .java, and .xml source files to avoid split-package classloader collisions and wrong-namespace imports.Registry Key & Timeout Key:
lsp.server.connect.timeout to dart.lsp.server.connect.timeout in dart-lsp-impl.xml and Lsp4jServerConnector.kt to avoid conflicting with IntelliJ IDEA's default LSP settings.Notification Groups:
Dart: in dart-lsp-impl.xml and LspServerNotificationsHandlerImpl.kt to avoid conflicts with IntelliJ's platform groups.
LSP window/showMessage -> Dart: LSP window/showMessageLSP window/logMessage: errors, warnings -> Dart: LSP window/logMessage: errors, warningsLSP window/logMessage: info, log; $/logTrace -> Dart: LSP window/logMessage: info, log; $/logTraceExtension Element IDs:
id="..." attributes from all extension definitions in dart-lsp-impl.xml (except <notificationGroup>), as they are optional and avoid ID collision warnings/conflicts.Resource Bundle:
messages.LspBundle to messages.DartLspBundle in dart-lsp-impl.xml and LspBundle.kt.DartLspBundle.properties resource file under third_party/src/main/resources/messages/ containing the required localization keys.Log Registry Defaults:
defaultValue="false" for registry key lsp.communication.standard.log.file in dart-lsp-impl.xml to avoid spamming the main idea.log with LSP logs by default, storing them in session-specific files instead.Intention Directory Names:
LspIntention to DartLspIntention and update descriptionDirectoryName to DartLspIntention in dart-lsp-impl.xml to prevent collision.Support External Library Files:
if (!ProjectFileIndex.getInstance(project).isInContent(file)) return false from LspServerImpl.isSupportedFile(file) so that the Dart LSP bridge can serve external library files (such as pub-cache packages and Dart SDK libraries like dart:io).