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: 3 days ago
JSON representation
A neovim plugin that replaces default input and select text prompts with nice floating windows
- Host: GitHub
- URL: https://github.com/doums/suit.nvim
- Owner: doums
- Created: 2022-05-20T21:17:48.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-09-15T22:40:59.000Z (about 2 months ago)
- Last Synced: 2024-09-16T00:23:33.561Z (about 2 months ago)
- Topics: input, lua, neovim, nvim, nvim-plugin, select
- Language: Lua
- Homepage:
- Size: 46.9 KB
- Stars: 44
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
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 cancelFor select:
`` and left mouse double click to confirm the selected item\
``, `q` to cancel\
`j`, `k`, ``, `` to navigate### License
Mozilla Public License 2.0