Skip to content
Merged
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
19 changes: 19 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,25 @@ Clipboard write mirroring is controlled by `piVim.clipboardMirror`:

The setting controls write mirroring only. `p` / `P` keep the paste policy documented below.

## wrapping pi-vim

Supported: `pi-vim` first, `@jordyvd/pi-image-attachments` second. pi-vim does not call `ctx.ui.getEditorComponent()`; the wrapper does. Inverse order unsupported.

Wrappers must decorate in place or forward unintercepted surface: lifecycle (`handleInput`, `render`, `invalidate`), text (`getText`, `setText`, `insertTextAtCursor`, `getExpandedText`), callbacks (`onSubmit`, `onChange`, `onEscape`, `onCtrlD`, `onPasteImage`, `onExtensionShortcut`), `actionHandlers`, flags (`focused`, `disableSubmit`), reads (`getLines`, `getCursor`, `getMode()`).

#18/#21 delegation is not adopted: no previous-extension wrapping, insert delegate, or generic composition layer.

Manual smoke. If raw `-e` cannot resolve Pi peer packages, run `npm install --ignore-scripts --package-lock=false` in the image checkout.

```bash
# repo root
pi -e ./index.ts -e ../pi-image-attachments/index.ts
# this worktree
pi -e ./index.ts -e ../../../pi-image-attachments/index.ts
```

Check: insert text; add/paste image path; see `[Image #1]` widget; submit text+image stripped; switch INSERT/NORMAL modes.

## contributor setup

Hooks install with `npm install` after cloning. To wire them explicitly:
Expand Down
1 change: 1 addition & 0 deletions biome.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
"!node_modules",
"!.pi",
"!.tree",
"!.tmp",
"!doc"
],
"ignoreUnknown": true
Expand Down
1 change: 1 addition & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ export default tseslint.config(
"doc/**",
".pi/**",
".tree/**",
".tmp/**",
"node_modules/**",
"*.js",
"*.sh",
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "pi-vim",
"version": "0.7.0",
"version": "0.8.0",
"description": "Vim-style modal editing for Pi's TUI editor",
"type": "module",
"keywords": [
Expand Down
Loading
Loading