Move lazy setup to init.lua, plugins.lua returns plugin spec

This commit is contained in:
Evie Litherland-Smith 2023-02-17 10:13:18 +00:00
parent 8989bcd547
commit b4b1ec8ff7
2 changed files with 24 additions and 22 deletions

View file

@ -1,9 +1,24 @@
-- 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)
require("lazy").setup({
require("plugins"),
})
-- Set vim options -- Set vim options
require("options") require("options")
-- Load plugins as defined for Packer
require("plugins")
-- Define custom keymappings -- Define custom keymappings
require("keymaps") require("keymaps")

View file

@ -1,28 +1,13 @@
-- bootstrap lazy.nvim local M = {
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)
vim.cmd([[ let g:neo_tree_remove_legacy_commands = 1 ]])
require("lazy").setup({
"folke/lazy.nvim", "folke/lazy.nvim",
{ {
"catppuccin/nvim", "catppuccin/nvim",
name = "catppuccin", name = "catppuccin",
lazy = false,
priority = 1000,
config = function() config = function()
require("colours") require("colours")
end, end,
priority = 1000,
}, },
"stevearc/dressing.nvim", "stevearc/dressing.nvim",
{ {
@ -127,4 +112,6 @@ require("lazy").setup({
require("config.nvim-test") require("config.nvim-test")
end, end,
}, },
}) { "numToStr/Comment.nvim", name = "Comment" },
}
return M