feat(plugins): setup lazy.nvim
This commit is contained in:
parent
bf598bd1d5
commit
78111e1da6
2 changed files with 35 additions and 0 deletions
4
lazy-lock.json
Normal file
4
lazy-lock.json
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
{
|
||||
"gruvbox.nvim": { "branch": "main", "commit": "5e0a460d8e0f7f669c158dedd5f9ae2bcac31437" },
|
||||
"lazy.nvim": { "branch": "main", "commit": "1ea3c4085785f460fb0e46d2fe1ee895f5f9e7c1" }
|
||||
}
|
||||
31
lua/config/lazy.lua
Normal file
31
lua/config/lazy.lua
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
-- Bootstrap lazy.nvim
|
||||
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)
|
||||
|
||||
--setup lazy.nvim
|
||||
require("lazy").setup({
|
||||
spec = {
|
||||
-- import plugins from specific directory
|
||||
{ import = "plugins" },
|
||||
},
|
||||
-- setup correct colorscheme
|
||||
install = { colorscheme = { "gruvbox"} },
|
||||
-- automatically check for plugin updates
|
||||
checker = { enabled = true },
|
||||
rocks = {
|
||||
enabled = false
|
||||
},
|
||||
})
|
||||
Loading…
Add table
Add a link
Reference in a new issue