From 32404821917d74f74b962a9d2e4f13c67e369ada Mon Sep 17 00:00:00 2001 From: jaydamani Date: Wed, 31 Mar 2021 17:43:17 +0530 Subject: [PATCH] forgot a fuction --- lua/nvim-compe/lua.lua | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/lua/nvim-compe/lua.lua b/lua/nvim-compe/lua.lua index 84b40d5..df6b263 100644 --- a/lua/nvim-compe/lua.lua +++ b/lua/nvim-compe/lua.lua @@ -34,6 +34,16 @@ local t = function(str) return vim.api.nvim_replace_termcodes(str, true, true, true) end +local check_back_space = function() + local col = vim.fn.col('.') - 1 + if col == 0 or vim.fn.getline('.'):sub(col, col):match('%s') then + return true + else + return false + end +end + + _G.tab_complete = function() if vim.fn.pumvisible() == 1 then return t ""