初始化dotfiles

This commit is contained in:
2026-06-18 11:36:12 +08:00
commit f4305709a5
37 changed files with 1540 additions and 0 deletions

View File

@ -0,0 +1,56 @@
-- ============================================================================
-- 智能补全 (blink.cmp)
-- ============================================================================
return {
{
"saghen/blink.cmp",
version = "*",
event = { "InsertEnter", "CmdlineEnter" },
opts = {
keymap = {
preset = "super-tab",
["<C-j>"] = { "select_next" },
["<C-k>"] = { "select_prev" },
["<C-u>"] = { "scroll_documentation_up" },
["<C-n>"] = { "scroll_documentation_down" },
-- 命令行模式Enter 确认补全而非执行命令
["<CR>"] = { "accept", "fallback" },
},
appearance = {
use_nvim_cmp_as_default = true,
nerd_font_variant = "normal",
},
sources = {
default = { "lsp", "path", "buffer", "snippets" },
},
cmdline = {
enabled = true,
sources = function()
if vim.fn.getcmdline():find("/") then
return { "buffer" }
end
return { "cmdline" }
end,
completion = { menu = { auto_show = true } },
},
completion = {
menu = {
border = "rounded",
-- scrollbar = false,
draw = {
columns = {
{ "label", "label_description", gap = 1 },
{ "source_name" },
},
},
},
documentation = {
auto_show = true,
auto_show_delay_ms = 500,
window = { border = "rounded" },
},
},
},
},
}