Skip to content

Commit

Permalink
plugins/blink-ripgrep: init
Browse files Browse the repository at this point in the history
  • Loading branch information
khaneliman authored Feb 5, 2025
1 parent d5406e5 commit 859a97b
Show file tree
Hide file tree
Showing 2 changed files with 71 additions and 0 deletions.
60 changes: 60 additions & 0 deletions plugins/by-name/blink-ripgrep/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
{ lib, ... }:
lib.nixvim.plugins.mkNeovimPlugin {
name = "blink-ripgrep";
package = "blink-ripgrep-nvim";

This comment has been minimized.

Copy link
@soulsoiledit

soulsoiledit Feb 8, 2025

I think packPathName needs to be set as it's "blink-ripgrep.nvim" not just "blink-ripgrep".

This comment has been minimized.

Copy link
@khaneliman

khaneliman Feb 9, 2025

Author Contributor

Oops, thanks for catching that.


maintainers = [ lib.maintainers.khaneliman ];

description = ''
This plugin should be configured through blink-cmp's `sources.providers` settings.
For example:
```nix
plugins.blink-cmp = {
enable = true;
settings.sources.providers = {
ripgrep = {
async = true;
module = "blink-ripgrep";
name = "Ripgrep";
score_offset = 100;
opts = {
prefix_min_len = 3;
context_size = 5;
max_filesize = "1M";
project_root_marker = ".git";
project_root_fallback = true;
search_casing = "--ignore-case";
additional_rg_options = {};
fallback_to_regex_highlighting = true;
ignore_paths = {};
additional_paths = {};
debug = false;
};
};
};
};
```
And then you can add it to blink-cmp's `sources.default` option:
```nix
plugins.blink-cmp = {
enable = true;
settings.sources.default = [
"lsp"
"path"
"luasnip"
"buffer"
"ripgrep"
];
};
```
'';

# Configured through blink-cmp
callSetup = false;
hasLuaConfig = false;
hasSettings = false;
}
11 changes: 11 additions & 0 deletions tests/test-sources/plugins/by-name/blink-ripgrep/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
empty = {
plugins.blink-ripgrep.enable = true;
};

defaults = {
plugins.blink-ripgrep = {
enable = true;
};
};
}

0 comments on commit 859a97b

Please sign in to comment.