completion.lua (1945B)
1 return { 2 'saghen/blink.cmp', 3 -- optional: provides snippets for the snippet source 4 -- dependencies = { 'rafamadriz/friendly-snippets' }, 5 6 -- use a release tag to download pre-built binaries 7 version = '1.*', 8 9 ---@module 'blink.cmp' 10 ---@type blink.cmp.Config 11 opts = { 12 -- 'default' (recommended) for mappings similar to built-in completions (C-y to accept) 13 -- 'super-tab' for mappings similar to vscode (tab to accept) 14 -- 'enter' for enter to accept 15 -- 'none' for no mappings 16 -- 17 -- All presets have the following mappings: 18 -- C-space: Open menu or open docs if already open 19 -- C-n/C-p or Up/Down: Select next/previous item 20 -- C-e: Hide menu 21 -- C-k: Toggle signature help (if signature.enabled = true) 22 -- 23 -- See :h blink-cmp-config-keymap for defining your own keymap 24 keymap = { preset = 'enter' }, 25 26 appearance = { 27 -- 'mono' (default) for 'Nerd Font Mono' or 'normal' for 'Nerd Font' 28 -- Adjusts spacing to ensure icons are aligned 29 nerd_font_variant = 'mono' 30 }, 31 32 -- (Default) Only show the documentation popup when manually triggered 33 completion = { documentation = { auto_show = false } }, 34 35 -- Default list of enabled providers defined so that you can extend it 36 -- elsewhere in your config, without redefining it, due to `opts_extend` 37 sources = { 38 default = { 'lsp', 'path', 'snippets', 'buffer' }, 39 }, 40 41 signature = { 42 enabled = true 43 }, 44 45 -- (Default) Rust fuzzy matcher for typo resistance and significantly better performance 46 -- You may use a lua implementation instead by using `implementation = "lua"` or fallback to the lua implementation, 47 -- when the Rust fuzzy matcher is not available, by using `implementation = "prefer_rust"` 48 -- 49 -- See the fuzzy documentation for more information 50 fuzzy = { implementation = "prefer_rust_with_warning" } 51 }, 52 opts_extend = { "sources.default" } 53 }