summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam <56338480+adastx@users.noreply.github.com>2022-05-30 19:36:01 +0200
committerAdam <56338480+adastx@users.noreply.github.com>2022-05-30 19:36:01 +0200
commitbb41b0ee835cc6466a81cb8afa9e7b834eda10af (patch)
tree17a2dc4285122ec3cd4311cfc68f81d2e537ecf1
parent4ceaf9daed68345cdae0a74d4dfa982ca590aaa7 (diff)
nvim: fixed nvim-cmp tab error (unpack)
-rw-r--r--.config/nvim/lua/setup/nvim-cmp.lua4
1 files changed, 4 insertions, 0 deletions
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