Fix space completion

Sun, 19 Feb 2023 20:00:34 -0600

author
Meredith Howard <mhoward@roomag.org>
date
Sun, 19 Feb 2023 20:00:34 -0600
changeset 1035
e46ff6e45c96
parent 1034
d412eecafebf
child 1036
4da4e68e1796

Fix space completion

.config/nvim/lua/plugins/lsp.lua file | annotate | diff | comparison | revisions
--- a/.config/nvim/lua/plugins/lsp.lua
+++ b/.config/nvim/lua/plugins/lsp.lua
@@ -51,8 +51,9 @@ return {
           ["<Right>"] = cmp.mapping.confirm({select = true}),
           ["<Space>"] = function(fallback)
             if cmp.visible() then
-              cmp.confirm({select = false})
-              vim.api.nvim_feedkeys(" ", "n", false)
+              cmp.confirm({select = false}, function()
+                vim.api.nvim_feedkeys(" ", "n", false)
+              end)
             end
             fallback()
           end,

mercurial