Add lazy.nvim package manager
This commit is contained in:
3
init.lua
3
init.lua
@ -2,6 +2,9 @@
|
|||||||
vim.g.mapleader = " "
|
vim.g.mapleader = " "
|
||||||
vim.g.maplocalleader = " "
|
vim.g.maplocalleader = " "
|
||||||
|
|
||||||
|
-- Load lazy.nvim
|
||||||
|
require("config.lazy")
|
||||||
|
|
||||||
-- Line numbers
|
-- Line numbers
|
||||||
vim.opt.number = true
|
vim.opt.number = true
|
||||||
vim.opt.relativenumber = true
|
vim.opt.relativenumber = true
|
||||||
|
|||||||
23
lua/config/lazy.lua
Normal file
23
lua/config/lazy.lua
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
-- Path where lazy.nvim will be installed
|
||||||
|
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
|
||||||
|
|
||||||
|
-- Auto-install lazy.nvim if not present
|
||||||
|
if not vim.loop.fs_stat(lazypath) then
|
||||||
|
vim.fn.system({
|
||||||
|
"git",
|
||||||
|
"clone",
|
||||||
|
"--filter=blob:none",
|
||||||
|
"https://github.com/folke/lazy.nvim.git",
|
||||||
|
"--branch=stable",
|
||||||
|
lazypath,
|
||||||
|
})
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Add lazy.nvim to runtime path
|
||||||
|
vim.opt.rtp:prepend(lazypath)
|
||||||
|
|
||||||
|
-- Initialize lazy.nvim
|
||||||
|
require("lazy").setup({
|
||||||
|
-- plugins will go here
|
||||||
|
})
|
||||||
|
|
||||||
Reference in New Issue
Block a user