aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/home/.config/nvim/lua/plugins/completion.lua
diff options
context:
space:
mode:
authorLibravatar sommerfeld <[email protected]>2026-04-17 10:53:20 +0100
committerLibravatar sommerfeld <[email protected]>2026-04-17 10:53:20 +0100
commite01f1d6f5d42fac643facecd9ca2d240d53453bd (patch)
tree6684173cbd992e4c0b5fa2002b9a6082f866ca51 /home/.config/nvim/lua/plugins/completion.lua
parentdd2bc0a81d7ca6de60a509d8ff1a669e13785f01 (diff)
downloaddotfiles-e01f1d6f5d42fac643facecd9ca2d240d53453bd.tar.gz
dotfiles-e01f1d6f5d42fac643facecd9ca2d240d53453bd.tar.bz2
dotfiles-e01f1d6f5d42fac643facecd9ca2d240d53453bd.zip
feat: migrate from lazy.nvim to vim.pack
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.
Diffstat (limited to 'home/.config/nvim/lua/plugins/completion.lua')
-rw-r--r--home/.config/nvim/lua/plugins/completion.lua171
1 files changed, 74 insertions, 97 deletions
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",
+ ["<CR>"] = { "accept", "fallback" },
},
- {
- "saghen/blink.cmp",
- dependencies = {
- "rafamadriz/friendly-snippets",
- "fang2hou/blink-copilot",
- "rcarriga/cmp-dap",
- "xzbdmw/colorful-menu.nvim",
- },
- opts = {
- keymap = {
- preset = "cmdline",
- ["<CR>"] = { "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",
},
},
-}
+})