plugins/blink-cmp-nixpkgs-maintainers: init

This commit is contained in:
Gaetan Lepage 2026-01-24 11:06:44 +01:00 committed by Gaétan Lepage
parent 34a7d94cdc
commit acb045161f
2 changed files with 81 additions and 0 deletions

View file

@ -0,0 +1,47 @@
{ lib, ... }:
lib.nixvim.plugins.mkNeovimPlugin {
name = "blink-cmp-nixpkgs-maintainers";
maintainers = [ lib.maintainers.GaetanLepage ];
description = ''
nixpkgs-maintainers source for blink-cmp.
---
This plugin should be configured through blink-cmp's `sources.providers` settings.
For example:
```nix
plugins.blink-cmp = {
enable = true;
settings.sources = {
per_filetype = {
markdown = [ "nixpkgs_maintainers" ];
};
providers = {
nixpkgs_maintainers = {
module = "blink_cmp_nixpkgs_maintainers";
name = "nixpkgs maintainers";
opts = {
# Number of days after which the list of maintainers is refreshed
cache_lifetime = 14;
# Do not print status messages
silent = false;
# Customize the `nixpkgs` source flake for fetching the maintainers list
# Example: "github:NixOS/nixpkgs/master"
nixpkgs_flake_uri = "nixpkgs";
};
};
};
};
};
```
'';
# Configured through blink-cmp
callSetup = false;
hasLuaConfig = false;
hasSettings = false;
}

View file

@ -0,0 +1,34 @@
{
empty = {
plugins = {
blink-cmp.enable = true;
blink-cmp-nixpkgs-maintainers.enable = true;
};
};
example = {
plugins = {
blink-cmp-nixpkgs-maintainers.enable = true;
blink-cmp = {
enable = true;
settings.sources = {
per_filetype = {
markdown = [ "nixpkgs_maintainers" ];
};
providers = {
nixpkgs_maintainers = {
module = "blink_cmp_nixpkgs_maintainers";
name = "nixpkgs maintainers";
opts = {
cache_lifetime = 14;
silent = false;
nixpkgs_flake_uri = "nixpkgs";
};
};
};
};
};
};
};
}