-
Notifications
You must be signed in to change notification settings - Fork 18
/
repro.lua
68 lines (62 loc) · 1.72 KB
/
repro.lua
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
-- You can use this file to reproduce an issue with your configuration.
---@module "yazi"
---@module "lazy"
-- 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)
vim.g.mapleader = " "
-- install the following plugins
---@type LazySpec
local plugins = {
{ "catppuccin/nvim", name = "catppuccin", opts = { flavour = "macchiato" } },
{
"mikavilpas/yazi.nvim",
event = "VeryLazy",
keys = {
{
"<leader>-",
"<cmd>Yazi<cr>",
desc = "Open yazi at the current file",
},
{
-- Open in the current working directory
"<leader>cw",
"<cmd>Yazi cwd<cr>",
desc = "Open the file manager in nvim's working directory",
},
{
-- NOTE: this requires a version of yazi that includes
-- https://github.com/sxyazi/yazi/pull/1305 from 2024-07-18
"<c-up>",
"<cmd>Yazi toggle<cr>",
desc = "Resume the last yazi session",
},
},
---@type YaziConfig
opts = {
open_for_directories = false,
log_level = vim.log.levels.DEBUG,
},
},
}
require("lazy").setup(plugins, {
root = root .. "/plugins",
install = { colorscheme = { "catppuccin" } },
})
vim.cmd.colorscheme("catppuccin")
-- add anything else here