Skip to content

v0.2.0

Choose a tag to compare

@nmfirdausw nmfirdausw released this 19 Oct 14:12
· 37 commits to main since this release
995c765

What's Changed

Features

OSC7

Highlights

  • New osc7 option. One line in setup() 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 TermRequest event 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