mirror of
https://github.com/nix-community/nixvim.git
synced 2025-06-20 16:15:43 +02:00
plugins/grug-far: init
This commit is contained in:
parent
54b1d91299
commit
2844c31655
2 changed files with 80 additions and 0 deletions
23
plugins/by-name/grug-far/default.nix
Normal file
23
plugins/by-name/grug-far/default.nix
Normal file
|
@ -0,0 +1,23 @@
|
|||
{ lib, ... }:
|
||||
lib.nixvim.neovim-plugin.mkNeovimPlugin {
|
||||
name = "grug-far";
|
||||
originalName = "grug-far.nvim";
|
||||
package = "grug-far-nvim";
|
||||
|
||||
maintainers = [ lib.maintainers.khaneliman ];
|
||||
|
||||
settingsExample = {
|
||||
debounceMs = 1000;
|
||||
minSearchChars = 1;
|
||||
maxSearchMatches = 2000;
|
||||
normalModeSearch = false;
|
||||
maxWorkers = 8;
|
||||
engine = "ripgrep";
|
||||
engines = {
|
||||
ripgrep = {
|
||||
path = "rg";
|
||||
showReplaceDiff = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
57
tests/test-sources/plugins/by-name/grug-far/default.nix
Normal file
57
tests/test-sources/plugins/by-name/grug-far/default.nix
Normal file
|
@ -0,0 +1,57 @@
|
|||
{
|
||||
empty = {
|
||||
plugins.grug-far.enable = true;
|
||||
};
|
||||
|
||||
# Just a small subset of the settings
|
||||
defaults = {
|
||||
plugins.grug-far = {
|
||||
enable = true;
|
||||
|
||||
settings = {
|
||||
debounceMs = 500;
|
||||
minSearchChars = 2;
|
||||
maxSearchMatches = 2000;
|
||||
normalModeSearch = false;
|
||||
maxWorkers = 4;
|
||||
engine = "ripgrep";
|
||||
engines = {
|
||||
ripgrep = {
|
||||
path = "rg";
|
||||
extraArgs = "";
|
||||
showReplaceDiff = true;
|
||||
placeholders = {
|
||||
enabled = true;
|
||||
search = "ex: foo foo([a-z0-9]*) fun\\(";
|
||||
replacement = ''ex: bar $${1}_foo $$MY_ENV_VAR'';
|
||||
replacement_lua = ''ex: if vim.startsWith(match; "use") \\n then return "employ" .. match \\n else return match end'';
|
||||
filesFilter = ''ex: *.lua *.{css;js} **/docs/*.md (specify one per line)'';
|
||||
flags = "ex: --help --ignore-case (-i) --replace= (empty replace) --multiline (-U)";
|
||||
paths = "ex: /foo/bar ../ ./hello\\ world/ ./src/foo.lua ~/.config";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
example = {
|
||||
plugins.grug-far = {
|
||||
enable = true;
|
||||
settings = {
|
||||
debounceMs = 1000;
|
||||
minSearchChars = 1;
|
||||
maxSearchMatches = 2000;
|
||||
normalModeSearch = false;
|
||||
maxWorkers = 8;
|
||||
engine = "ripgrep";
|
||||
engines = {
|
||||
ripgrep = {
|
||||
path = "rg";
|
||||
showReplaceDiff = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue