Added
- Input method switching for CJK users — automatic IM switching when entering/leaving insert mode. Supports macism (macOS), im-select (macOS/Windows), fcitx5-remote (Linux), ibus (Linux), and any external IM switching binary. Per-editor IM state tracking, 50ms debounced switching, composition guard (never switches mid-IME composition), and error throttling with auto-disable. Desktop only — graceful no-op on mobile. (#55)
- Lua API:
vim.obsidian.im.get(),.set(id),.save(),.restore(),.enabled,.auto— programmatic control for advanced use cases. Setvim.obsidian.im.auto = falseto disable auto-wiring and handle switching via Lua autocmds. - Settings: 7 new settings in Settings → Vim Motions → Input method — master toggle, binary path, obtain/switch args, normal mode IM, restore behavior (restore previous / use fixed default), default insert IM.
- Security: Uses
child_process.execFile(no shell interpretation). Binary path must be absolute. IM identifiers validated against shell metacharacters. Scoped process access following theexternal-fs.tspattern. - Plugin:
src/im/im-process.ts(new),src/im/im-switcher.ts(new),src/settings.ts,src/lua/obsidian-api.ts,src/lua/api.ts,src/lua/loader.ts,src/lua/autocmd.ts,src/main.ts,src/util/external-fs.ts - Tests:
test/unit/im-process.test.ts(new),test/unit/im-switcher.test.ts(new)
- Lua API:
CmdlineEnter/CmdlineLeaveautocmd events — fire when entering/leaving the:,/, or?command-line prompt. Event data includescmdtype(":","/", or"?").CmdlineLeaveis auto-wired to IM switching (switches to normal mode IM on prompt exit), matching im-select.nvim's default behavior.- Plugin:
src/lua/autocmd.ts,src/lua/loader.ts,src/vim/mode-tracker.ts,src/im/im-switcher.ts,src/main.ts
- Plugin:
Documentation
docs/configuration/lua-config.md: addedvim.obsidian.imAPI section with function reference and Lua examplesdocs/configuration/settings.md: added "Input method" settings group tableKNOWN_LIMITATIONS.md: added IM switching limitations section (desktop-only, no command-line/search mode, Flatpak/Snap, system-wide switching); updated "Intentionally not supported" table to mark IM switching as built-in
Full Changelog: 0.50.1...0.51.0