From e01f1d6f5d42fac643facecd9ca2d240d53453bd Mon Sep 17 00:00:00 2001 From: sommerfeld Date: Fri, 17 Apr 2026 10:53:20 +0100 Subject: feat: migrate from lazy.nvim to vim.pack MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Replace lazy.nvim plugin manager with Neovim 0.12's native vim.pack API. All plugin config files rewritten from lazy.nvim spec tables to imperative require/setup format with explicit vim.keymap.set() calls. Key changes: - vim.pack.add() with ~53 plugins in init.lua - blink.cmp/pairs/download pinned to version tags (vim.version.range) - PackChanged autocmd for markdown-preview build hook - Ordered requires: colorscheme → ui → treesitter → completion → lsp → rest - Plugin setup guards (gitsigns, which-key, blink.cmp) handle deferred plugin/ file loading correctly Net reduction: ~438 lines across 13 files. --- home/.config/nvim/lua/plugins/completion.lua | 171 ++++++++++++--------------- 1 file changed, 74 insertions(+), 97 deletions(-) (limited to 'home/.config/nvim/lua/plugins/completion.lua') diff --git a/home/.config/nvim/lua/plugins/completion.lua b/home/.config/nvim/lua/plugins/completion.lua index 0310923..df24a5d 100644 --- a/home/.config/nvim/lua/plugins/completion.lua +++ b/home/.config/nvim/lua/plugins/completion.lua @@ -1,109 +1,86 @@ -return { - { - "saghen/blink.compat", - opts = {}, +require("blink.compat").setup({}) + +require("blink.cmp").setup({ + keymap = { + preset = "cmdline", + [""] = { "accept", "fallback" }, }, - { - "saghen/blink.cmp", - dependencies = { - "rafamadriz/friendly-snippets", - "fang2hou/blink-copilot", - "rcarriga/cmp-dap", - "xzbdmw/colorful-menu.nvim", - }, - opts = { - keymap = { - preset = "cmdline", - [""] = { "accept", "fallback" }, - }, - appearance = { - use_nvim_cmp_as_default = true, - }, - completion = { - menu = { - draw = { - -- treesitter = { "lsp" }, - -- We don't need label_description now because label and label_description are already - -- combined together in label by colorful-menu.nvim. - 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, - }, - }, - }, - }, - list = { - selection = { - preselect = function() - return not require("blink.cmp").snippet_active({ direction = 1 }) + appearance = { + use_nvim_cmp_as_default = true, + }, + completion = { + 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, }, }, - documentation = { auto_show = true }, - }, - signature = { - enabled = true, - trigger = { - enabled = true, - show_on_keyword = true, - show_on_insert = true, - }, }, - sources = { - default = { "lazydev", "lsp", "copilot", "snippets", "path", "buffer" }, - per_filetype = { - ["dap-repl"] = { "dap" }, - }, - providers = { - path = { - opts = { - get_cwd = vim.fn.getcwd, - }, - }, - copilot = { - name = "copilot", - module = "blink-copilot", - score_offset = 100, - async = true, - }, - lazydev = { - name = "LazyDev", - module = "lazydev.integrations.blink", - -- make lazydev completions top priority (see `:h blink.cmp`) - score_offset = 100, - }, - dap = { name = "dap", module = "blink.compat.source" }, - }, + }, + list = { + selection = { + preselect = function() + return not require("blink.cmp").snippet_active({ direction = 1 }) + end, }, }, + documentation = { auto_show = true }, }, - { - "saghen/blink.pairs", - version = "*", - dependencies = "saghen/blink.download", - opts = { - mappings = { - disabled_filetypes = {}, - }, - highlights = { - groups = { - "BlinkIndentOrange", - "BlinkIndentViolet", - "BlinkIndentBlue", - "BlinkIndentRed", - "BlinkIndentCyan", - "BlinkIndentYellow", - "BlinkIndentGreen", + signature = { + enabled = true, + trigger = { + enabled = true, + show_on_keyword = true, + show_on_insert = true, + }, + }, + sources = { + default = { "lazydev", "lsp", "copilot", "snippets", "path", "buffer" }, + per_filetype = { + ["dap-repl"] = { "dap" }, + }, + providers = { + path = { + opts = { + get_cwd = vim.fn.getcwd, }, }, + copilot = { + name = "copilot", + module = "blink-copilot", + score_offset = 100, + async = true, + }, + lazydev = { + name = "LazyDev", + module = "lazydev.integrations.blink", + score_offset = 100, + }, + dap = { name = "dap", module = "blink.compat.source" }, + }, + }, +}) + +require("blink.pairs").setup({ + mappings = { + disabled_filetypes = {}, + }, + highlights = { + groups = { + "BlinkIndentOrange", + "BlinkIndentViolet", + "BlinkIndentBlue", + "BlinkIndentRed", + "BlinkIndentCyan", + "BlinkIndentYellow", + "BlinkIndentGreen", }, }, -} +}) -- cgit v1.2.3-70-g09d2