chg: Switch to lazy.nvim for plugins

This commit is contained in:
Sayantan Santra 2024-03-22 13:02:23 -05:00
parent 1b011fe67a
commit 7038f9145e
Signed by: SinTan1729
GPG key ID: EB3E68BFBA25C85F
7 changed files with 56 additions and 79 deletions

3
.gitignore vendored Normal file
View file

@ -0,0 +1,3 @@
# Ignore lazy-lock files
lazy-lock.json

View file

@ -3,7 +3,7 @@ package.path = package.path .. ';' .. vim.fn.stdpath("config") .. "/?.lua"
-- Load global configs
require("globals")
-- Load plugins using paq-nvim
-- Load plugins using lazy.nvim
require("plugins")
-- Load keymaps
require("keymaps")

View file

@ -1,29 +1,19 @@
-- Automatically bootstrap paq-nvim
local function clone_paq()
local path = vim.fn.stdpath("data") .. "/site/pack/paqs/start/paq-nvim"
local is_installed = vim.fn.empty(vim.fn.glob(path)) == 0
if not is_installed then
vim.fn.system { "git", "clone", "--depth=1", "https://github.com/savq/paq-nvim.git", path }
return true
end
end
-- Automatically install new packages at startup
local function bootstrap_paq(packages)
local first_install = clone_paq()
vim.cmd.packadd("paq-nvim")
local paq = require("paq")
paq(packages)
if first_install then
vim.notify("Installing plugins... If prompted, hit Enter to continue.")
paq.install()
end
-- Automatically bootstrap lazy.nvim
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
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", -- latest stable release
lazypath,
})
end
vim.opt.rtp:prepend(lazypath)
-- Load plugin via paq-nvim
bootstrap_paq {
-- Let paq-nvim manage itself
"savq/paq-nvim",
require("lazy").setup({
-- Use lualine for statusbar
"nvim-lualine/lualine.nvim",
"nvim-tree/nvim-web-devicons",
@ -46,9 +36,9 @@ bootstrap_paq {
"hrsh7th/cmp-cmdline",
"SirVer/ultisnips", -- For snippets
-- Support programming terms
{ "psliwka/vim-dirtytalk", build = ':let &rtp = &rtp | DirtytalkUpdate' },
{ "psliwka/vim-dirtytalk", build = ":DirtytalkUpdate" },
-- vim-moonfly theme
{ "bluz71/vim-moonfly-colors", as = 'moonfly' },
{ "bluz71/vim-moonfly-colors", as = "moonfly" },
-- Rust tools
"simrat39/rust-tools.nvim",
-- Automatically add bracket pairs
@ -61,5 +51,5 @@ bootstrap_paq {
"stevearc/conform.nvim",
"junegunn/fzf.vim",
"kylechui/nvim-surround",
}
})

View file

@ -3,7 +3,7 @@ package.path = package.path .. ';' .. vim.fn.stdpath("config") .. "/?.lua"
-- Load global configs
require("globals")
-- Load plugins using paq-nvim
-- Load plugins using lazy.nvim
require("plugins")
-- Load keymaps
require("keymaps")

View file

@ -1,27 +1,19 @@
-- Automatically bootstrap paq-nvim
local function clone_paq()
local path = vim.fn.stdpath("data") .. "/site/pack/paqs/start/paq-nvim"
local is_installed = vim.fn.empty(vim.fn.glob(path)) == 0
if not is_installed then
vim.fn.system { "git", "clone", "--depth=1", "https://github.com/savq/paq-nvim.git", path }
return true
end
-- Automatically bootstrap lazy.nvim
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
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", -- latest stable release
lazypath,
})
end
vim.opt.rtp:prepend(lazypath)
-- Automatically install new packages at startup
local function bootstrap_paq(packages)
local first_install = clone_paq()
vim.cmd.packadd("paq-nvim")
local paq = require("paq")
paq(packages)
if first_install then
vim.notify("Installing plugins... If prompted, hit Enter to continue.")
paq.install()
end
end
-- Load plugins via paq-nvim
bootstrap_paq {
-- Load plugins via lazy.nvim
require("lazy").setup({
-- Let paq-nvim manage itself
"savq/paq-nvim",
-- Use lualine for statusbar
@ -41,9 +33,9 @@ bootstrap_paq {
"hrsh7th/cmp-buffer",
"hrsh7th/cmp-path",
-- Support programming terms
{ "psliwka/vim-dirtytalk", build = ':let &rtp = &rtp | DirtytalkUpdate' },
{ "psliwka/vim-dirtytalk", build = ":DirtytalkUpdate" },
-- vim-moonfly theme
{ "bluz71/vim-moonfly-colors", as = 'moonfly' },
{ "bluz71/vim-moonfly-colors", as = "moonfly" },
-- Automatically add bracket pairs
"windwp/nvim-autopairs",
-- Syntax highlighting for Caddyfile
@ -53,5 +45,5 @@ bootstrap_paq {
"kylechui/nvim-surround",
"junegunn/fzf",
"junegunn/fzf.vim",
}
})

View file

@ -3,7 +3,7 @@ package.path = package.path .. ';' .. vim.fn.stdpath("config") .. "/?.lua"
-- Load global configs
require("globals")
-- Load plugins using paq-nvim
-- Load plugins using lazy.nvim
require("plugins")
-- Load keymaps
require("keymaps")

View file

@ -1,27 +1,19 @@
-- Automatically bootstrap paq-nvim
local function clone_paq()
local path = vim.fn.stdpath("data") .. "/site/pack/paqs/start/paq-nvim"
local is_installed = vim.fn.empty(vim.fn.glob(path)) == 0
if not is_installed then
vim.fn.system { "git", "clone", "--depth=1", "https://github.com/savq/paq-nvim.git", path }
return true
end
-- Automatically bootstrap lazy.nvim
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
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", -- latest stable release
lazypath,
})
end
vim.opt.rtp:prepend(lazypath)
-- Automatically install new packages at startup
local function bootstrap_paq(packages)
local first_install = clone_paq()
vim.cmd.packadd("paq-nvim")
local paq = require("paq")
paq(packages)
if first_install then
vim.notify("Installing plugins... If prompted, hit Enter to continue.")
paq.install()
end
end
-- Load plugins via paq-nvim
bootstrap_paq {
-- Load plugins via lazy.nvim
require("lazy").setup({
-- Let paq-nvim manage itself
"savq/paq-nvim",
-- Use lualine for statusbar
@ -41,9 +33,9 @@ bootstrap_paq {
"hrsh7th/cmp-path",
"hrsh7th/cmp-cmdline",
-- Support programming terms
{ "psliwka/vim-dirtytalk", build = ':let &rtp = &rtp | DirtytalkUpdate' },
{ "psliwka/vim-dirtytalk", build = ":DirtytalkUpdate" },
-- vim-moonfly theme
{ "bluz71/vim-moonfly-colors", as = 'moonfly' },
{ "bluz71/vim-moonfly-colors", as = "moonfly" },
-- Automatically add bracket pairs
"windwp/nvim-autopairs",
-- Syntax highlighting for Caddyfile
@ -53,5 +45,5 @@ bootstrap_paq {
"kylechui/nvim-surround",
"junegunn/fzf",
"junegunn/fzf.vim",
}
})