34 lines
857 B
Lua
34 lines
857 B
Lua
-- Leader keys MUST be set before lazy.setup() so lazy-loaded `keys = {...}`
|
|
-- specs resolve <leader> correctly when they register their keymaps.
|
|
vim.g.mapleader = ","
|
|
vim.g.maplocalleader = "\\"
|
|
|
|
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
|
|
if not vim.uv.fs_stat(lazypath) then
|
|
local out = vim.fn.system({
|
|
"git",
|
|
"clone",
|
|
"--filter=blob:none",
|
|
"https://github.com/folke/lazy.nvim.git",
|
|
"--branch=stable",
|
|
lazypath,
|
|
})
|
|
if vim.v.shell_error ~= 0 then
|
|
vim.api.nvim_echo({
|
|
{ "Failed to clone lazy.nvim:\n", "ErrorMsg" },
|
|
{ out, "WarningMsg" },
|
|
}, true, {})
|
|
vim.fn.getchar()
|
|
os.exit(1)
|
|
end
|
|
end
|
|
vim.opt.rtp:prepend(lazypath)
|
|
|
|
require("config.options")
|
|
require("config.keymaps")
|
|
require("config.autocmds")
|
|
|
|
require("lazy").setup("plugins", {
|
|
change_detection = { notify = false },
|
|
})
|