PluginsEarly
Context keys
What the context passed to a handler says about the app's state, and the values it can take.
From the plugin interface of gr 0.2.16 (API 0.1, 0.2, 0.3). gr plugin api context prints it on your machine.
Handlers of events "with context" get it as their second argument, and $.editor.context() returns the latest. A key in plugin.toml can carry a when clause over these keys, so it applies only while the clause holds.
| Key | Type | What it says |
|---|---|---|
surface | string | what the focused pane showsmaparchitectureagentsagentterminalcodenodechangepluginsettingsslopempty |
mode | string | the keys' modenormalinsertvisualvisual_linevisual_blockpromptcommand |
layer | string | the id of the key layer on, none while no layer is |
pane.kind | string | where the focused pane stands: the centre, or the dock at a sidecentreleftrightbottom |
panes | number | how many panes the tab page shows |
file.language | string | the language of the file a focused code view shows, as its highlighter names it (rust, go, typescript) |
file.path | string | the path, from the workspace's root and slash-separated, of the file a focused code view shows |
file.dirty | bool | whether that file has changes not saved |
diff | bool | whether the focused pane shows a change: a diff or a change's story |
view | string | the plugin view the focused pane shows, by its id (todos.list) |
panel | string | the plugin panel that has the focus, by its id: a view shown docked |
dock.left | string | the part the left dock shows, none while it is hidden |
dock.right | string | the part the right dock shows, none while it is hidden |
dock.bottom | string | the part the bottom dock shows, none while it is hidden |
agent.state | string | the state of the agent the focused pane shows, in Agent.state's wordsstartingrunningworkingwaitingcouldnt_startopen_elsewherearchivedasleepstopped |
map.selection | number | how many nodes are selected on the map |
window.width | number | the window's width, in logical pixels |
window.height | number | the window's height, in logical pixels |
chrome | string | the person's chrome settingfullminimal |
editing | string | how the person's keys behavevimmodeless |
language_server | bool | whether a language server serves the focused file (Phase 3; none until then) |
These docs describe Graphide 0.2.16, the latest release. Something wrong or missing? Tell us onDiscord or at hello@graphide.com.