nix-config/modules/nvim/config/lua/plugins/blink.lua
2025-06-04 08:23:15 +02:00

50 lines
1.2 KiB
Lua

return {
"saghen/blink.cmp",
dependencies = { "rafamadriz/friendly-snippets" },
version = "1.*",
---@module 'blink.cmp'
---@type blink.cmp.Config
opts = {
keymap = {
preset = "enter",
["<Tab>"] = { "select_next", "fallback" },
["<S-Tab>"] = { "select_prev", "fallback" },
["<C-k>"] = { "show_documentation", "hide_documentation" },
},
appearance = {
nerd_font_variant = "mono",
},
completion = {
documentation = { auto_show = false },
list = {
selection = {
preselect = false,
auto_insert = true,
},
},
},
signature = {
enabled = true,
},
sources = {
default = { "lazydev", "lsp", "path", "snippets", "buffer" },
per_filetype = {
sql = { "dadbod" },
codecompanion = { "codecompanion" },
},
providers = {
dadbod = { module = "vim_dadbod_completion.blink" },
lazydev = {
name = "LazyDev",
module = "lazydev.integrations.blink",
score_offset = 100,
},
},
},
fuzzy = { implementation = "prefer_rust_with_warning" },
cmdline = {
completion = { menu = { auto_show = true } },
},
},
opts_extend = { "sources.default" },
}