From bb41b0ee835cc6466a81cb8afa9e7b834eda10af Mon Sep 17 00:00:00 2001 From: Adam <56338480+adastx@users.noreply.github.com> Date: Mon, 30 May 2022 19:36:01 +0200 Subject: nvim: fixed nvim-cmp tab error (unpack) --- .config/nvim/lua/setup/nvim-cmp.lua | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.config/nvim/lua/setup/nvim-cmp.lua b/.config/nvim/lua/setup/nvim-cmp.lua index 5b62d61..d3277d1 100644 --- a/.config/nvim/lua/setup/nvim-cmp.lua +++ b/.config/nvim/lua/setup/nvim-cmp.lua @@ -1,3 +1,7 @@ +if not table.unpack then + table.unpack = unpack +end + local has_words_before = function() local line, col = table.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 -- cgit v1.2.3-70-g09d2