-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathextension-development.qmd
26 lines (19 loc) · 1.35 KB
/
extension-development.qmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
---
title: "Extension Development"
---
Positron is compatible with VS Code extensions so you can create extensions [as you would for VS Code](https://code.visualstudio.com/api/get-started/your-first-extension). You can use Positron to develop your extension and run it in a new **Extension Development Host** window.
## Context keys
When defining your extension's manifest, you can use the `isPositron` context key for enablement or in a `when` clause.
```json
"commands": [
{
"category": "My Extension",
"command": "myExtension.myCommand",
"title": "My Extension Command",
"enablement": "isPositron"
}
]
```
This allows your extension to enable commands, keybindings, menu items, and any other contribution points only for Positron.
## Positron API
Positron provides [all the normal contribution points and the VS Code API](https://code.visualstudio.com/api/extension-capabilities/overview) to extensions, but also additionally new APIs to use. We plan to make the extension development experience better (for example, [safely wrapping](https://github.com/posit-dev/positron/issues/458) and [providing typing for](https://github.com/posit-dev/positron/issues/809) the Positron API), but in the meantime, we recommend you [take a look at the Positron API details directly](https://github.com/posit-dev/positron/tree/main/src/positron-dts).