Merge pull request 'Expose Vim object in order to create custom keybindings' (#1816) from JohnBjrk/strudel:expose-vim-for-custom-keybindings into main

Reviewed-on: https://codeberg.org/uzu/strudel/pulls/1816
This commit is contained in:
froos 2025-12-28 22:56:05 +01:00
commit 06f9c2dfb5
3 changed files with 24 additions and 0 deletions

View file

@ -4,3 +4,4 @@ export * from './flash.mjs';
export * from './slider.mjs';
export * from './themes.mjs';
export * from './widget.mjs';
export { Vim } from './keybindings.mjs';

View file

@ -131,6 +131,8 @@ const keymaps = {
vscode: vscodeExtension,
};
export { Vim } from '@replit/codemirror-vim';
export function keybindings(name) {
const active = keymaps[name];
const extensions = active ? [Prec.high(active())] : [];