From 534be8b06750471fd11309ba52e7d2e8824c1197 Mon Sep 17 00:00:00 2001 From: "Gustavo \"Guz\" L de Mello" Date: Wed, 10 Dec 2025 17:46:56 -0300 Subject: [PATCH] feat(plugins): auto completion with blink.cmp --- lua/dot/plugins.lua | 50 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) diff --git a/lua/dot/plugins.lua b/lua/dot/plugins.lua index 609c27d..6644cd3 100644 --- a/lua/dot/plugins.lua +++ b/lua/dot/plugins.lua @@ -133,6 +133,56 @@ lze.load({ on_require = "conform", }, + -- Autocomplete + { + "blink-cmp", + after = function() + require("blink.cmp").setup({ + completion = { + list = { selection = { preselect = true, auto_insert = true } }, + menu = { + draw = { + padding = { 1, 0 }, + columns = { { "label", "label_description", gap = 1 }, { "kind_icon", "kind" } }, + components = { + kind_icon = { width = { fill = true } }, + }, + }, + }, + documentation = { auto_show = true }, + }, + fuzzy = { implementation = "prefer_rust" }, + keymap = { + [""] = { "show", "show_documentation", "hide_documentation" }, + + [""] = { "hide", "fallback" }, + [""] = { "accept", "fallback" }, + [""] = { "accept", "fallback" }, + + [""] = { "select_prev", "snippet_backward", "fallback" }, + [""] = { "select_next", "snippet_forward", "fallback" }, + + [""] = { "scroll_documentation_up", "fallback" }, + [""] = { "scroll_documentation_down", "fallback" }, + }, + sources = { + default = { "snippets", "lazydev", "lsp", "path", "buffer" }, + providers = { + lazydev = { + name = "LazyDev", + module = "lazydev.integrations.blink", + score_offset = 100, + }, + }, + }, + }) + end, + cmd = "ConformInfo", + event = "InsertEnter", + on_require = "blink", + }, + { "friendly-snippets", dep_of = "blink-cmp" }, + -- Fuzzy Finding { "telescope.nvim",