A very fast neovim config :D
at master 64 lines 2.1 kB view raw
1local M = { 2 { 3 "saghen/blink.cmp", 4 version = "*", 5 event = { "InsertEnter", "CmdlineEnter" }, 6 opts = { 7 keymap = { 8 preset = "default", 9 ["<Tab>"] = { 10 function(ctx) 11 if ctx.is_ghost_text_visible() and not ctx.is_menu_visible() then 12 return ctx.accept() 13 end 14 end, 15 "select_next", 16 "snippet_forward", 17 "fallback", 18 }, 19 ["<S-Tab>"] = { "show_and_insert", "select_prev" }, 20 ["<CR>"] = { 21 "accept", 22 "fallback", 23 }, 24 }, 25 26 appearance = { 27 nerd_font_variant = "mono", 28 }, 29 completion = { 30 documentation = { auto_show = true }, 31 ghost_text = { enabled = true }, 32 list = { selection = { preselect = false, auto_insert = true } }, 33 }, 34 sources = { 35 default = { "lsp", "buffer", "path" }, 36 }, 37 fuzzy = { implementation = "prefer_rust_with_warning" }, 38 39 cmdline = { 40 enabled = true, 41 keymap = { 42 preset = "cmdline", 43 }, 44 sources = function() 45 local type = vim.fn.getcmdtype() 46 if type == "/" or type == "?" then 47 return { "buffer" } 48 end 49 if type == ":" or type == "@" then 50 return { "cmdline" } 51 end 52 return {} 53 end, 54 completion = { 55 menu = { auto_show = true }, 56 ghost_text = { enabled = true }, 57 list = { selection = { preselect = true, auto_insert = true } }, 58 }, 59 }, 60 }, 61 }, 62} 63 64return M