Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

https://github.com/mcauley-penney/visual-whitespace.nvim

Highlight whitespace in visual mode
https://github.com/mcauley-penney/visual-whitespace.nvim

Last synced: 4 months ago
JSON representation

Highlight whitespace in visual mode

Lists

README

        

# visual-whitespace.nvim ๐Ÿ”Ž

Reveal whitespace characters in visual mode, similar to VSCode.

![vis-ws](https://github.com/mcauley-penney/visual-whitespace.nvim/assets/59481467/5d8b1e9a-e1b6-479a-b1d1-fcf0162fa4a8)

## Installation and configuration

To install it with the default settings using Lazy:

```lua
{
'mcauley-penney/visual-whitespace.nvim',
config = true
}
```

`visual-whitespace` comes with the following default settings:

```lua
opts = {
highlight = { link = 'Visual' },
space_char = 'ยท',
tab_char = 'โ†’',
nl_char = 'โ†ฒ'
},
```

## Credit

- [This post on the Neovim subreddit](https://www.reddit.com/r/neovim/comments/1b1sv3a/function_to_get_visually_selected_text/), for doing a lot of the math for me
- [aaron-p1/match-visual.nvim](https://github.com/aaron-p1/match-visual.nvim)