A new top-level ide/: install.sh places a hash-checked Neovim release, five third-party plugins each at one pinned commit, the LLeMbas plugin from nvim/, a generated colourscheme and a launcher, for one user and under its own NVIM_APPNAME. Built in a staging directory, started there once, then swapped in. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
44 lines
2.0 KiB
Lua
44 lines
2.0 KiB
Lua
-- The completion menu: language server, paths and words of the open buffers.
|
|
--
|
|
-- It shares insert mode with LLeMbas's suggestions (the grey text ahead of the cursor), and the
|
|
-- two never want the same key:
|
|
-- <Tab> accepts LLeMbas's suggestion (<M-Right> one word of it). Never the menu.
|
|
-- <C-n> <C-p> or <Down> <Up> move in the menu; nothing in it is chosen until you do.
|
|
-- <CR> takes the menu entry you moved to; with none chosen it is a plain Enter.
|
|
-- <C-y> takes the first entry without moving.
|
|
-- <C-e> closes the menu. <C-Space> opens it, or shows the entry's documentation.
|
|
local M = {}
|
|
|
|
function M.setup()
|
|
require("blink.cmp").setup({
|
|
keymap = {
|
|
preset = "none",
|
|
["<C-Space>"] = { "show", "show_documentation", "hide_documentation" },
|
|
["<C-e>"] = { "hide", "fallback" },
|
|
["<C-y>"] = { "select_and_accept", "fallback" },
|
|
["<CR>"] = { "accept", "fallback" },
|
|
["<C-n>"] = { "select_next", "fallback_to_mappings" },
|
|
["<C-p>"] = { "select_prev", "fallback_to_mappings" },
|
|
["<Down>"] = { "select_next", "fallback" },
|
|
["<Up>"] = { "select_prev", "fallback" },
|
|
["<C-f>"] = { "scroll_documentation_down", "fallback" },
|
|
["<C-b>"] = { "scroll_documentation_up", "fallback" },
|
|
},
|
|
completion = {
|
|
list = { selection = { preselect = false, auto_insert = false } },
|
|
ghost_text = { enabled = false }, -- the grey text is LLeMbas's
|
|
documentation = { auto_show = true, auto_show_delay_ms = 400, window = { border = "rounded" } },
|
|
menu = {
|
|
border = "rounded",
|
|
draw = { columns = { { "label", "label_description", gap = 1 }, { "kind" } } }, -- kinds in words: no icon font needed
|
|
},
|
|
},
|
|
sources = { default = { "lsp", "path", "buffer" } },
|
|
cmdline = { enabled = false }, -- the command line keeps Neovim's own completion
|
|
-- The matcher written in Lua: the compiled one would be a binary downloaded at run time.
|
|
fuzzy = { implementation = "lua", prebuilt_binaries = { download = false } },
|
|
})
|
|
end
|
|
|
|
return M
|