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

@ -1,6 +1,6 @@
{lib, ...}: let
inherit (lib.options) mkEnableOption mkOption literalMD;
inherit (lib.types) listOf str either attrsOf submodule enum anything int nullOr;
inherit (lib.types) bool listOf str either attrsOf submodule enum anything int nullOr;
inherit (lib.generators) mkLuaInline;
inherit (lib.nvim.types) mkPluginSetupOption luaInline pluginType;
inherit (lib.nvim.binds) mkMappingOption;
@ -21,8 +21,9 @@
freeformType = anything;
options = {
module = mkOption {
type = str;
description = "module of the provider";
type = nullOr str;
default = null;
description = "Provider module.";
};
};
};
@ -40,7 +41,7 @@ in {
providers = mkOption {
type = attrsOf providerType;
default = {};
description = "Settings for completion providers";
description = "Settings for completion providers.";
};
transform_items = mkOption {
@ -63,6 +64,12 @@ in {
default = [];
description = "List of sources to enable for cmdline. Null means use default source list.";
};
keymap = mkOption {
type = keymapType;
default = {};
description = "blink.cmp cmdline keymap";
};
};
completion = {
@ -74,6 +81,16 @@ in {
description = "Delay before auto show triggers";
};
};
menu.auto_show = mkOption {
type = bool;
default = true;
description = ''
Manages the appearance of the completion menu. You may prevent the menu
from automatically showing by this option to `false` and manually showing
it with the show keymap command.
'';
};
};
keymap = mkOption {
@ -103,7 +120,25 @@ in {
fuzzy = {
prebuilt_binaries = {
download = mkBool false ''
Auto-downloads prebuilt binaries. Do not enable, it doesn't work on nix
Auto-downloads prebuilt binaries.
::: .{warning}
Do not enable this option, as it does **not work** on Nix!
:::
'';
};
implementation = mkOption {
type = enum ["lua" "prefer_rust" "rust" "prefer_rust_with_warning"];
default = "prefer_rust";
description = ''
fuzzy matcher implementation for Blink.
* `"lua"`: slower, Lua native fuzzy matcher implementation
* `"rust": use the SIMD fuzzy matcher, 'frizbee'
* `"prefer_rust"`: use the rust implementation, but fall back to lua
* `"prefer_rust_with_warning"`: use the rust implementation, and fall back to lua
if it is not available after emitting a warning.
'';
};
};
@ -122,12 +157,14 @@ in {
sourcePlugins = let
sourcePluginType = submodule {
options = {
enable = mkEnableOption "this source";
package = mkOption {
type = pluginType;
description = ''
`blink-cmp` source plugin package.
'';
};
module = mkOption {
type = str;
description = ''
@ -136,7 +173,6 @@ in {
Should be present in the source's documentation.
'';
};
enable = mkEnableOption "this source";
};
};
in