{
"cpea2506/select.nvim",
}- Neovim >= 0.12.0
This plugin works immediately after installation. Configuration is optional, only needed if you want to override defaults.
| Option | Description | Type | Notes |
|---|---|---|---|
default_prompt |
Default text for the prompt | string |
N/A |
win_options |
Window-level Vim options | table<string, any> |
See :h nvim_win_set_option |
win_config |
Window configuration for nvim_open_win |
table<string, any> |
See :h nvim_open_win |
size_options |
Dynamic sizing configuration | table |
See Size Options |
| Option | Description | Type | Notes |
|---|---|---|---|
width.min |
Minimum width of the select window | integer |
N/A |
width.max |
Maximum width of the select window | integer |
N/A |
height.min |
Minimum height of the select window | integer |
N/A |
height.max |
Maximum height of the select window | integer |
N/A |
require("select").setup({
default_prompt = "Select",
win_options = {
cursorline = true,
cursorlineopt = "both",
winhighlight = "Normal:FloatNormal,FloatBorder:FloatBorder,CursorLine:Visual",
},
win_config = {
relative = "editor",
anchor = "NW",
focusable = false,
noautocmd = true,
zindex = 150,
style = "minimal",
},
size_options = {
width = {
min = 1,
max = 80,
},
height = {
min = 1,
max = 999,
},
},
})These are the default key mappings:
| Keybinding | Mode(s) | Action |
|---|---|---|
<C-c> |
n | Cancel content changes and close select |
q |
n | Cancel content changes and close select |
<CR> |
n | Confirm content changes and close select |
| Highlight Group | Purpose |
|---|---|
SelectOptionLabel |
Option label used to confirm item |
To customize highlights for the plugin window:
require("select").setup({
win_options = {
winhighlight = "NormalFloat:DiagnosticError"
}
})For more, see :h winhighlight.
For detailed instructions on how to contribute to this plugin, please see the contributing guidelines.
