From 01f011f6f88913bc41661ab36b6036d73e0e21cd Mon Sep 17 00:00:00 2001 From: Ching Pei Yang Date: Sat, 11 Jan 2025 20:39:37 +0100 Subject: [PATCH] blink: do not deprio snippets by default --- modules/plugins/completion/blink-cmp/blink-cmp.nix | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/modules/plugins/completion/blink-cmp/blink-cmp.nix b/modules/plugins/completion/blink-cmp/blink-cmp.nix index bec546cb0..b61552846 100644 --- a/modules/plugins/completion/blink-cmp/blink-cmp.nix +++ b/modules/plugins/completion/blink-cmp/blink-cmp.nix @@ -1,6 +1,7 @@ {lib, ...}: let inherit (lib.options) mkEnableOption mkOption literalMD; inherit (lib.types) listOf str either attrsOf submodule enum anything int nullOr; + inherit (lib.generators) mkLuaInline; inherit (lib.nvim.types) mkPluginSetupOption luaInline; inherit (lib.nvim.binds) mkMappingOption; inherit (lib.nvim.config) mkBool; @@ -47,6 +48,19 @@ in { default = {}; description = "Providers"; }; + + transform_items = mkOption { + type = nullOr luaInline; + default = mkLuaInline "function(_, items) return items end"; + defaultText = '' + Our default does nothing. If you want blink.cmp's default, which + lowers the score for snippets, set this option to null. + ''; + description = '' + Function to use when transforming the items before they're returned + for all providers. + ''; + }; }; completion = {