Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,7 @@ For live updates on Fresh, [follow me on X](https://x.com/TheNoamLewis).

> If a new mouse behavior gets in your way, disable it in the **Settings UI** (`Ctrl+P` → **Open Settings**) - see Terminal > "Mouse Drag Selects" and Terminal > "Mouse Forwarding".

* **Debug Adapter Protocol (DAP)** - launch VS Code-compatible debug configurations, toggle persistent breakpoints, and continue, pause, or step from command-palette actions; stopped sessions navigate to and mark the active stack frame (#988, by @asukaminato0721).
* **Indent rainbow** - color indentation guides by indent level via Editor > "Rainbow Indentation" and a six-color `indent_rainbow_1`-`indent_rainbow_6` theme palette; also fixes a literal `{level}` placeholder leaking into translated locale strings (#2632, requested by @akarinotomoshibi, by @asukaminato0721).
* **Virtual space** - the cursor can move past a line's end, like Visual Studio or Vim's `virtualedit`. Enable with Editor > "Virtual Space" (`on` or `block`), toggle per buffer via **Toggle Virtual Space (Current Buffer)**.
* **Theme text attributes** - syntax colors can now carry `bold`/`italic`/`underlined`/`dim`/`reversed` modifiers (#2638, by @asukaminato0721).
Expand Down
7 changes: 7 additions & 0 deletions crates/fresh-core/src/api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3230,6 +3230,13 @@ pub enum PluginCommand {
callback_id: JsCallbackId,
},

/// Write data to a long-running background process's standard input.
///
/// This is intentionally separate from `SpawnBackgroundProcess`: protocols
/// such as DAP keep a child alive and exchange multiple framed messages
/// over its stdin/stdout pair.
WriteBackgroundProcess { process_id: u64, data: String },

/// Kill a background process by ID
KillBackgroundProcess { process_id: u64 },

Expand Down
29 changes: 29 additions & 0 deletions crates/fresh-editor/plugins/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ This directory contains production-ready plugins for the editor. Plugins are wri
| `welcome.ts` | Displays welcome message on startup |
| `manual_help.ts` | Manual page and keyboard shortcuts display |
| `diagnostics_panel.ts` | LSP diagnostics panel with navigation |
| `dap.ts` | Debug Adapter Protocol client (launch, breakpoints, stepping) |
| `search_replace.ts` | Search and replace functionality |
| `path_complete.ts` | Path completion in prompts |

Expand Down Expand Up @@ -70,3 +71,31 @@ For plugin development guides, see:
- **Examples:** [`examples/README.md`](examples/README.md)
- **Clangd Plugin:** [`clangd_support.md`](clangd_support.md)

## Debug adapters

The `dap.ts` plugin reads VS Code-compatible launch configurations from
`.vscode/launch.json`. Configure the executable for each adapter type in
`config.json`; the adapter itself must already be installed:

```json
{
"plugins": {
"dap": {
"settings": {
"adapters": [
{
"type": "python",
"command": "python",
"args": ["-m", "debugpy.adapter"]
}
]
}
}
}
}
```

Use the command palette actions beginning with `Debug:` to start or stop a
session, toggle breakpoints, continue, pause, and step. Set
`plugins.dap.settings.configuration` when `launch.json` contains more than one
configuration; otherwise the first entry is used.
31 changes: 31 additions & 0 deletions crates/fresh-editor/plugins/dap.schema.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"title": "Debug Adapter Protocol",
"type": "object",
"properties": {
"launchJson": {
"type": "string",
"default": ".vscode/launch.json",
"description": "Workspace-relative path to a VS Code-compatible launch.json file."
},
"configuration": {
"type": "string",
"description": "Name of the launch configuration to use. The first configuration is used when omitted."
},
"adapters": {
"type": "array",
"description": "Commands used to start debug adapters, keyed by the launch configuration's type.",
"items": {
"type": "object",
"required": ["type", "command"],
"properties": {
"type": { "type": "string", "description": "launch.json type, for example python or lldb." },
"command": { "type": "string", "description": "Debug adapter executable." },
"args": { "type": "array", "items": { "type": "string" }, "default": [] },
"cwd": { "type": "string", "description": "Adapter working directory. Supports ${workspaceFolder} and ${file}." }
}
},
"default": []
}
}
}
Loading
Loading