Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

request: add recommendation for an issue reproduction template #11

Open
mikavilpas opened this issue May 26, 2024 · 1 comment
Open

Comments

@mikavilpas
Copy link
Contributor

In my project (https://github.com/mikavilpas/yazi.nvim), I have a lazy.nvim lua script that I have been handing out to some people who have had issues. We have had good success with it, the issues being (mostly) easily reproducible.

Here's what I have used as a reference:

Details

-- 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 plugins
local plugins = {
  'folke/tokyonight.nvim',
  {
    'mikavilpas/yazi.nvim',
    dependencies = {
      'nvim-lua/plenary.nvim',
    },
    event = 'VeryLazy',
    keys = {
      {
        -- 👇 choose your own keymapping
        '<leader>fy',
        function()
          require('yazi').yazi()
        end,

        { desc = 'Open the file manager' },
      },
    },
    opts = {
      open_for_directories = false,
    },
  },
}
require('lazy').setup(plugins, {
  root = root .. '/plugins',
})

vim.cmd.colorscheme('tokyonight')
-- add anything else here

I copied it from the lazy.nvim project and slightly adapted it.

Disregarding the lazy.nvim specific parts, in principle I think this could be a good addition to the guide.

What do you think? How do you reproduce issues in your projects?

@mrcjkb
Copy link
Member

mrcjkb commented May 26, 2024

Hey 👋

thanks for the suggestion. That's actually something I forgot to add 😅

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants