These are the docs of plugin API 1.7, as Textus 1.4.3 had them. API 1.8 is the newest.
Versions
Which Textus each part of the plugin API needs. Set engines.textus to
the newest one you use (">=1.3.10"); Textus outside the range doesn't
load the plugin. To use something newer only where it exists, check it
instead: if (textus.dates) …, or compare textus.env.apiVersion as
numbers ("1.10" is after "1.9").
| API | Textus | Added |
|---|---|---|
| 1.7 | 1.4.3 | net.fetch's signal; a list view's %key% strings in the UI language, and textus.env following language and theme without a listener; textus.text (count, splitFrontmatter, compareNames); files.create's unique, returning the path; a search hit's location; onDidReceiveMessage on a page and keys.onDidPressKey (the old names stay); a page's visible and onDidChangeVisibility; files.setConvention; on a page: data-t/data-t-label, tooltips, arrow keys in switches and lists, data-fit-steps, dates, drag.reorder, popover, pickDate, monthDays, resizeHandle |
| 1.6 | 1.4.2 | export.mathCss, KaTeX's stylesheet with its fonts inline; appearance (permission appearance): a palette over the theme, the frame's paint a gradient; commands.setContext for menu when; the selection's block, editor.onDidChangeVisible; files.setBadge; editor.registerPasteHandler; a mark's url; ui.pick's search; editor.registerOutline |
| 1.5 | 1.3.13-rc.1 | contributes.agents and the agents permission, AI agents on the computer in Textus AI's model menu; layout.openSettings |
| 1.4 | 1.3.10 | dates, templates, files.appSettings, layout.panels / onDidChangePanels; conventions' weekly, monthly, templateFormats; files.write includes reading |
| 1.3 | 1.3.10-rc.1 | env.onDidCopy, layout.showSidebarTab, a list's onMove |
| 1.2 | 1.3.9 | files.conventions, metadata.resolveNote, metadata.linkTo, completions' new fields, keys.capture's answer, onWillSave's blocks, offerPlugin |
| 1.1 | 1.3.0-beta.8 | schedule, notify, app, change sources |
| 1.0 | 1.3.0-beta.2 | The first API |
Each call's own "From …" note in textus.d.ts is the exact version; the reference shows them too.
What stays
- Every Textus release that adds to the API raises its minor version (1.6 → 1.7) and adds a row here; the call's "From 1.x" note says when.
- What is in textus.d.ts without a "Preview" note is stable: it keeps its name, arguments and answers. A plugin written for 1.0 still runs.
- A better name or shape comes in beside the old one, which keeps working. The old one is marked "Deprecated" in textus.d.ts with what to use instead, and stays until Textus's next minor release: deprecated in 1.4, it can go in 1.5. It goes only with a row here saying so.
- Lines count from 0 in every
Locationand in the index (metadata.*); the only line from 1 is a search hit'sline, kept for the plugins that read it - use itslocation. - Events are
onDid…(after) oronWill…(before, a chance to change it);register…gives back something todispose().
This page is versions.md in the Textus repository.