lazy loading 100%!!

This commit is contained in:
siduck76 2021-07-18 22:11:52 +05:30
parent 9f1dc90269
commit 4ff7208c66
4 changed files with 30 additions and 31 deletions

View File

@ -1,8 +1,5 @@
-- load all options
require "options"
-- load stuff only if theme is initialized
if require "theme" then
local async
async =
vim.loop.new_async(
@ -10,7 +7,6 @@ if require "theme" then
function()
require "pluginList"
require "plugins.bufferline"
require "highlights"
require "mappings"
require("utils").hideStuff()
@ -19,9 +15,3 @@ if require "theme" then
)
)
async:send()
else
-- otherwise run PackerSync
require "pluginList"
print("Now PackerSync will be executed, after completion, restart nvim.\n")
vim.cmd("PackerSync")
end

View File

@ -1,3 +1,5 @@
vim.cmd [[packadd packer.nvim]]
local present, _ = pcall(require, "packerInit")
if present then
@ -10,20 +12,26 @@ local use = packer.use
return packer.startup(
function()
use "wbthomason/packer.nvim"
use {"wbthomason/packer.nvim", event = "VimEnter"}
use {"akinsho/nvim-bufferline.lua", event = "VimEnter"}
use {"akinsho/nvim-bufferline.lua", after = "nvim-base16.lua"}
use {
"glepnir/galaxyline.nvim",
event = "VimEnter",
after = "nvim-base16.lua",
config = function()
require "plugins.statusline"
end
}
-- color related stuff
use "siduck76/nvim-base16.lua"
use {
"siduck76/nvim-base16.lua",
after = "packer.nvim",
config = function()
require "theme"
end
}
use {
"norcalli/nvim-colorizer.lua",
@ -100,7 +108,7 @@ return packer.startup(
use {
"kyazdani42/nvim-web-devicons",
event = "VimEnter",
after = "nvim-base16.lua",
config = function()
require "plugins.icons"
end

View File

@ -4,6 +4,7 @@ local present, base16 = pcall(require, "base16")
if present then
base16(base16.themes["onedark"], true)
pcall(require, "highlights")
return true
else
return false

View File

@ -3,9 +3,9 @@ local colors = {
darker_black = "#2a303c",
black = "#2E3440", -- nvim bg
black2 = "#343a46",
one_bg = "#353b47", -- real bg of onedark
one_bg2 = "#383e4a",
one_bg3 = "#3b414d",
one_bg = "#373d49",
one_bg2 = "#3a404c",
one_bg3 = "#3d434f",
grey = "#474d59",
grey_fg = "#565c68",
grey_fg2 = "#606672",