diff options
Diffstat (limited to '.config/nvim/plugin/50-autocompletion.lua')
| -rw-r--r-- | .config/nvim/plugin/50-autocompletion.lua | 13 |
1 files changed, 4 insertions, 9 deletions
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 (`<Tab>`) assigned to command line wildcard expansion +vim.opt.wildchar = 9 -- Char code (`<Tab>`) 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-y>", c_accept_selection_or_dismiss, { expr = true }) |
