-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathinit.lua
70 lines (66 loc) · 1.4 KB
/
init.lua
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
local lazypath = vim.fn.stdpath("cache") .. "/lazy/lazy.nvim"
if not vim.loop.fs_stat(lazypath) then
vim.fn.system({
"git",
"clone",
"--filter=blob:none",
"--single-branch",
"[email protected]:folke/lazy.nvim.git",
lazypath,
})
end
if not vim.loop.fs_stat(lazypath) then
-- The system has no setup for git protocol.
vim.fn.system({
"git",
"clone",
"--filter=blob:none",
"--single-branch",
"https://github.com/folke/lazy.nvim.git",
lazypath,
})
end
vim.opt.runtimepath:prepend(lazypath)
require("config.options")
require("lazy").setup("plugins", {
root = vim.fn.stdpath("cache") .. "/lazy",
defaults = {
cond = require("config.util").should_start(),
},
dev = {
path = "~/Projects/arsham",
},
performance = {
rtp = {
disabled_plugins = {
"tohtml",
"tutor",
},
},
cache = {
ttl = 3600 * 24,
},
},
install = {
colorscheme = { "arshamiser_dark" },
},
debug = false,
readme = {
enabled = false,
root = vim.fn.stdpath("state") .. "/lazy/readme",
skip_if_doc_exists = true,
},
})
require("config.commands")
require("config.autocmd")
require("config.keymaps")
require("config.abbreviations")
vim.schedule(function()
vim.cmd.packadd("cfilter")
end)
vim.api.nvim_create_autocmd({ "VimLeave" }, {
callback = function()
-- fix for libuv exit error
vim.cmd("sleep 10m")
end,
})