Simplify plugin configurations and improve keybinding consistency. New Features - Use plain plugin names instead of version‑locked specifications. Enhancements - Change colorcolumn setting from number to string. - Replace multiple update mappings with a single vim.pack.update() call. Bug Fixes - Remove outdated plugin manager mappings that caused duplicate actions.
76 lines
1.8 KiB
Lua
76 lines
1.8 KiB
Lua
add({
|
|
"saghen/blink.lib",
|
|
"saghen/blink.cmp",
|
|
"L3MON4D3/LuaSnip",
|
|
"rafamadriz/friendly-snippets",
|
|
})
|
|
|
|
require("blink.cmp").setup({
|
|
fuzzy = { implementation = "prefer_rust" },
|
|
snippets = { preset = "luasnip" },
|
|
sources = {
|
|
default = { "lsp", "path", "snippets", "buffer" },
|
|
providers = {},
|
|
},
|
|
|
|
completion = {
|
|
ghost_text = { enabled = true },
|
|
|
|
list = {
|
|
selection = {
|
|
preselect = false,
|
|
auto_insert = true,
|
|
},
|
|
},
|
|
documentation = {
|
|
window = { border = "rounded" },
|
|
auto_show = true,
|
|
auto_show_delay_ms = 50,
|
|
},
|
|
menu = {
|
|
border = "rounded",
|
|
draw = {
|
|
components = {
|
|
kind_icon = {
|
|
text = function(ctx)
|
|
local kind_icon, _, _ = require("mini.icons").get("lsp", ctx.kind)
|
|
return kind_icon
|
|
end,
|
|
highlight = function(ctx)
|
|
local _, hl, _ = require("mini.icons").get("lsp", ctx.kind)
|
|
return hl
|
|
end,
|
|
},
|
|
kind = {
|
|
highlight = function(ctx)
|
|
local _, hl, _ = require("mini.icons").get("lsp", ctx.kind)
|
|
return hl
|
|
end,
|
|
},
|
|
},
|
|
},
|
|
},
|
|
},
|
|
signature = {
|
|
window = { border = "rounded" },
|
|
},
|
|
keymap = {
|
|
preset = "none",
|
|
["<S-Tab>"] = { "select_prev", "snippet_backward", "fallback" },
|
|
["<Tab>"] = { "select_next", "snippet_forward", "fallback" },
|
|
["<CR>"] = { "accept", "fallback" },
|
|
["<C-space>"] = { "hide", "show" },
|
|
["<C-y>"] = { "show", "show_documentation", "hide_documentation" },
|
|
["<C-u>"] = { "scroll_documentation_up", "fallback" },
|
|
["<C-d>"] = { "scroll_documentation_down", "fallback" },
|
|
},
|
|
})
|
|
|
|
local luasnip = require("luasnip")
|
|
require("luasnip.loaders.from_vscode").lazy_load()
|
|
require("luasnip.loaders.from_vscode").lazy_load({
|
|
paths = { vim.fn.stdpath("config") .. "/snippets" },
|
|
})
|
|
|
|
luasnip.filetype_extend("mdx", { "markdown" })
|