nvim/init.lua

44 lines
772 B
Lua
Raw Normal View History

2023-10-02 22:05:38 +08:00
G = require('G')
2023-10-01 00:45:00 +08:00
2023-11-16 12:46:18 +08:00
local lazypath = G.fn.stdpath("data") .. "/lazy/lazy.nvim"
if not G.loop.fs_stat(lazypath) then
G.fn.system({
"git",
"clone",
"--filter=blob:none",
2024-08-21 15:44:28 +08:00
"https://github.com/folke/lazy.nvim.git",
2023-11-16 12:46:18 +08:00
"--branch=stable",
lazypath,
})
2024-01-03 14:53:07 +08:00
2023-11-16 12:46:18 +08:00
G.fn.system({
"git",
"config",
"--global",
"credential.helper",
"store",
})
end
G.opt.rtp:prepend(lazypath)
2023-10-07 10:49:13 +08:00
2023-11-19 00:37:52 +08:00
require("keymap")
2023-11-18 23:58:25 +08:00
2024-02-01 14:22:05 +08:00
2023-10-02 22:05:38 +08:00
if G.g.vscode then
2023-11-15 23:40:02 +08:00
require('vscode')
2023-10-08 22:40:40 +08:00
else
2023-11-16 12:46:18 +08:00
require("options")
2024-02-01 11:57:48 +08:00
local clone_prefix = G.use_ssh and "git@github.com:%s.git" or "https://github.com/%s.git"
2024-01-06 11:19:15 +08:00
require("lazy").setup(
2024-02-01 11:57:48 +08:00
require('plugs'), {
lockfile = G.fn.stdpath("data") .. "/lazy/lazy-lock.json",
git = {
url_format = clone_prefix,
}
}
2024-01-06 11:19:15 +08:00
)
2023-10-01 00:45:00 +08:00
end