blink-cmp: apply Nix patch; use new fetcher (#714)
Some checks failed
Set up binary cache / cachix (default) (push) Has been cancelled
Set up binary cache / cachix (maximal) (push) Has been cancelled
Set up binary cache / cachix (nix) (push) Has been cancelled
Validate flake & check documentation / Validate Flake Documentation (push) Has been cancelled
Validate flake & check documentation / Validate hyperlinks in documentation sources (push) Has been cancelled
Validate flake & check formatting / Validate Flake (push) Has been cancelled
Validate flake & check formatting / Formatting via Alejandra (push) Has been cancelled
Build and deploy documentation / Check latest commit (push) Has been cancelled
Check for typos in the source tree / check-typos (push) Has been cancelled
Build and deploy documentation / publish (push) Has been cancelled

* blink-cmp: apply Nix patch; use new fetcher

* completion/blink: don't break when modifying built-in sources.providers (#683)

* completion/blink-cmp: add missing options

**Blink breaks again, 11985891th recorded incident**

---------

Co-authored-by: Alfarel <alfarelcynthesis@proton.me>
This commit is contained in:
raf 2025-03-18 20:34:34 +00:00 committed by GitHub
commit a5dee946a9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 80 additions and 14 deletions

View file

@ -6,8 +6,8 @@
inherit (lib.modules) mkIf;
inherit (lib.strings) optionalString;
inherit (lib.generators) mkLuaInline;
inherit (lib.attrsets) attrValues filterAttrs;
inherit (lib.lists) map optional;
inherit (lib.attrsets) attrValues filterAttrs mapAttrsToList;
inherit (lib.lists) map optional elem;
inherit (lib.nvim.lua) toLuaObject;
inherit (builtins) concatStringsSep typeOf tryEval attrNames mapAttrs;
@ -24,7 +24,22 @@
enabledBlinkSources = filterAttrs (_source: definition: definition.enable) cfg.sourcePlugins;
blinkSourcePlugins = map (definition: definition.package) (attrValues enabledBlinkSources);
blinkBuiltins = [
"path"
"lsp"
"snippets"
"buffer"
"omni"
];
in {
assertions =
mapAttrsToList (provider: definition: {
assertion = elem provider blinkBuiltins || definition.module != null;
message = "`config.vim.autocomplete.blink-cmp.setupOpts.sources.providers.${provider}.module` is `null`: non-builtin providers must set `module`.";
})
cfg.setupOpts.sources.providers;
vim = mkIf cfg.enable {
startPlugins = ["blink-compat"] ++ blinkSourcePlugins ++ (optional cfg.friendly-snippets.enable "friendly-snippets");
lazy.plugins = {