A floating vim.ui.input buffer that auto-resizes to fit its contents.
0

Configure Feed

Select the types of activity you want to include in your feed.

Lua 100.0%
38 1 0

Clone this repository

https://tangled.org/ronshavit.com/multinput.nvim https://tangled.org/did:plc:a4aoqhq7zq4hgdtjmnk2ngoe
git@knot.ronshavit.com:ronshavit.com/multinput.nvim git@knot.ronshavit.com:did:plc:a4aoqhq7zq4hgdtjmnk2ngoe

For self-hosted knots, clone URLs may differ based on your setup.



README.md

multinput.nvim#

A floating vim.ui.input buffer that auto-resizes to fit its contents.

https://github.com/user-attachments/assets/bed09107-c0ab-4c50-bdfb-4e73893fa800

Installation#

Install multinput.nvim using your favorite plugin manager.

lazy.nvim:

{
  'r0nsha/multinput.nvim',
  opts = {
    -- Your custom configuration goes here
  }
}

packer.nvim:

use({
  'r0nsha/multinput.nvim',
  config = function()
    require('multinput').setup({
      -- Your custom configuration goes here
    })
  end
})

Configuration#

Here are the default configuration options:

require('multinput').setup({
    opts = {
      -- "always" | "multiline" | "never"
      -- "always" will always show line numbers
      -- "multiline" will only show line numbers if the buffer's height is > 1
      -- "never" will never show line numbers
      numbers = "never",
    },
    -- How much padding will be added to the end of the buffer
    padding = 5,
    -- Controls the width limits of the buffer
    width = { min = 20, max = 60 },
    -- Controls the height limits of the buffer
    height = { min = 1, max = 6 },
    win = {
      title = "Input: ",
      style = "minimal",
      focusable = true,
      relative = "cursor",
      col = -1,
      width = 1,
      height = 1,
    },
})

Mappings#

Mode Key Description
n, i, v <cr> Confirms the input
i <a-cr> Inserts a newline in normal mode
n <esc>/q Closes the buffer

Contributing#

Contributions are always welcome! I'm no neovim expert, so if you find a bug or have a feature request, you're welcome to open an issue or submit a pull request.