From 1ca5c2bbc263c17efd28945eabbaf19d0daa6e5b Mon Sep 17 00:00:00 2001 From: Adam <56338480+adastx@users.noreply.github.com> Date: Tue, 31 May 2022 11:40:54 +0200 Subject: nvim: cleaner cmp lua 5.1 workaround --- .config/nvim/lua/setup/nvim-cmp.lua | 4 +--- 1 file changed, 1 insertion(+), 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)) -- cgit v1.2.3-70-g09d2