Skip to content

Commit 859a97b

Browse files
authored
plugins/blink-ripgrep: init
1 parent d5406e5 commit 859a97b

File tree

2 files changed

+71
-0
lines changed

2 files changed

+71
-0
lines changed
Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
{ lib, ... }:
2+
lib.nixvim.plugins.mkNeovimPlugin {
3+
name = "blink-ripgrep";
4+
package = "blink-ripgrep-nvim";
5+
6+
maintainers = [ lib.maintainers.khaneliman ];
7+
8+
description = ''
9+
This plugin should be configured through blink-cmp's `sources.providers` settings.
10+
11+
For example:
12+
13+
```nix
14+
plugins.blink-cmp = {
15+
enable = true;
16+
settings.sources.providers = {
17+
ripgrep = {
18+
async = true;
19+
module = "blink-ripgrep";
20+
name = "Ripgrep";
21+
score_offset = 100;
22+
opts = {
23+
prefix_min_len = 3;
24+
context_size = 5;
25+
max_filesize = "1M";
26+
project_root_marker = ".git";
27+
project_root_fallback = true;
28+
search_casing = "--ignore-case";
29+
additional_rg_options = {};
30+
fallback_to_regex_highlighting = true;
31+
ignore_paths = {};
32+
additional_paths = {};
33+
debug = false;
34+
};
35+
};
36+
};
37+
};
38+
```
39+
40+
And then you can add it to blink-cmp's `sources.default` option:
41+
42+
```nix
43+
plugins.blink-cmp = {
44+
enable = true;
45+
settings.sources.default = [
46+
"lsp"
47+
"path"
48+
"luasnip"
49+
"buffer"
50+
"ripgrep"
51+
];
52+
};
53+
```
54+
'';
55+
56+
# Configured through blink-cmp
57+
callSetup = false;
58+
hasLuaConfig = false;
59+
hasSettings = false;
60+
}
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
empty = {
3+
plugins.blink-ripgrep.enable = true;
4+
};
5+
6+
defaults = {
7+
plugins.blink-ripgrep = {
8+
enable = true;
9+
};
10+
};
11+
}

0 commit comments

Comments
 (0)