{ lib, ... }: let inherit (lib) types; inherit (lib.nixvim) defaultNullOpts; in lib.nixvim.neovim-plugin.mkNeovimPlugin { name = "blink-cmp"; packPathName = "blink.cmp"; package = "blink-cmp"; maintainers = [ lib.maintainers.balssh ]; description = '' Performant, batteries-included completion plugin for Neovim. ''; settingsOptions = { keymap = defaultNullOpts.mkNullableWithRaw' { type = with types; either (attrsOf anything) (enum [ false ]); pluginDefault = { preset = "default"; }; example = { "" = [ "show" "show_documentation" "hide_documentation" ]; "" = [ "hide" ]; "" = [ "select_and_accept" ]; "" = [ "select_prev" "fallback" ]; "" = [ "select_next" "fallback" ]; "" = [ "select_prev" "fallback" ]; "" = [ "select_next" "fallback" ]; "" = [ "scroll_documentation_up" "fallback" ]; "" = [ "scroll_documentation_down" "fallback" ]; "" = [ "snippet_forward" "fallback" ]; "" = [ "snippet_backward" "fallback" ]; }; description = '' The keymap can be: - A preset (`'default'` | `'super-tab'` | `'enter'`) - A table of `keys => command[]` (optionally with a "preset" key to merge with a preset) When specifying 'preset' in the keymap table, the custom key mappings are merged with the preset, and any conflicting keys will overwrite the preset mappings. ''; }; highlight = { use_nvim_cmp_as_default = defaultNullOpts.mkBool false '' Sets the fallback highlight groups to nvim-cmp's highlight groups. ''; }; fuzzy = { use_frecency = defaultNullOpts.mkBool true '' Enable the `Frecency` integration to boost the score of the most recently/frequently used items. ''; use_proximity = defaultNullOpts.mkBool true '' Enables the `Proximity` integration that boosts the score of items with a value in the buffer. ''; max_items = defaultNullOpts.mkUnsignedInt 200 '' Maximum number of items shown. ''; }; windows = { documentation = { auto_show = defaultNullOpts.mkBool false '' Enables automatically showing documentation when typing. ''; auto_show_delay_ms = defaultNullOpts.mkUnsignedInt 500 '' Delay, in milliseconds, after which documentation is shown. ''; update_delay_ms = defaultNullOpts.mkUnsignedInt 50 '' Delay, in milliseconds, after which documentation is updated. ''; }; }; nerd_font_variant = defaultNullOpts.mkEnumFirstDefault [ "normal" "mono" ] '' Set to `mono` for `Nerd Font Mono` or `normal` for `Nerd Font`. Adjusts spacing to ensure icons are aligned. ''; accept = { auto_brackets = { enabled = defaultNullOpts.mkBool false '' Enable experimental auto-brackets support. ''; }; }; trigger = { signature_help = { enabled = defaultNullOpts.mkBool false '' Enable experimental signature help support. ''; }; }; }; settingsExample = { keymap = { preset = "default"; }; highlight = { use_nvim_cmp_as_default = true; }; documentation = { auto_show = false; }; accept = { auto_brackets = { enabled = false; }; }; trigger = { signature_help = { enabled = true; }; }; }; extraConfig = cfg: { warnings = lib.optional (cfg.settings ? documentation) '' Nixvim(plugins.blink): `settings.documentation` does not correspond to a known setting, use `settings.windows.documentation` instead. ''; }; }