lazy loading 100%!!
This commit is contained in:
parent
9f1dc90269
commit
4ff7208c66
18
init.lua
18
init.lua
|
@ -1,27 +1,17 @@
|
||||||
-- load all options
|
|
||||||
require "options"
|
require "options"
|
||||||
|
|
||||||
-- load stuff only if theme is initialized
|
local async
|
||||||
if require "theme" then
|
async =
|
||||||
local async
|
|
||||||
async =
|
|
||||||
vim.loop.new_async(
|
vim.loop.new_async(
|
||||||
vim.schedule_wrap(
|
vim.schedule_wrap(
|
||||||
function()
|
function()
|
||||||
require "pluginList"
|
require "pluginList"
|
||||||
require "plugins.bufferline"
|
require "plugins.bufferline"
|
||||||
require "highlights"
|
|
||||||
require "mappings"
|
require "mappings"
|
||||||
require("utils").hideStuff()
|
require("utils").hideStuff()
|
||||||
|
|
||||||
async:close()
|
async:close()
|
||||||
end
|
end
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
async:send()
|
async:send()
|
||||||
else
|
|
||||||
-- otherwise run PackerSync
|
|
||||||
require "pluginList"
|
|
||||||
print("Now PackerSync will be executed, after completion, restart nvim.\n")
|
|
||||||
vim.cmd("PackerSync")
|
|
||||||
end
|
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
vim.cmd [[packadd packer.nvim]]
|
||||||
|
|
||||||
local present, _ = pcall(require, "packerInit")
|
local present, _ = pcall(require, "packerInit")
|
||||||
|
|
||||||
if present then
|
if present then
|
||||||
|
@ -10,20 +12,26 @@ local use = packer.use
|
||||||
|
|
||||||
return packer.startup(
|
return packer.startup(
|
||||||
function()
|
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 {
|
use {
|
||||||
"glepnir/galaxyline.nvim",
|
"glepnir/galaxyline.nvim",
|
||||||
event = "VimEnter",
|
after = "nvim-base16.lua",
|
||||||
config = function()
|
config = function()
|
||||||
require "plugins.statusline"
|
require "plugins.statusline"
|
||||||
end
|
end
|
||||||
}
|
}
|
||||||
|
|
||||||
-- color related stuff
|
-- color related stuff
|
||||||
use "siduck76/nvim-base16.lua"
|
use {
|
||||||
|
"siduck76/nvim-base16.lua",
|
||||||
|
after = "packer.nvim",
|
||||||
|
config = function()
|
||||||
|
require "theme"
|
||||||
|
end
|
||||||
|
}
|
||||||
|
|
||||||
use {
|
use {
|
||||||
"norcalli/nvim-colorizer.lua",
|
"norcalli/nvim-colorizer.lua",
|
||||||
|
@ -100,7 +108,7 @@ return packer.startup(
|
||||||
|
|
||||||
use {
|
use {
|
||||||
"kyazdani42/nvim-web-devicons",
|
"kyazdani42/nvim-web-devicons",
|
||||||
event = "VimEnter",
|
after = "nvim-base16.lua",
|
||||||
config = function()
|
config = function()
|
||||||
require "plugins.icons"
|
require "plugins.icons"
|
||||||
end
|
end
|
||||||
|
|
|
@ -4,6 +4,7 @@ local present, base16 = pcall(require, "base16")
|
||||||
|
|
||||||
if present then
|
if present then
|
||||||
base16(base16.themes["onedark"], true)
|
base16(base16.themes["onedark"], true)
|
||||||
|
pcall(require, "highlights")
|
||||||
return true
|
return true
|
||||||
else
|
else
|
||||||
return false
|
return false
|
||||||
|
|
|
@ -3,9 +3,9 @@ local colors = {
|
||||||
darker_black = "#2a303c",
|
darker_black = "#2a303c",
|
||||||
black = "#2E3440", -- nvim bg
|
black = "#2E3440", -- nvim bg
|
||||||
black2 = "#343a46",
|
black2 = "#343a46",
|
||||||
one_bg = "#353b47", -- real bg of onedark
|
one_bg = "#373d49",
|
||||||
one_bg2 = "#383e4a",
|
one_bg2 = "#3a404c",
|
||||||
one_bg3 = "#3b414d",
|
one_bg3 = "#3d434f",
|
||||||
grey = "#474d59",
|
grey = "#474d59",
|
||||||
grey_fg = "#565c68",
|
grey_fg = "#565c68",
|
||||||
grey_fg2 = "#606672",
|
grey_fg2 = "#606672",
|
||||||
|
|
Loading…
Reference in New Issue