Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

https://github.com/doums/suit.nvim

A neovim plugin that replaces default input and select text prompts with nice floating windows
https://github.com/doums/suit.nvim

input lua neovim nvim nvim-plugin select

Last synced: 11 days ago
JSON representation

A neovim plugin that replaces default input and select text prompts with nice floating windows

Lists

README

        

## suit.nvim

A [neovim](https://neovim.io/) plugin that replaces the default
`vim.ui.input` and `vim.ui.select` implementations with floating
windows.

### Install

Use your plugin manager

```lua
require('paq')({
-- ...
'doums/suit.nvim',
})
```

### Configuration

```lua
require('suit').setup({
input = {
-- default prompt value
default_prompt = 'Input: ',
-- border of the window (see `:h nvim_open_win`)
border = 'single',
-- highlight group for the input UI window
-- links to NormalFloat
hl_win = 'suitWin',
-- highlight group for the prompt text
-- links to NormalFloat
hl_prompt = 'suitPrompt',
-- highlight group for the window border
-- links to FloatBorder
hl_border = 'suitBorder',
-- input width (in addition to the default value)
width = 20,
-- override arguments passed to `nvim_open_win` (see `:h nvim_open_win`)
nvim_float_api = nil,
},
select = {
-- default prompt value
default_prompt = 'Select one of: ',
-- border of the window (see `:h nvim_open_win`)
border = 'single',
-- highlight group for the select UI window
-- links to NormalFloat
hl_win = 'suitWin',
-- highlight group for the prompt text
-- links to NormalFloat
hl_prompt = 'suitPrompt',
-- highlight group for the selected item
-- links to PmenuSel
hl_sel = 'suitSel',
-- highlight group for the window border
-- links to FloatBorder
hl_border = 'suitBorder',
-- override arguments passed to `nvim_open_win` (see `:h nvim_open_win`)
nvim_float_api = nil,
},
})
```

All default configuration values are listed
[here](https://github.com/doums/suit.nvim/blob/main/lua/suit/config.lua).

### Usage

Keymaps should be intuitive.

For input:

`` to confirm\
`` to cancel

For select:

`` and left mouse double click to confirm the selected item\
``, `q` to cancel\
`j`, `k`, ``, `` to navigate

### License

Mozilla Public License 2.0