2025-01-31 12:39:40 +08:00
|
|
|
# flygrep.nvim
|
|
|
|
|
2025-01-31 14:23:30 +08:00
|
|
|
> _flygrep.nvim_ is a plugin to search text in neovim floating window asynchronously
|
2025-01-31 12:39:40 +08:00
|
|
|
|
|
|
|
[![](https://spacevim.org/img/build-with-SpaceVim.svg)](https://spacevim.org)
|
|
|
|
[![GPLv3 License](https://img.spacevim.org/license-GPLv3-blue.svg)](LICENSE)
|
|
|
|
|
2025-01-31 13:18:18 +08:00
|
|
|
![flygrep.nvim](https://img.spacevim.org/flygrep.nvim.gif)
|
2025-01-31 12:39:40 +08:00
|
|
|
|
|
|
|
<!-- vim-markdown-toc GFM -->
|
|
|
|
|
|
|
|
- [Intro](#intro)
|
|
|
|
- [Requirements](#requirements)
|
|
|
|
- [Install](#install)
|
|
|
|
- [Command](#command)
|
|
|
|
- [Configuration](#configuration)
|
|
|
|
- [Key Bindings](#key-bindings)
|
|
|
|
- [Feedback](#feedback)
|
|
|
|
|
|
|
|
<!-- vim-markdown-toc -->
|
|
|
|
|
|
|
|
## Intro
|
|
|
|
|
2025-01-31 13:18:18 +08:00
|
|
|
`flygrep.nvim` is a neovim plugin that can be used to search code asynchronously in real time.
|
2025-01-31 12:39:40 +08:00
|
|
|
|
|
|
|
## Requirements
|
|
|
|
|
|
|
|
- [neovim](https://github.com/neovim/neovim): >= v0.10.0
|
|
|
|
- [ripgrep](https://github.com/BurntSushi/ripgrep): If you are using other searching tool, you need to set command option of flygrep.
|
|
|
|
|
|
|
|
## Install
|
|
|
|
|
|
|
|
- use [vim-plug](https://github.com/junegunn/vim-plug) package manager
|
|
|
|
|
|
|
|
```
|
|
|
|
Plug 'wsdjeg/flygrep.nvim'
|
|
|
|
```
|
|
|
|
|
|
|
|
## Command
|
|
|
|
|
|
|
|
- `:FlyGrep`: open flygrep in current directory
|
|
|
|
|
|
|
|
## Configuration
|
|
|
|
|
|
|
|
```lua
|
|
|
|
require('flygrep').setup({
|
|
|
|
color_templete = {
|
|
|
|
a = {
|
|
|
|
fg = '#2c323c',
|
|
|
|
bg = '#98c379',
|
|
|
|
ctermfg = 16,
|
|
|
|
ctermbg = 114,
|
|
|
|
bold = true,
|
|
|
|
},
|
|
|
|
b = {
|
|
|
|
fg = '#abb2bf',
|
|
|
|
bg = '#3b4048',
|
|
|
|
ctermfg = 145,
|
|
|
|
ctermbg = 16,
|
|
|
|
bold = false,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
timeout = 200,
|
|
|
|
command = {
|
|
|
|
execute = 'rg',
|
|
|
|
default_opts = {
|
|
|
|
'--no-heading',
|
|
|
|
'--color=never',
|
|
|
|
'--with-filename',
|
|
|
|
'--line-number',
|
|
|
|
'--column',
|
|
|
|
'-g',
|
|
|
|
'!.git',
|
|
|
|
},
|
|
|
|
recursive_opt = {},
|
|
|
|
expr_opt = { '-e' },
|
|
|
|
fixed_string_opt = { '-F' },
|
|
|
|
default_fopts = { '-N' },
|
|
|
|
smart_case = { '-S' },
|
|
|
|
ignore_case = { '-i' },
|
|
|
|
hidden_opt = { '--hidden' },
|
|
|
|
},
|
|
|
|
matched_higroup = 'IncSearch',
|
2025-01-31 13:18:18 +08:00
|
|
|
enable_preview = false,
|
2025-01-31 12:39:40 +08:00
|
|
|
})
|
|
|
|
```
|
|
|
|
|
|
|
|
## Key Bindings
|
|
|
|
|
2025-02-02 22:46:28 +08:00
|
|
|
| Key bindings | descretion |
|
|
|
|
| -------------------- | ---------------------------------- |
|
|
|
|
| `<Enter>` | open cursor item |
|
|
|
|
| `<Tab>` or `<C-j>` | next item |
|
|
|
|
| `<S-Tab>` or `<C-k>` | previous item |
|
|
|
|
| `<C-s>` | open item in split window |
|
|
|
|
| `<C-v>` | open item in vertical split window |
|
|
|
|
| `<C-t>` | open item in new tabpage |
|
|
|
|
| `<C-p>` | toggle preview window |
|
2025-02-03 00:37:55 +08:00
|
|
|
| `<C-h>` | toggle display hidden files |
|
2025-01-31 12:39:40 +08:00
|
|
|
|
|
|
|
## Feedback
|
|
|
|
|
|
|
|
The development of this plugin is in [`SpaceVim/bundle/flygrep.nvim`](https://github.com/SpaceVim/SpaceVim/tree/master/bundle/flygrep.nvim) directory.
|
|
|
|
|
|
|
|
If you encounter any bugs or have suggestions, please file an issue in the [issue tracker](https://github.com/SpaceVim/SpaceVim/issues)
|