61 lines
1.6 KiB
Lua
61 lines
1.6 KiB
Lua
vim.defer_fn(function()
|
|
pcall(require, "impatient")
|
|
end, 0)
|
|
|
|
-- setup packer + plugins
|
|
local fn = vim.fn
|
|
local install_path = fn.stdpath "data" .. "/site/pack/packer/opt/packer.nvim"
|
|
|
|
if fn.empty(fn.glob(install_path)) > 0 then
|
|
vim.api.nvim_set_hl(0, "NormalFloat", { bg = "#1e222a" })
|
|
print "Cloning packer .."
|
|
fn.system { "git", "clone", "--depth", "1", "https://github.com/wbthomason/packer.nvim", install_path }
|
|
|
|
-- install plugins + compile their configs
|
|
vim.cmd "packadd packer.nvim"
|
|
require "plugins"
|
|
vim.cmd "PackerSync"
|
|
|
|
-- install binaries from mason.nvim & tsparsers
|
|
vim.api.nvim_create_autocmd("User", {
|
|
pattern = "PackerComplete",
|
|
callback = function()
|
|
vim.cmd "bw | silent! MasonInstallAll" -- close packer window
|
|
require("packer").loader "nvim-treesitter"
|
|
end,
|
|
})
|
|
end
|
|
|
|
local modules = {
|
|
"core.options",
|
|
"core.packer",
|
|
}
|
|
|
|
-- add binaries installed by mason.nvim to path
|
|
vim.env.PATH = vim.env.PATH .. ":" .. vim.fn.stdpath "data" .. "/mason/bin"
|
|
|
|
for _, module in ipairs(modules) do
|
|
local ok, err = pcall(require, module)
|
|
if not ok then
|
|
error("Error loading " .. module .. "\n\n" .. err)
|
|
end
|
|
end
|
|
|
|
require("core.utils").load_mappings()
|
|
-- require("colors").core_setup()
|
|
|
|
require('rose-pine').setup({
|
|
disable_background = true
|
|
})
|
|
|
|
function ColorMyPencils(color)
|
|
color = color or "rose-pine"
|
|
vim.cmd.colorscheme(color)
|
|
|
|
vim.api.nvim_set_hl(0, "Normal", { bg = "none" })
|
|
vim.api.nvim_set_hl(0, "NormalFloat", { bg = "none" })
|
|
|
|
end
|
|
|
|
ColorMyPencils()
|