Skip to content

Instantly share code, notes, and snippets.

@towry
Last active July 16, 2023 03:00
Show Gist options
  • Save towry/f16d4aac489154095c478256e53a1fb9 to your computer and use it in GitHub Desktop.
Save towry/f16d4aac489154095c478256e53a1fb9 to your computer and use it in GitHub Desktop.
`nvim -u init.lua` to reproduce some neovim plugin repo issue.
vim.g.mapleader = ' '
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',
'--single-branch',
'https://github.com/folke/lazy.nvim.git',
lazypath,
})
end
vim.opt.runtimepath:prepend(lazypath)
-- install plugins
local plugins = {
{ 'nvim-lua/plenary.nvim' },
{ 'stevearc/dressing.nvim', opts = {} },
{
'mcchrish/zenbones.nvim',
dependencies = {
'rktjmp/lush.nvim',
},
config = false,
init = function()
vim.g.neobones = {
solid_float_border = false,
colorize_diagnostic_underline_text = true,
transparent_background = false,
-- light
-- darken_comments = 30,
lightness = 'dim',
darken_cursor_line = 10,
--- dark
lighten_cursor_line = 15,
-- lighten_comments = 30,
lighten_non_text = 22,
}
end,
},
-- add any other pugins here
}
require('lazy').setup({
spec = plugins,
root = root .. '/plugins',
defaults = {
lazy = false,
},
state = root .. '/lazy/state.json',
performance = {
cache = {
enabled = false,
}
}
})
-- add anything else here
vim.opt.termguicolors = true
pcall(vim.cmd, [[colorscheme neobones]])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment