chowcho.nvim icon indicating copy to clipboard operation
chowcho.nvim copied to clipboard

simply window selector for neovim written in lua

chowcho.nvim

  • simply window operation for neovim written in lua
  • inspired by you-are-here.vim

Installation

  • packer.nvim
use {'tkmpypy/chowcho.nvim'}

Usage

Select the number after executing the command Chowcho or after calling the lua function.

require('chowcho').run()

Optionally, run an arbitrary function which receives winid. The example below hides a selected window.

require('chowcho').run(vim.api.nvim_win_hide)

Config

call setup function

require('chowcho').setup {
  icon_enabled = true, -- required 'nvim-web-devicons' (default: false)
  text_color = '#FFFFFF',
  bg_color = '#555555',
  active_border_color = '#0A8BFF',
  border_style = 'default' -- 'default', 'rounded',
  use_exclude_default = false,
  exclude = function(buf, win)
    -- Exclude a window from the choice based on its buffer information.
    -- This option is applied iff `use_exclude_default = false`.
    -- Note that below is identical to the `use_exclude_default = true`.
    local fname = vim.fn.expand('#' .. buf .. ':t')
    return fname == ''
  end
}

Screenshot

image image