Skip to content

Commit a5ec741

Browse files
authored
notes on v2 (anomalyco#20941)
1 parent fff9863 commit a5ec741

1 file changed

Lines changed: 13 additions & 0 deletions

File tree

  • packages/opencode/specs

packages/opencode/specs/v2.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# 2.0
2+
3+
What we would change if we could
4+
5+
## Keybindings vs. Keymappings
6+
Make it `keymappings`, closer to neovim. Can be layered like `<leader>abc`. Commands don't define their binding, but have an id that a key can be mapped to like
7+
8+
```ts
9+
{ key: "ctrl+w", cmd: string | function, description }
10+
```
11+
12+
_Why_
13+
Currently its keybindings that have an `id` like `message_redo` and then a command can use that or define it's own binding. While some keybindings are just used with `.match` in arbitrary key handlers and there is no info what the key is used for, except the binding id maybe. It also is unknown in which context/scope what binding is active, so a plugin like `which-key` is nearly impossible to get right.

0 commit comments

Comments
 (0)