Added
- Which-key popups in embedded editors — which-key hints now appear in table cell editors (embedded mode) and textarea vim overlays. The popup renders in the parent note's viewport using the same position and styling as the main editor's which-key. User keymaps (vimrc, Lua) are fully available since the codemirror-vim keymap is global. Bundled vim mode only — embedded editors in built-in vim mode do not receive vim and are silently skipped.
- Plugin:
src/ui/which-key.ts(WhichKeyConfigexported interface;WhichKeyOverlay.forEmbeddedEditor()static factory for dependency injection;attach()injected-mode early return;showOverlay()injected container fallback with status-bar padding guard;onKeyPressGeneral()delay bypass for embedded editors;detachAdapter()try/catch for destroyed adapters;destroy()clears injected references) - Plugin:
src/vim/table-cell-editor.ts(setCellEditorWhichKeyConfig()exported setter;openCellEditor()deferred which-key creation viasetTimeout(0);closeCellEditor()which-key cleanup before editor destroy) - Plugin:
src/vim/textarea-vim-manager.ts(whichKeyConfigclass field;updateOptions()extended with which-key config;ActiveReplacement.whichKeyfield;replace()deferred which-key creation with.view-content→.modal-containerfallback;teardownActive()which-key cleanup) - Plugin:
src/main.ts(WhichKeyConfigimport;setCellEditorWhichKeyConfigimport; embedded config construction and wiring afterWhichKeyOverlaycreation)
- Plugin:
Fixed
- Embedded table mode does not handle multiple tables per note — in embedded table widget mode (
set tablewidget=embedded), when a note contained two or more tables, entering table-nav mode on any table other than the first always attached the cell highlight, key handlers, and cell editor to the first table's DOM widget. Entering from below selected the last cell of the first table. Root cause:findWidgetEl()intable-nav-controller.tsqueried all.vim-table-renderedelements and returned the first match without considering whichTableRangethe cursor was in. Fixed by adding atableFromparameter tofindWidgetEl()and using CM6'sview.posAtDOM()to correlate each widget element with its document position, returning the nearest match to the active table'sfromoffset. (#117)- Plugin:
src/vim/table-nav-controller.ts(findWidgetEl— accepts optionaltableFromparameter, usesposAtDOMnearest-match withtry/catchfor detached elements;enterTableNav— passestable.fromexplicitly;devAssertimport and__DEV__assertion verifying widget position matches active table)
- Plugin:
- Enter in embedded table cell editor breaks table structure — pressing Enter in insert mode inside an embedded table cell editor (
set tablewidget=embedded) inserted a literal newline into the cell content. Upon exiting the table, the multi-line content was written back into the single-line markdown table row, breaking the table structure — the second line appeared outside the table. Fixed by converting newlines to<br>tags on cell editor close and converting<br>tags back to newlines on cell editor open, preserving multi-line cell content using standard HTML line breaks that Obsidian renders correctly within table cells. Existing<br>content in cells round-trips cleanly. (#115)- Plugin:
src/vim/table-utils.ts(cellBrToNewline,cellNewlineToBr— new pure utility functions for<br>↔ newline conversion) - Plugin:
src/vim/table-cell-editor.ts(openCellEditor— converts<br>to newlines on open;closeCellEditor— converts newlines to<br>on close)
- Plugin:
Tests
- 4 e2e test cases in
test/specs/table-cell-vim-mode.e2e.ts(issue #117, skipped — embedded widget rendering limitation in WDIO): entry into second table highlights correct widget, cell editor opens on second table not first, add row affects only second table, first table unaffected during second table navigation - 8 e2e tests in
test/specs/textarea-vim-which-key.e2e.ts: which-key appears after partial chord (d,g) in normal mode, dismisses on command completion (dd), dismisses on Escape, suppressed in insert mode, suppressed whenwhichKeyModeis off, cleans up on editor close (blur), cleans up on modal removal - 14 unit tests in
test/unit/table-cell-br.test.ts(issue #115):cellBrToNewline(7 tests —<br>,<br/>,<br />, case-insensitive, multiple tags, no-op, empty string),cellNewlineToBr(4 tests — single/multiple newlines, no-op, empty string), round-trip (3 tests — newline→br→newline, br→newline→br, mixed markdown content) - 2 e2e test cases in
test/specs/table-cell-vim-mode.e2e.ts(issue #115, skipped — embedded widget rendering limitation in WDIO): Enter in cell editor produces<br>and keeps table valid, round-trip of existing<br>in cell content
Documentation
CHANGELOG.mdKNOWN_LIMITATIONS.md: Marked multi-table widget selection as fixed withposAtDOMposition matching; marked Enter-in-cell-editor table breakage as fixed with<br>conversion; added which-key in embedded editors note to table cell sectionCONTRIBUTING.md: Updatedtable-nav-controller.tsdescription withposAtDOM-based widget matching for multi-table support; updatedtable-utils.tsdescription withcellBrToNewline/cellNewlineToBrhelpers; updatedwhich-key.ts,table-cell-editor.ts, andtextarea-vim-manager.tsdescriptions with which-key overlay lifecycleAGENTS.md: Updated dual-vim architecture section with which-key in embedded editors via dependency injectiondocs/features/tables.md: Added multi-table support note to embedded mode section; added multi-line cell content note with<br>support in embedded mode; added which-key support note to embedded cell editor sectiondocs/configuration/which-key.md: Added embedded editors section documenting which-key in table cell editors and textarea vim overlays
Full Changelog: 0.104.0...0.105.0