Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/aaron-p1/match-visual.nvim
Plugin to match visually selected text
https://github.com/aaron-p1/match-visual.nvim
fennel lua neovim neovim-plugin
Last synced: about 2 months ago
JSON representation
Plugin to match visually selected text
- Host: GitHub
- URL: https://github.com/aaron-p1/match-visual.nvim
- Owner: aaron-p1
- License: mit
- Created: 2023-02-07T18:31:09.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-04-29T10:12:51.000Z (9 months ago)
- Last Synced: 2024-04-29T11:29:52.010Z (9 months ago)
- Topics: fennel, lua, neovim, neovim-plugin
- Language: Lua
- Homepage:
- Size: 11.7 KB
- Stars: 5
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Highlight selected text in all windows
With this plugin, when you select text in visual mode, all instances of that text will be
highlighted in all visible windows. This makes it simple and convenient to spot any duplicated text.https://user-images.githubusercontent.com/62202958/217337259-66199579-c39e-4fd7-b57f-246b546231e2.mp4
## Requirements
[neovim >=0.7.0](https://github.com/neovim/neovim/wiki/Installing-Neovim)
## Install
### [Packer](https://github.com/wbthomason/packer.nvim)
```lua
use 'aaron-p1/match-visual.nvim'
```## Setup (Optional)
```lua
require('match-visual').setup({
-- minimum length of text to match
min_length = 1,
-- Visual group to use for highlighting
-- You could also override the "VisualMatch" hl group to change the highlights.
hl_group = "Visual"
-- id to use in matchadd(). Only needs to be set if you already use this id
match_id = 118,
})
```## Contributing
If you're interested in contributing to this plugin, it's important to note that it's written in
[fennel](https://fennel-lang.org/). The lua code is generated using the fennel transpiler, so all
contributions must also be written in fennel. You can use the command `$ make` to transpile the
code, and before committing any changes, it's mandatory that you use the
[fnlfmt](https://git.sr.ht/~technomancy/fnlfmt) tool by running `$ make format` or using the
[null-ls](https://github.com/jose-elias-alvarez/null-ls.nvim) neovim plugin to format the code.If you're using [nix](https://github.com/NixOS/nix), a package manager for Linux and other Unix
systems, you can easily install the necessary programs for development by running
`$ nix develop`, or by using [direnv](https://github.com/direnv/direnv) with
[nix-direnv](https://github.com/nix-community/nix-direnv).