nvim-minimal/lua/plugins/blink.lua
mk 97a90cc1e5 Initial commit: nvim-minimal
A small, fast, portable Neovim config built on bare lazy.nvim (no LazyVim,
no LSPs, no Mason). Vendored `based` colorscheme (GPLv3, self-authored,
derived from vim-vividchalk) so the config loads on any machine with just
nvim + git — the listed treesitter parsers ship prebuilt, so no compiler
is needed for the configured languages.

Plugins: snacks.nvim (picker/explorer/buffers), nvim-treesitter (pinned to
master for the declarative ensure_installed/highlight/indent API), blink.cmp
(buffer+path completion, prebuilt binary), lualine, gitsigns, mini.align/
comment/surround.

Personal keymaps ported: jj/jk/kj/чя escape, ж -> :, Russian langmap, arrow
disables, bracket-return expansions, gc/sa-sd-sr/gz-gZ.
2026-07-28 03:23:41 +03:00

47 lines
2.0 KiB
Lua

-- saghen/blink.cmp: fast completion (Rust-backed, prebuilt binary).
-- Sources are buffer words + file paths only (no LSP). Filename completion
-- comes from the `path` source, triggered by typing `/` or `./`.
-- `version = "*"` pulls a release tag, which ships a prebuilt `libblink`
-- binary (x86_64/arm64, linux/mac) — no Rust toolchain needed on those arches.
return {
{
"saghen/blink.cmp",
event = "InsertEnter",
version = "*",
opts = {
sources = {
default = { "buffer", "path" },
},
completion = {
ghost_text = { enabled = false },
list = { selection = { preselect = false, auto_insert = false } },
},
keymap = {
preset = "super-tab",
["<C-space>"] = { "show", "show_documentation", "hide_documentation" },
["<C-e>"] = { "hide", "fallback" },
["<Tab>"] = {
"select_next",
function(cmp)
if cmp.snippet_active() then
return cmp.accept()
else
return cmp.select_and_accept()
end
end,
"snippet_forward",
"fallback",
},
["<S-Tab>"] = { "select_prev", "snippet_backward", "fallback" },
["<cr>"] = { "select_and_accept", "fallback_to_mappings" },
["<Up>"] = { "select_prev", "fallback" },
["<Down>"] = { "select_next", "fallback" },
["<C-p>"] = { "select_prev", "fallback_to_mappings" },
["<C-n>"] = { "select_next", "fallback_to_mappings" },
["<C-b>"] = { "scroll_documentation_up", "fallback" },
["<C-f>"] = { "scroll_documentation_down", "fallback" },
["<C-k>"] = { "show_signature", "hide_signature", "fallback" },
},
},
},
}