How do I configure plugins structure and options correctly? (gruvbox-material) #731
-
hello. I want to get rid of LazyVim and understand lazy.nvim better. I want the lua/plugins folder to load all files automatically. In LazyVim I did it like this: return {
{ "sainnhe/gruvbox-material" },
{
"LazyVim/LazyVim",
opts = {
gruvbox_material_foreground = "original",
gruvbox_material_background = "medium",
colorscheme = "gruvbox-material",
},
},
} how to do it with bare lazy.nvim? this is my init.lua: -- have to put mapleader first so mappings are correct
vim.g.mapleader = " "
vim.g.maplocalleader = " "
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("plugins", opts) this is my lua/plugins/gruvbox-material.lua: return {
{
"sainnhe/gruvbox-material",
lazy = false,
priority = 1000,
gruvbox_material_foreground = "original",
gruvbox_material_background = "medium",
config = function()
vim.cmd [[ set colorscheme gruvbox-material ]]
end,
},
} I definitely did something wrong, I can't understand how to do that correctly. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 11 replies
-
LazyVim is barebones lazy.nvim so you can keep the same structure. Just remove the line that imports lazyvim in And if you want to keep the other files in config for options etc, then you'll have to require those in your init.lua Also, this needs to be under opts: opts= {
gruvbox_material_foreground = "original",
gruvbox_material_background = "medium",
} |
Beta Was this translation helpful? Give feedback.
LazyVim is not slow.
Anyway, this is what you want: