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 = {