[3/4] Refactor: init: Use async | Move theme stuff to theme.lua

third commit of refactor

perf improvements due to async

run packer sync if base16 not found

this is not perfect error handling for initial run, but something

handle require errors
This commit is contained in:
Akianonymus
2021-07-15 21:17:47 +05:30
parent 3e83ec5314
commit 643d1bd7d8
4 changed files with 57 additions and 24 deletions

View File

@@ -76,7 +76,17 @@ _G.s_tab_complete = function()
end
function _G.completions()
local npairs = require("nvim-autopairs")
local npairs
if
not pcall(
function()
npairs = require "nvim-autopairs"
end
)
then
return
end
if vim.fn.pumvisible() == 1 then
if vim.fn.complete_info()["selected"] ~= -1 then
return vim.fn["compe#confirm"]("<CR>")