From bef40651a883318f28e8121239a3e096a7c3cc95 Mon Sep 17 00:00:00 2001 From: Adam 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