return { -- Autowcompletion "saghen/blink.cmp", event = "VimEnter", version = "1.*", dependencies = { -- Snippet Engine { "L3MON4D3/LuaSnip", version = "2.*", build = (function() -- Build Step is needed for regex support in snippets. -- This step is not supported in many windows environments. if vim.fn.has("win32") == 1 or vim.fn.executable("make") == 0 then return end return "make install_jsregexp" end)(), dependencies = { -- https://github.com/rafamadriz/friendly-snippets { "rafamadriz/friendly-snippets", config = function() require("luasnip.loaders.from_vscode").lazy_load() end, }, }, opts = {}, }, "folke/lazydev.nvim", "moyiz/blink-emoji.nvim", }, --- @module 'blink.cmp' --- @type blink.cmp.Config opts = { keymap = { -- 'default' (recommended) for mappings similar to built-in completions -- to accept ([y]es) the completion. -- This will auto-import if your LSP supports it. -- This will expand snippets if the LSP sent a snippet. -- 'super-tab' for tab to accept -- 'enter' for enter to accept -- 'none' for no mappings -- -- All presets have the following mappings: -- /: move to right/left of your snippet expansion -- : Open menu or open docs if already open -- / or /: Select next/previous item -- : Hide menu -- : Toggle signature help -- See :h blink-cmp-config-keymap for defining your own keymap preset = "super-tab", }, appearance = { -- 'mono' (default) for 'Nerd Font Mono' or 'normal' for 'Nerd Font' nerd_font_variant = "mono", }, completion = { -- By default, you may press `` to show the documentation. documentation = { auto_show = true, auto_show_delay_ms = 500 }, menu = { border = "rounded", }, ghost_text = { enabled = false, }, }, -- Shows a signature help window while you type arguments for a function signature = { enabled = true }, sources = { default = { "lsp", "path", "snippets", "lazydev", "buffer" }, providers = { lazydev = { module = "lazydev.integrations.blink", score_offset = 100 }, emoji = { module = "blink-emoji", name = "Emoji", score_offset = 15, -- Tune by preference opts = { insert = true }, -- Insert emoji (default) or complete its name -- should_show_items = function() -- return vim.tbl_contains( -- -- Enable emoji completion only for git commits and markdown. -- -- By default, enabled for all file-types. -- { "gitcommit", "markdown" }, -- vim.o.filetype -- ) -- end, }, }, }, -- snippets = { preset = "luasnip" }, fuzzy = { implementation = "prefer_rust_with_warning" }, }, }