Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Plugin Capability Matrix

Audit of the plugin protocol (v2) as of 0.12.x: what the protocol declares, what the host actually implements, and what the bundled plugins use. This is the “take stock” pass after the 0.8 plugin work (issue #296). For the protocol itself — message formats, examples, contribution/teardown rules — see Plugin Development.

Capabilities

Capabilities are declared by a plugin in its register_language_provider action and stored as Capability variants (src/plugin/types.rs). The host routes them via PluginManager::provider_for (src/plugin/manager.rs).

CapabilityDeclared in protocolHandled by hostUsed by a bundled plugin
foldyesyes — gates set_fold_regions in handle_plugin_set_fold_regions (src/app/refresh.rs)yes — used by the bundled rust, go, and python language provider plugins
highlightyesno — accepted at registration, never checked anywhereno
hoveryes (reserved)no — unimplementable in v2 (no request/response correlation)no
diagnosticsyes (reserved)no — same as hoverno
definitionyes (reserved)no — same as hoverno

Note on highlight: real syntax highlighting flows through syntax plugins (kind = "syntax", a .sublime-syntax file fed to syntect — see the bundled terraform plugin), not through language-provider capabilities. The highlight capability is documented as reserved for future provider-driven highlighting; today registering it has no effect.

Actions

Every action the host accepts, dispatched in App::handle_plugin_action (src/app/refresh.rs). Unknown actions are silently ignored.

ActionHandled by hostContribution trackedTorn downUsed by a bundled plugin
show_messageyesno (transient status text)n/a — plugin_message may briefly outlive the plugin; harmlessno
open_fileyesno (one-shot navigation)n/ano
set_icon_mapyeshas_icon_mapyes — icon map/fields clearedyes — iconize
set_contentyescontent_pathsyes — content removed, current file re-renderedyes — markdown
register_language_provideryesprovider registration in PluginManageryes — remove_provider_registrationsyes — rust, python
set_fold_regionsyesfold_region_pathsyes — regions removed, fold state resetyes — rust, python

Teardown status: every stateful set_* action stamps PluginContributions and is cleared by App::teardown_plugin_contributions (src/app/mod.rs). No teardown gaps were found in this audit.

Protocol v1 git actions (set_file_statuses, set_blame_data, set_status_bar_git_info) were removed in 0.11.22 along with the retired shell-script git plugins; git features are built in. They are listed in the version history in Plugin Development only.

Bundled plugins

PluginKindActions sentCapabilities registered
iconizeprocessset_icon_mapnone
markdownprocessset_contentnone
pythonprocessregister_language_provider, set_fold_regionsfold
rustprocessregister_language_provider, set_fold_regionsfold
goprocessregister_language_provider, set_fold_regionsfold
terraformsyntaxnone (no subprocess)n/a — extends syntect directly

Gaps and follow-ups

  1. Reserved capabilities (hover, diagnostics, definition) are unimplementable in protocol v2 — they need id-correlated request/response. Tracked in the protocol v3 proposal (issue #481), which names this audit as its precursor.
  2. The language-provider fold pipeline has bundled consumersregister_language_provider + Capability::Fold + set_fold_regions are used by the bundled rust (issue #599), go (issue #600), and python (issue #601) language provider plugins. The rust and go plugins register the fold capability for .rs and .go files via the shared brace_fold detector (#598); the python plugin uses the shared indent_fold detector.
  3. Capability::Highlight is declared but routes to nothing. Either implement provider-driven highlighting in v3 or re-document it as reserved alongside hover/diagnostics/definition. Not yet tracked in a dedicated issue; candidate checklist item for #481.