https://github.com/oxtna/vshow.nvim
A Neovim plugin for showing whitespace in visual modes.
https://github.com/oxtna/vshow.nvim
lua neovim showcase
Last synced: about 2 months ago
JSON representation
A Neovim plugin for showing whitespace in visual modes.
- Host: GitHub
- URL: https://github.com/oxtna/vshow.nvim
- Owner: oxtna
- License: mit
- Created: 2022-09-02T21:10:52.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2025-08-13T22:49:34.000Z (11 months ago)
- Last Synced: 2025-08-14T00:19:31.157Z (11 months ago)
- Topics: lua, neovim, showcase
- Language: Lua
- Homepage:
- Size: 6.84 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# vshow.nvim
Configurable Neovim plugin for showing whitespace in visual mode that
abstracts away setting up autocommands (and maybe more in the future).
## Features
- Customizable list of characters to show
- Mode-specific settings
## Installation
To install with [lazy.nvim](https://github.com/folke/lazy.nvim), create
`vshow.lua` in your plugin directory and put the following content into it:
```lua
return {
{
'oxtna/vshow.nvim',
event = 'VimEnter',
config = function()
require('vshow').setup()
end,
}
}
```
To install with [vim-plug](https://github.com/junegunn/vim-plug):
```vim
Plug 'oxtna/vshow.nvim'
```
## Usage
To start using `vshow` with default settings, run setup in a lua file
or a lua heredoc [:help lua-heredoc](https://neovim.io/doc/user/lua.html)
inside a vim file:
```lua
require('vshow').setup()
```
To change `vshow`'s behavior, pass the configuration table to the setup,
like so:
```lua
require('vshow').setup({
{
space = '•',
nbsp = '+',
tab = '>•',
},
line = {
multispace = '|•',
eol = '$',
},
user_default = true,
})
```
## Configuration
`vshow` uses Neovim's built-in *listchars*, so all keys and values are
the same as *listchars*. To see the whole list of possible keys and values,
see [:help listchars](https://neovim.io/doc/user/options.html#'listchars').
To use the user's *listchars* as the default base generic configuration instead
of `vshow`'s default base configuration (which is the same as Neovim's default),
set the `user_default` flag to `true` in the configuration table passed to the
`setup` function. Its value is `false` by default.
Here is a list with `vshow`'s default options:
```lua
local config = {
{
tab = '> ',
trail = '-',
nbsp = '+',
},
}
```
Mode-specific settings overwrite generic settings for all modes.
To make a character invisible for all modes, set its assigned value to `0` in
the configuration table for all modes, like so:
```lua
require('vshow').setup({
{
tab = 0,
},
})
```
To make a character invisible for a specific mode, set its assigned value to `0`
in the configuration table of that mode, like so:
```lua
require('vshow').setup({
line = {
tab = 0,
},
})
```