From ebefdb64ff01438f3a1664d91c8a24b6cca9083d Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Sun, 19 Mar 2023 22:51:35 +0100 Subject: [PATCH] trigger cmdline history with c-x --- lua/plugins/cmp.lua | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/lua/plugins/cmp.lua b/lua/plugins/cmp.lua index c606138..84c8347 100644 --- a/lua/plugins/cmp.lua +++ b/lua/plugins/cmp.lua @@ -77,10 +77,18 @@ return { else fallback() end - end, { - 'i', - 's', - }), + end, { 'i', 's', }), + [''] = cmp.mapping(cmp.mapping.complete( + { + config = { + sources = { + { + name = 'cmdline_history' + } + } + } + } + ), { 'c' }), }, snippet = { expand = function(args) @@ -150,7 +158,7 @@ return { cmp.setup.cmdline(':', { sources = { { name = 'cmdline' }, - { name = 'cmdline_history' }, + -- { name = 'cmdline_history' }, { name = 'path' }, { name = 'buffer' }, },