feat(plugins): let a code action create, rename and delete files (#1778)

A new optional file-actions export (worlds plugin-file-actions / file-actions-provider, API 1.3) lists quick fixes whose operations (create with text, rename, delete) and text edits are applied as one workspace edit, so a failure changes nothing and one undo reverses it; paths stay inside the project root, and `open` shows a file once the action is applied. Like providers' code actions, an action can carry only `data` and get its operations from `resolve` when picked.

Co-authored-by: arnaud-ritti <[email protected]>
Цей коміт міститься в:
Arnaud Ritti authored and GitHub committed 2026-11-07 21:24:50 +08:00
1 джерело 1ab4edc0d7
коміт 25d930b780
58 files changed
+896 -52

No files matched your search

+11
Переглянути файл
@@ -86,6 +86,12 @@ world plugin-commit-checks {
export commit-checker;
}
/// A plugin with file-changing code actions (`file-actions`, next to `[[contributes.providers]]`).
world plugin-file-actions {
include plugin;
export file-actions;
}
/// Only the `syntax-provider` export: guests generate it next to `plugin`
/// (the component tools merge both into one component).
world syntax {
@@ -129,3 +135,8 @@ world details {
world commit-checks {
export commit-checker;
}
/// Only the `file-actions` export, generated next to `plugin` like `syntax`.
world file-actions-provider {
export file-actions;
}