summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam <56338480+adastx@users.noreply.github.com>2022-05-31 11:40:54 +0200
committerAdam <56338480+adastx@users.noreply.github.com>2022-05-31 11:40:54 +0200
commit1ca5c2bbc263c17efd28945eabbaf19d0daa6e5b (patch)
tree804e4e5db805e4bbb5a23c774d96eb3ce22507eb
parent05ab8528c00029ae5802ba608f09db03b660f24e (diff)
nvim: cleaner cmp lua 5.1 workaround
-rw-r--r--.config/nvim/lua/setup/nvim-cmp.lua4
1 files changed, 1 insertions, 3 deletions
diff --git a/.config/nvim/lua/setup/nvim-cmp.lua b/.config/nvim/lua/setup/nvim-cmp.lua
index d3277d1..9e6ae05 100644
--- a/.config/nvim/lua/setup/nvim-cmp.lua
+++ b/.config/nvim/lua/setup/nvim-cmp.lua
@@ -1,6 +1,4 @@
-if not table.unpack then
- table.unpack = unpack
-end
+table.unpack = table.unpack or unpack -- 5.1 compatibility
local has_words_before = function()
local line, col = table.unpack(vim.api.nvim_win_get_cursor(0))