mirror of
https://github.com/Ascyii/nvim.git
synced 2026-01-01 12:14:24 -05:00
39 lines
984 B
Lua
39 lines
984 B
Lua
-- Bootstrap lazy manager first thing
|
|
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
|
|
if not (vim.uv or vim.loop).fs_stat(lazypath) then
|
|
local lazyrepo = "https://github.com/folke/lazy.nvim.git"
|
|
local out = vim.fn.system({ "git", "clone", "--filter=blob:none", "--branch=stable", lazyrepo, lazypath })
|
|
if vim.v.shell_error ~= 0 then
|
|
vim.api.nvim_echo({
|
|
{ "Failed to clone lazy.nvim:\n", "ErrorMsg" },
|
|
{ out, "WarningMsg" },
|
|
{ "\nPress any key to exit..." },
|
|
}, true, {})
|
|
vim.fn.getchar()
|
|
os.exit(1)
|
|
end
|
|
end
|
|
vim.opt.rtp:prepend(lazypath)
|
|
|
|
-- Must load before lazy
|
|
vim.g.mapleader = " "
|
|
vim.g.maplocalleader = "\\"
|
|
|
|
require("lazy").setup({
|
|
spec = {
|
|
-- Import all files in the plugin folder
|
|
{ import = "plugins" },
|
|
},
|
|
-- Automatically check for plugin updates
|
|
checker = { enabled = false },
|
|
dev = {
|
|
path = "~/projects",
|
|
fallback = true,
|
|
},
|
|
change_detection = {
|
|
enabled = false,
|
|
},
|
|
})
|
|
|
|
require("utils.after")
|