mirror of
https://github.com/NotAShelf/nvf.git
synced 2025-04-15 00:58:37 +00:00
completion/blink-cmp: add missing options
Some checks are pending
Check for typos in the source tree / check-typos (push) Waiting to run
Some checks are pending
Check for typos in the source tree / check-typos (push) Waiting to run
Blink breaks again, 11985891th recorded incident
This commit is contained in:
parent
b5c6e43381
commit
e7d656d06b
1 changed files with 38 additions and 3 deletions
|
@ -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;
|
||||
|
@ -64,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 = {
|
||||
|
@ -75,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 {
|
||||
|
@ -104,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.
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
@ -123,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 = ''
|
||||
|
@ -137,7 +173,6 @@ in {
|
|||
Should be present in the source's documentation.
|
||||
'';
|
||||
};
|
||||
enable = mkEnableOption "this source";
|
||||
};
|
||||
};
|
||||
in
|
||||
|
|
Loading…
Add table
Reference in a new issue