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.

add README.md

r0nsha (Jun 27, 2025, 3:42 PM +0300) fb19d13b 1c189900

+69
+69
README.md
··· 1 + # multinput.nvim 2 + 3 + An attempt at creating a `vim.ui.input` that wraps its context in an auto-resizing buffer. 4 + 5 + ## Installation 6 + 7 + Install `multinput.nvim` using your favorite plugin manager. 8 + 9 + **[lazy.nvim](https://github.com/folke/lazy.nvim)**: 10 + 11 + ```lua 12 + { 13 + 'r0nsha/multinput.nvim', 14 + opts = { 15 + -- Your custom configuration goes here 16 + } 17 + } 18 + ``` 19 + 20 + **[packer.nvim](https://github.com/wbthomason/packer.nvim)**: 21 + 22 + ```lua 23 + use({ 24 + 'r0nsha/multinput.nvim', 25 + config = function() 26 + require('multinput').setup({ 27 + -- Your custom configuration goes here 28 + }) 29 + end 30 + }) 31 + ``` 32 + 33 + ## Configuration 34 + 35 + Here are the default configuration options: 36 + 37 + ```lua 38 + require('multinput').setup({ 39 + opts = { 40 + numbers = "multiline", -- "always" | "multiline" | "never" 41 + -- "always" will always show line numbers 42 + -- "multiline" will only show line numbers if the buffer's height is > 1 43 + -- "never" will never show line numbers 44 + }, 45 + padding = 5, -- How much padding will be added to the end of the buffer 46 + width = { min = 20, max = 60 }, -- Controls the width limits of the buffer 47 + height = { min = 1, max = 6 }, -- Controls the height limits of the buffer 48 + win = { 49 + title = "Input: ", 50 + style = "minimal", 51 + focusable = true, 52 + relative = "cursor", 53 + col = -1, 54 + height = 1, 55 + }, 56 + }) 57 + ``` 58 + 59 + ## Mappings 60 + 61 + | Mode | Key | Description | 62 + | ------- | ----------- | -------------------------------- | 63 + | n, i, v | `<cr>` | Confirms the input | 64 + | i | `<a-cr>` | Inserts a newline in normal mode | 65 + | n | `<esc>`/`q` | Closes the buffer | 66 + 67 + ## Contributing 68 + 69 + 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.