Use word-boundary wrapping and count-aware displayed-line movement in ordinary buffers. Escape cancels Blink completion before falling back. Preserve the existing ergonomics check; it was not rerun during Git cleanup.
70 lines
2.1 KiB
Lua
70 lines
2.1 KiB
Lua
require("blink.compat").setup({})
|
|
|
|
require("lz.n").load({
|
|
{ "friendly-snippets" },
|
|
{
|
|
"colorful-menu.nvim",
|
|
event = { "InsertEnter", "CmdlineEnter" },
|
|
after = function()
|
|
require("colorful-menu").setup({})
|
|
end,
|
|
},
|
|
{
|
|
"blink.cmp",
|
|
event = { "InsertEnter", "CmdlineEnter" },
|
|
after = function()
|
|
require("blink.cmp").setup({
|
|
keymap = {
|
|
["<Esc>"] = { "cancel", "fallback" },
|
|
["<C-j>"] = { "select_next", "fallback" },
|
|
["<C-k>"] = { "select_prev", "fallback" },
|
|
["<Tab>"] = { "select_and_accept", "fallback" },
|
|
["<C-g>"] = { "show_signature", "hide_signature", "fallback" },
|
|
},
|
|
completion = {
|
|
documentation = { auto_show = true },
|
|
menu = {
|
|
draw = {
|
|
columns = { { "kind_icon" }, { "label", gap = 1 } },
|
|
components = {
|
|
label = {
|
|
text = function(ctx)
|
|
return require("colorful-menu").blink_components_text(ctx)
|
|
end,
|
|
highlight = function(ctx)
|
|
return require("colorful-menu").blink_components_highlight(ctx)
|
|
end,
|
|
},
|
|
},
|
|
},
|
|
},
|
|
},
|
|
cmdline = {
|
|
completion = { menu = { auto_show = true } },
|
|
keymap = { preset = "inherit" },
|
|
},
|
|
sources = {
|
|
default = { "lsp", "path", "snippets" },
|
|
per_filetype = {
|
|
lua = { inherit_defaults = true, "lazydev" },
|
|
sql = { inherit_defaults = true, "vim-dadbod-completion" },
|
|
mysql = { inherit_defaults = true, "vim-dadbod-completion" },
|
|
plsql = { inherit_defaults = true, "vim-dadbod-completion" },
|
|
},
|
|
providers = {
|
|
lazydev = {
|
|
module = "lazydev.integrations.blink",
|
|
score_offset = 100,
|
|
},
|
|
["vim-dadbod-completion"] = {
|
|
name = "vim-dadbod-completion",
|
|
module = "blink.compat.source",
|
|
},
|
|
},
|
|
},
|
|
signature = { enabled = true },
|
|
})
|
|
end,
|
|
},
|
|
})
|