From 48b8993dacd948ce3f1426c35039c3ec38ae21e3 Mon Sep 17 00:00:00 2001 From: Thomas Vanbesien Date: Sat, 13 Jun 2026 11:17:32 +0200 Subject: refactor(nvim): rename functions and edit comments --- .config/nvim/plugin/50-autocompletion.lua | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) (limited to '.config/nvim/plugin/50-autocompletion.lua') diff --git a/.config/nvim/plugin/50-autocompletion.lua b/.config/nvim/plugin/50-autocompletion.lua index dbc5dee..853a528 100644 --- a/.config/nvim/plugin/50-autocompletion.lua +++ b/.config/nvim/plugin/50-autocompletion.lua @@ -1,7 +1,7 @@ -- -- 50-autocompletion.lua -- --- * Configures insert-mode/command-mode autocompletion. +-- * Configures autocompletion for insert mode and command-line mode. -- In both modes: -- * The list of completions shows up automatically -- * Tab/Shift+Tab selects (and inserts) the next/previous item @@ -79,7 +79,7 @@ vim.api.nvim_create_autocmd({ "CmdLineChanged", "CmdlineEnter" }, { }) vim.opt.wildmenu = true -- Show completions in a menu -vim.opt.wildchar = 9 -- Char code (``) assigned to command line wildcard expansion +vim.opt.wildchar = 9 -- Char code (``) assigned to command-line wildcard expansion vim.opt.wildoptions = { "exacttext", -- Discard regex artifacts when performing search pattern completion "pum", -- Show completions in a popup menu @@ -89,15 +89,10 @@ vim.opt.wildoptions = { -- Completion modes triggered in order by `wildtrigger()` or 'wildchar' vim.opt.wildmode = { "noselect", -- List matches without inserting - "full", -- List matches and inserts first full match + "full", -- List matches and insert first full match } -- Converts `vim.opt.wildchar` char code into a key string that can be used by `vim.keymap.set()`. local wildchar_key = string.format("%c", vim.o.wildchar) -vim.keymap.set( - "c", - wildchar_key, - c_insert_unique_or_wildtrigger, - { expr = true, desc = "Command line wildcard expansion" } -) +vim.keymap.set("c", wildchar_key, c_insert_unique_or_wildtrigger, { expr = true }) vim.keymap.set("c", "", c_accept_selection_or_dismiss, { expr = true }) -- cgit v1.3.1