Ported config from nixvim.

Made some changes to taste along the way,
though there are some still to come.
This commit is contained in:
Gabe Venberg 2025-07-03 02:18:39 +02:00
parent 9a78fd2d53
commit 3bd72ab98f
13 changed files with 601 additions and 740 deletions

View file

@ -6,20 +6,21 @@ end
return {
{
"cmp-cmdline",
for_cat = "general.blink",
for_cat = "completion",
on_plugin = { "blink.cmp" },
load = load_w_after,
},
{
"blink.compat",
for_cat = "general.blink",
for_cat = "completion",
dep_of = { "cmp-cmdline" },
},
{
"luasnip",
for_cat = "general.blink",
for_cat = "completion",
dep_of = { "blink.cmp" },
after = function (_)
after = function(_)
vim.cmd.packadd("friendly-snippets")
local luasnip = require 'luasnip'
require('luasnip.loaders.from_vscode').lazy_load()
luasnip.config.setup {}
@ -27,31 +28,39 @@ return {
local ls = require('luasnip')
vim.keymap.set({ "i", "s" }, "<M-n>", function()
if ls.choice_active() then
ls.change_choice(1)
end
if ls.choice_active() then
ls.change_choice(1)
end
end)
end,
},
{
"colorful-menu.nvim",
for_cat = "general.blink",
for_cat = "completion",
on_plugin = { "blink.cmp" },
},
{
"blink.cmp",
for_cat = "general.blink",
for_cat = "completion",
event = "DeferredUIEnter",
after = function (_)
after = function(_)
require("blink.cmp").setup({
-- 'default' (recommended) for mappings similar to built-in completions (C-y to accept)
-- See :h blink-cmp-config-keymap for configuring keymaps
keymap = {
preset = 'default',
keymap = {
preset = "enter",
["<Tab>"] = { "select_next", "fallback" },
["<S-Tab>"] = { "select_prev", "fallback" },
},
cmdline = {
enabled = true,
completion = {
list = {
selection = {
preselect = false,
-- auto_insert = false,
},
},
menu = {
auto_show = true,
},