https://github.com/tkmpypy/chowcho.nvim
simply window selector for neovim written in lua
https://github.com/tkmpypy/chowcho.nvim
lua neovim
Last synced: 3 days ago
JSON representation
simply window selector for neovim written in lua
- Host: GitHub
- URL: https://github.com/tkmpypy/chowcho.nvim
- Owner: tkmpypy
- License: mit
- Created: 2020-11-25T07:01:03.000Z (about 5 years ago)
- Default Branch: main
- Last Pushed: 2024-11-11T00:44:15.000Z (about 1 year ago)
- Last Synced: 2025-12-02T02:09:08.912Z (2 months ago)
- Topics: lua, neovim
- Language: Lua
- Homepage:
- Size: 51.8 KB
- Stars: 38
- Watchers: 1
- Forks: 5
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# chowcho.nvim
- simply window operation for neovim written in lua
- inspired by [you-are-here.vim](https://github.com/bignimbus/you-are-here.vim)
## Installation
- `lazy.nvim`
```lua
{
"tkmpypy/chowcho.nvim",
config = function()
require("chowcho").setup({...})
end,
},
```
## Usage
Select the number after executing the command `Chowcho` or after calling the lua function.
```lua
require('chowcho').run()
```
Optionally, run an arbitrary function which receives winid.
The example below hides a selected window.
```lua
require('chowcho').run(vim.api.nvim_win_hide)
```
## Config
call `setup` function
```lua
require('chowcho').setup {
-- Must be a single character. The length of the array is the maximum number of windows that can be moved.
labels = { "A", "B", "C", "D", "E", "F", "G", "H", "I" },
selector = "statusline", -- `float` or `statusline` (default: `float`)
use_exclude_default = true,
ignore_case = true,
exclude = function(buf, win)
-- exclude noice.nvim's cmdline_popup
local bt = vim.api.nvim_get_option_value("buftype", { buf = buf })
local ft = vim.api.nvim_get_option_value("filetype", { buf = buf })
if bt == "nofile" and (ft == "noice" or ft == "vim") then
return true
end
return false
end,
selector = {
float = {
border_style = "rounded",
icon_enabled = true,
color = {
label = {
active = "#c8cfff",
inactive = "#ababab",
},
text = {
active = "#fefefe",
inactive = "#d0d0d0",
},
border = {
active = "#b400c8",
inactive = "#fefefe",
},
},
zindex = 1,
},
statusline = {
color = {
label = {
active = "#fefefe",
inactive = "#d0d0d0",
},
background = {
active = "#3d7172",
inactive = "#203a3a",
},
},
},
},
}
```
## Screenshot

