Repository navigation
v0.2.0
What's Changed
Features
OSC7
- Sync cwd from terminal OSC 7 by @nmfirdausw in #2
Highlights
- New
osc7option. One line insetup()keeps Neovim's working directory in sync with your terminal. - Opt-in. It defaults to
false, so nothing changes unless you enable it. - Native. It uses Neovim's built-in
TermRequestevent and adds no dependencies.
Usage
require("batu").setup({ osc7 = true })| Value | Effect |
|---|---|
false (default) |
Do nothing |
true |
Sync Neovim's working directory to the one the terminal reports via OSC 7 |
How it works
Many shells and terminals emit an OSC 7 escape sequence whenever the working directory changes. With osc7 = true, Batu listens for it in :terminal buffers and changes Neovim's directory to match. Relative paths, file pickers and new terminals then start where you are.
This needs a shell that emits OSC 7. Many shells do by default or through a config option. If yours doesn't, the setting has no effect.
Upgrading
No changes are needed. Existing configs behave exactly as in v0.1.0.
Full Changelog: v0.1.0...v0.2.0