Skip to content

v0.7.0

Choose a tag to compare

@nmfirdausw nmfirdausw released this 20 Oct 10:53
· 11 commits to main since this release
bcd77ea

What's Changed

Features

Completion

Highlights

  • Completion out of the box. A new completion option turns on Neovim's built-in completion: the command-line menu opens as you type, and LSP completion triggers on every letter, digit and _, not only after . or :.
  • blink.cmp as an option. Pass { blink = true } to use blink.cmp v2 instead. Batu installs it, builds its Rust matcher and wires up LSP capabilities.
  • Yours on top. Pass a table of blink options and they are merged over Batu's defaults.
  • Native by default. No new dependencies unless you choose blink.

Usage

require("batu").setup({
  completion = true,                                       -- built-in (default)
  -- completion = { blink = true },                        -- blink.cmp
  -- completion = { blink = { keymap = { preset = "super-tab" } } },
  -- completion = false,                                   -- leave it alone
})
Option Value Effect
completion true (default) Neovim's built-in completion
{ blink = true } blink.cmp v2 with Batu's defaults
{ blink = { ... } } blink.cmp with your options merged on top
false Leave completion alone

blink.cmp defaults

  • The command-line menu shows as you type, like the native one.
  • Nothing is preselected.
  • <CR> accepts the selected item, and acts as usual when none is selected.

Blink options go under blink, and command-line options under blink.cmdline.

How it works

The built-in mode adds each server's trigger characters once per client, so attaching to more buffers doesn't grow the list. The blink mode installs blink.cmp (main) and blink.lib with vim.pack, builds the Rust fuzzy matcher on first start and after each update, and sets blink's capabilities before servers are enabled.

Requirements

blink.cmp v2 has no prebuilt binaries, so completion = { blink = true } needs cargo and errors without it. The first start, and the first after each blink update, compiles the matcher, which can take a minute. The built-in mode needs nothing extra.

Upgrading

completion is on by default, so setup() now enables built-in completion without any change to your config. If you use another completion plugin, pass completion = false.

Full Changelog: v0.6.0...v0.7.0