-
Notifications
You must be signed in to change notification settings - Fork 0
/
bundle.lua
31 lines (24 loc) · 978 Bytes
/
bundle.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
local config = vim.fn.stdpath("config") -- ~/.config/nvim
local data = vim.fn.stdpath("data") -- ~/.local/share/nvim
vim.opt.runtimepath:remove(config)
vim.opt.runtimepath:remove(vim.fs.joinpath(config, "after"))
vim.opt.runtimepath:remove(vim.fs.joinpath(data, "site"))
vim.opt.runtimepath:remove(vim.fs.joinpath(data, "site", "after"))
vim.opt.packpath:remove(config)
vim.opt.packpath:remove(vim.fs.joinpath(config, "after"))
vim.opt.packpath:remove(vim.fs.joinpath(data, "site"))
vim.opt.packpath:remove(vim.fs.joinpath(data, "site", "after"))
local vim_dir = vim.fn.expand("<sfile>:p:h")
vim.opt.runtimepath:append(vim_dir)
vim.opt.runtimepath:append(vim.fs.joinpath(vim_dir, "after"))
vim.opt.packpath:append(vim_dir)
vim.opt.packpath:append(vim.fs.joinpath(vim_dir, "after"))
-- Sourcing init files
local files = {
vim.fs.joinpath(vim_dir, "init.lua"),
}
for _, init in ipairs(files) do
if vim.fn.filereadable(init) == 1 then
vim.cmd.source(init)
end
end