дзеркало
https://github.com/l0ng-ai/openidea.git
синхронізовано 2026-11-27 04:56:08 +02:00
The optional run-configuration-completion export receives the project, the configuration's id, the field (arguments), its text and a UTF-16 caret, and answers items that each replace one UTF-16 range, so other options, quoted values and the arguments after -- stay as typed. The host completes only configurations the plugin currently provides for the window's project (also a user's override of one), keeps 200 items and gives the plugin 300 ms. In Run | Edit Configurations the field asks while typing and on Ctrl+Space, applies an item with Enter or Tab, closes the popup on Escape without closing the dialog, drops answers for text that has changed, and stays usable when the plugin fails. Fixes #4753
234 рядки
7.7 KiB
Plaintext
234 рядки
7.7 KiB
Plaintext
/// OpenIDEA plugin API, version 1.0. Once released, 1.x only adds (new
|
|
/// interfaces, new optional exports; plugins/README.md, "Evolving the plugin
|
|
/// API"); a 2.0 keeps 1.0 running through an adapter in the host.
|
|
///
|
|
/// A plugin is a WebAssembly component targeting the `plugin` world (or
|
|
/// `plugin-syntax`). It runs sandboxed: no file system, network, environment
|
|
/// or processes beyond WASI's clocks and randomness; files are read through
|
|
/// `fs` and `workspace`, and everything else goes through the imports below,
|
|
/// gated by the capabilities granted in `plugin.toml` (a missing one returns
|
|
/// `error::denied`).
|
|
package openidea:[email protected];
|
|
|
|
world plugin {
|
|
import log;
|
|
import ui;
|
|
import storage;
|
|
import fs;
|
|
import workspace;
|
|
import editor;
|
|
import decorations;
|
|
import invocation;
|
|
import vcs;
|
|
import build;
|
|
import commit;
|
|
import events;
|
|
import tasks;
|
|
import diagnostics;
|
|
import net;
|
|
import secrets;
|
|
import process;
|
|
import ipc;
|
|
import output;
|
|
import auth;
|
|
import command-runner;
|
|
import language-servers;
|
|
import views;
|
|
import run;
|
|
import run-targets;
|
|
import database;
|
|
import mcp;
|
|
import settings;
|
|
import extensions;
|
|
|
|
export lifecycle;
|
|
export commands;
|
|
export event-handler;
|
|
}
|
|
|
|
/// A plugin that also provides syntax for its languages.
|
|
world plugin-syntax {
|
|
include plugin;
|
|
export syntax-provider;
|
|
}
|
|
|
|
/// A plugin with editor providers (`[[contributes.providers]]`).
|
|
world plugin-providers {
|
|
include plugin;
|
|
export providers;
|
|
}
|
|
|
|
/// A plugin with views or custom editors (`[[contributes.views]]`,
|
|
/// `[[contributes.custom-editors]]`).
|
|
world plugin-views {
|
|
include plugin;
|
|
export view-provider;
|
|
}
|
|
|
|
/// A plugin with a document indexer (`[[contributes.documentIndexers]]`).
|
|
world plugin-indexing {
|
|
include plugin;
|
|
export document-indexer;
|
|
}
|
|
|
|
/// A plugin with semantic tokens (`semantic-tokens` under `[[contributes.providers]]`).
|
|
world plugin-semantic-tokens {
|
|
include plugin;
|
|
export semantic-tokens-provider;
|
|
}
|
|
|
|
/// A plugin adding to hovers (`hover` under `[[contributes.providers]]`).
|
|
world plugin-hover {
|
|
include plugin;
|
|
export hover-provider;
|
|
}
|
|
|
|
/// A plugin with inlay hints (`inlay-hints` under `[[contributes.providers]]`).
|
|
world plugin-inlay-hints {
|
|
include plugin;
|
|
export inlay-hints-provider;
|
|
}
|
|
|
|
/// A plugin whose views show in the Services tool window
|
|
/// (`location = "services"`): their nodes' detail pane.
|
|
world plugin-details {
|
|
include plugin;
|
|
export detail-provider;
|
|
}
|
|
|
|
/// A plugin with before-commit checks (`[[contributes.commitChecks]]`).
|
|
world plugin-commit-checks {
|
|
include plugin;
|
|
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 {
|
|
export syntax-provider;
|
|
}
|
|
|
|
/// Only the `providers` export, generated next to `plugin` like `syntax`.
|
|
world editor-providers {
|
|
export providers;
|
|
}
|
|
|
|
/// Only the `view-provider` export, generated next to `plugin` like `syntax`.
|
|
world views-provider {
|
|
export view-provider;
|
|
}
|
|
|
|
/// Only the `document-indexer` export, generated next to `plugin` like `syntax`.
|
|
world indexing {
|
|
export document-indexer;
|
|
}
|
|
|
|
/// Only the `semantic-tokens-provider` export, generated next to `plugin` like `syntax`.
|
|
world semantic-tokens {
|
|
export semantic-tokens-provider;
|
|
}
|
|
|
|
/// Only the `hover-provider` export, generated next to `plugin` like `syntax`.
|
|
world hover {
|
|
export hover-provider;
|
|
}
|
|
|
|
/// Only the `inlay-hints-provider` export, generated next to `plugin` like `syntax`.
|
|
world inlay-hints {
|
|
export inlay-hints-provider;
|
|
}
|
|
|
|
/// Only the `detail-provider` export, generated next to `plugin` like `syntax`.
|
|
world details {
|
|
export detail-provider;
|
|
}
|
|
|
|
/// Only the `commit-checker` export, generated next to `plugin` like `syntax`.
|
|
world commit-checks {
|
|
export commit-checker;
|
|
}
|
|
|
|
/// Only the `file-actions` export, generated next to `plugin` like `syntax`.
|
|
world file-actions-provider {
|
|
export file-actions;
|
|
}
|
|
|
|
/// A plugin with project HTTP endpoints (`[[contributes.endpoints]]`).
|
|
world plugin-endpoints {
|
|
include plugin;
|
|
export endpoints-provider;
|
|
}
|
|
|
|
/// Only the `endpoints-provider` export, generated next to `plugin` like `syntax`.
|
|
world endpoints {
|
|
export endpoints-provider;
|
|
}
|
|
|
|
/// A plugin with diagnostics under `[[contributes.providers]]`.
|
|
world plugin-diagnostics {
|
|
include plugin;
|
|
export diagnostics-provider;
|
|
}
|
|
|
|
/// `diagnostics` is already the released host interface name.
|
|
world editor-diagnostics {
|
|
export diagnostics-provider;
|
|
}
|
|
|
|
/// A plugin that exports project run configurations.
|
|
world plugin-run-configurations { include plugin; export run-configurations; }
|
|
/// Export-only configurations world, composed with plugin by SDK macros.
|
|
world configurations-provider { export run-configurations; }
|
|
/// A plugin that exports configurations with an environment and a debugger (API 1.9).
|
|
world plugin-launch-configurations { include plugin; export launch-configurations; }
|
|
/// Export-only launch configurations world, composed with plugin by SDK macros.
|
|
world launch-configurations-provider { export launch-configurations; }
|
|
/// A plugin that exports configurations with environment, debugger, and output mode (API 1.18).
|
|
world plugin-execution-configurations { include plugin; export execution-configurations; }
|
|
/// Export-only execution configurations world, composed with plugin by SDK macros.
|
|
world execution-configurations-provider { export execution-configurations; }
|
|
/// A plugin that parses its test output.
|
|
world plugin-test-results { include plugin; export test-results; }
|
|
/// Export-only test parser world, composed with plugin by SDK macros.
|
|
world test-results-provider { export test-results; }
|
|
|
|
/// A plugin with additional API 1.4 language features.
|
|
world plugin-language-features { include plugin; export language-features; }
|
|
/// Export-only language features, composed with the base plugin world.
|
|
world editor-language-features { export language-features; }
|
|
/// A plugin that identifies embedded language ranges.
|
|
world plugin-injections { include plugin; export injections; }
|
|
/// Export-only injections, composed with the base plugin world.
|
|
world language-injections { export injections; }
|
|
|
|
/// A plugin contributing tools to the built-in MCP server.
|
|
world plugin-mcp { include plugin; export mcp-provider; }
|
|
/// Export-only MCP tools, composed with the base plugin world.
|
|
world mcp-tools { export mcp-provider; }
|
|
|
|
/// A plugin that validates launches through its run targets (API 1.5).
|
|
world plugin-run-target-validation { include plugin; export run-target-validation; }
|
|
/// Export-only validation, composed with the base plugin world.
|
|
world run-target-validator { export run-target-validation; }
|
|
|
|
/// A plugin with Run Anything entries for its prefixes (API 1.18).
|
|
world plugin-run-anything { include plugin; export run-anything-provider; }
|
|
/// Export-only Run Anything provider, composed with the base plugin world.
|
|
world run-anything-exports { export run-anything-provider; }
|
|
|
|
/// A plugin completing fields of its own run configurations (API 1.18).
|
|
world plugin-run-configuration-completion { include plugin; export run-configuration-completion; }
|
|
/// Export-only run configuration completion, composed with the base plugin world.
|
|
world run-configuration-completion-exports { export run-configuration-completion; }
|
|
|
|
/// A plugin with custom Search Everywhere categories.
|
|
world plugin-search { include plugin; export search-provider; }
|
|
/// Optional export composed with the base plugin by the SDK.
|
|
world search { export search-provider; }
|