-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinit.lua
More file actions
38 lines (33 loc) · 1.03 KB
/
Copy pathinit.lua
File metadata and controls
38 lines (33 loc) · 1.03 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
local impatient_ok, impatient = pcall(require, "impatient")
if impatient_ok then
impatient.enable_profile()
end
for _, source in ipairs({
"core.options",
"core.mappings",
"core.plugins",
"core.autocmds",
"configs.lazygit",
"configs.whichkey-register",
}) do
local status_ok, fault = pcall(require, source)
if not status_ok then
vim.api.nvim_err_writeln("Failed to load " .. source .. "\n\n" .. fault)
end
end
-- setup packer + plugins
local fn = vim.fn
local install_path = fn.stdpath("data") .. "/site/pack/packer/start/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("core.plugins")
vim.cmd("PackerSync")
end
vim.api.nvim_create_user_command("SourceConfigs", function()
local path = "~/.config/nvim/**/*.lua"
vim.cmd("source! ", path)
end, {})