diff options
author | Adam <adam.moloney.stuck@gmail.com> | 2022-05-30 19:36:01 +0200 |
---|---|---|
committer | adamstuck <adam.moloney.stuck@gmail.com> | 2022-05-30 22:30:47 +0200 |
commit | bef40651a883318f28e8121239a3e096a7c3cc95 (patch) | |
tree | ed744e3bbb0e16c5c83cb68afbb5b4c049fee449 | |
parent | 18ad47f8319671a2686b68c4eb00a5cdab5279b7 (diff) |
nvim: fixed nvim-cmp tab error (unpack)
-rw-r--r-- | .config/nvim/lua/setup/nvim-cmp.lua | 4 |
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 |