Closed shubham-cpp closed 2 years ago
Fixed the issue. Must add
cmp.setup.cmdline(":", {
-- mapping = cmp.mapping.preset.cmdline(),
completion = { autocomplete = false },
sources = sources({
{ name = "path" },
}, {
{ name = "cmdline" },
}),
mapping = cmp.mapping.preset.cmdline({}), -- This line
})
Would it be worth adding this to the Readme? I couldn't work out why my normal bindings weren't working for the cmdline plugin and had to dig around through closed issues to see if it was a solved issue.
I've
Ctrl-n
andCtrl-p
mapping which works fine for search and cmd mode. But the Tab binding has stopped workingCmp setup.
```lua local has_words_before = function() local line, col = unpack(vim.api.nvim_win_get_cursor(0)) return col ~= 0 and vim.api.nvim_buf_get_lines(0, line - 1, line, true)[1]:sub(col, col):match("%s") == nil end local feedkey = function(key, mode) vim.api.nvim_feedkeys(vim.api.nvim_replace_termcodes(key, true, true, true), mode, true) end cmp.setup({ ...., mapping = cmp.mapping.preset.insert({ ... ["Note: I use vsnip