mirror of
https://github.com/l0ng-ai/openidea.git
synced 2026-11-15 08:08:18 +00:00
Plugins get a host-owned WebSocket resource (net.websocket-connect → websocket with id/send/drain/close; dropping it closes the transport). The connection is bound to the project it was opened for, needs the endpoint's net:<host> grant, uses WSS outside loopback with the shared rustls config, and is capped at eight per plugin. Request headers (secret placeholders expanded) go with the handshake, except the ones the handshake owns; an empty subprotocol requests none; the handshake is bounded by the call's I/O budget. Incoming frames queue in a bounded FIFO, signalled by the websocket-ready event. Checked-in components are rebuilt for API 1.6. Co-authored-by: SorPuti <56741582+SorPuti@users.noreply.github.com>
32 lines
1.1 KiB
Plaintext
32 lines
1.1 KiB
Plaintext
package openidea:plugin@1.6.0;
|
|
|
|
/// Optional export (world `plugin-semantic-tokens`): semantic colouring of
|
|
/// documents of the languages declared with the `semantic-tokens` provider
|
|
/// kind, including languages the plugin doesn't contribute. The tokens join
|
|
/// the language server's and win where they overlap one.
|
|
interface semantic-tokens-provider {
|
|
use types.{range};
|
|
|
|
/// The document to colour (the editor's text while it is open).
|
|
record document {
|
|
/// Absolute path.
|
|
path: string,
|
|
language: string,
|
|
version: u64,
|
|
text: string,
|
|
}
|
|
|
|
/// A token: part of one line.
|
|
record semantic-token {
|
|
range: range,
|
|
/// An LSP token type in kebab-case (`method`, `property`, `type`, …).
|
|
kind: string,
|
|
/// LSP token modifiers in kebab-case (`static`, `deprecated`, …).
|
|
modifiers: list<string>,
|
|
}
|
|
|
|
/// The document's tokens, at most 65,536; asked again after each edit,
|
|
/// under the edit-path budget.
|
|
semantic-tokens: func(doc: document) -> list<semantic-token>;
|
|
}
|