fix compatibility with nvim < 0.8 (#1227)

This commit is contained in:
figsoda
2022-10-11 11:35:19 -04:00
committed by GitHub
parent 53bd574901
commit 714ccb7483

View File

@@ -241,6 +241,10 @@ keymap.set_map = function(bufnr, mode, lhs, rhs, opts)
end
opts.desc = 'cmp.utils.keymap.set_map'
if vim.fn.has('nvim-0.8') == 0 then
opts.replace_keycodes = nil
end
if bufnr == -1 then
vim.api.nvim_set_keymap(mode, lhs, rhs, opts)
else