Skip to content

Instantly share code, notes, and snippets.

@t18n
Created June 10, 2024 09:21
Show Gist options
  • Save t18n/98fc0642cdf213afaabe4fff9a643959 to your computer and use it in GitHub Desktop.
Save t18n/98fc0642cdf213afaabe4fff9a643959 to your computer and use it in GitHub Desktop.
Lazy.nvim repro template
-- DO NOT change the paths and don't remove the colorscheme
local root = vim.fn.fnamemodify("./.repro", ":p")
-- set stdpaths to use .repro
for _, name in ipairs({ "config", "data", "state", "cache" }) do
vim.env[("XDG_%s_HOME"):format(name:upper())] = root .. "/" .. name
end
-- bootstrap lazy
local lazypath = root .. "/plugins/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", lazypath, })
end
vim.opt.runtimepath:prepend(lazypath)
-- install plugins
local plugins = {
"folke/tokyonight.nvim",
-- TODO: add any other plugins here
}
require("lazy").setup(plugins, {
root = root .. "/plugins",
})
vim.cmd.colorscheme("tokyonight")
-- add anything else here
@t18n
Copy link
Author

t18n commented Jun 10, 2024

This is a gist extracted from lazy.nvim Bug report template to quickly create a repro file when you need to report a bug.

@t18n
Copy link
Author

t18n commented Jun 10, 2024

Create your own copy with

curl https://gist.githubusercontent.com/t18n/98fc0642cdf213afaabe4fff9a643959/raw/837181dcab459677df4f9f7b61dd401b7f6c90d1/repro.lua -o repro.lua

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment