Skip to content

winston0410/rg.nvim

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 

Repository files navigation

rg.nvim

demo

A plugin that integrates rg in nvim, while allowing you to extend it however you want.

This plugin doesn't bundle you into a quickfix list plugin, or a specify UI. You can design whatever you want.

Usage

Use the default keybinding as an operator (e.g. <leader>siw or vaw<leader>s and select words that you want to search with.

Once the search is completed, the opts.on_complete callback will be called. You can then decide how to present the result of quickfix list.

Installation

Paq.nvim

paq{'winston0410/rg.nvim'}

Packer.nvim

use({"winston0410/rg.nvim"})

vim-plug

Plug 'winston0410/rg.nvim'

Configuration

Initialize the plugin:

require("rg").setup({})

This is the default configuration:

local opts = {
	default_keybindings = {
		enable = true,
		modes = { "n", "v" },
		binding = "<Leader>s",
	},
	on_complete = function()
		api.nvim_command("cwindow")
	end,
	program = {
		command = "rg",
		args = { "--vimgrep", "--smart-case" },
	},
}

Inspiration

This plugin is inspired by the following resources:

https://github.com/folke/trouble.nvim

https://teukka.tech/vimloop.html

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors