my neovim config, who would've thought
at main 1.1 kB view raw
1return { 2 "saghen/blink.cmp", 3 dependencies = { 4 "rafamadriz/friendly-snippets", 5 }, 6 version = "1.*", 7 event = "InsertEnter", 8 ---@module 'blink.cmp' 9 ---@type blink.cmp.Config 10 opts = { 11 keymap = { 12 preset = "enter", 13 ["<C-u>"] = { "scroll_documentation_up", "fallback" }, 14 ["<C-d>"] = { "scroll_documentation_down", "fallback" }, 15 ["<C-l>"] = { "snippet_forward", "accept", "fallback" }, 16 }, 17 completion = { 18 documentation = { 19 auto_show = true, 20 auto_show_delay_ms = 300, 21 }, 22 }, 23 sources = { 24 default = { "lsp", "path", "snippets", "buffer" }, 25 per_filetype = { 26 lua = { inherit_defaults = true, "lazydev" }, 27 }, 28 providers = { 29 lazydev = { 30 name = "LazyDev", 31 module = "lazydev.integrations.blink", 32 score_offset = 100, 33 }, 34 }, 35 }, 36 }, 37 config = function(_, opts) 38 require("blink.cmp").setup(opts) 39 vim.lsp.config("*", { 40 flags = { debounce_text_changes = 150 }, 41 capabilities = require("blink.cmp").get_lsp_capabilities(), 42 }) 43 end, 44}