-
-
Notifications
You must be signed in to change notification settings - Fork 69
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(troubleshooting/minimal.lua): use lazy.minit
- Loading branch information
Showing
4 changed files
with
34 additions
and
55 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,3 +2,4 @@ doc/tags | |
result/ | ||
.direnv | ||
.luarc.json | ||
.repro |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,52 +1,16 @@ | ||
-- Minimal nvim config with lazy | ||
-- Assumes a directory in $NVIM_DATA_MINIMAL | ||
-- Start with | ||
-- | ||
-- export NVIM_DATA_MINIMAL=$(mktemp -d) | ||
-- export NVIM_APP_NAME="nvim-ht-minimal" | ||
-- nvim -u NORC -u minimal.lua | ||
-- | ||
-- Then exit out of neovim and start again. | ||
vim.env.LAZY_STDPATH = '.repro' | ||
load(vim.fn.system('curl -s https://raw.githubusercontent.com/folke/lazy.nvim/main/bootstrap.lua'))() | ||
|
||
-- Ignore default config | ||
local config_path = vim.fn.stdpath('config') | ||
vim.opt.rtp:remove(config_path) | ||
|
||
-- Ignore default plugins | ||
local data_path = vim.fn.stdpath('data') | ||
local pack_path = data_path .. '/site' | ||
vim.opt.packpath:remove(pack_path) | ||
|
||
-- bootstrap lazy.nvim | ||
data_path = assert(os.getenv('NVIM_DATA_MINIMAL'), '$NVIM_DATA_MINIMAL environment variable not set!') | ||
local lazypath = data_path .. '/lazy/lazy.nvim' | ||
local uv = vim.uv | ||
---@diagnostic disable-next-line: deprecated | ||
or vim.loop | ||
if not uv.fs_stat(lazypath) then | ||
vim.fn.system { | ||
'git', | ||
'clone', | ||
'--filter=blob:none', | ||
'https://github.com/folke/lazy.nvim.git', | ||
'--branch=stable', | ||
lazypath, | ||
} | ||
end | ||
vim.opt.rtp:prepend(lazypath) | ||
|
||
local lazy = require('lazy') | ||
|
||
lazy.setup({ | ||
{ | ||
'mrcjkb/rustaceanvim', | ||
version = '^4', | ||
init = function() | ||
-- Configure rustaceanvim here | ||
vim.g.rustaceanvim = {} | ||
end, | ||
lazy = false, | ||
require('lazy.minit').repro { | ||
spec = { | ||
{ | ||
'mrcjkb/rustaceanvim', | ||
version = '^4', | ||
init = function() | ||
-- Configure rustaceanvim here | ||
vim.g.rustaceanvim = {} | ||
end, | ||
lazy = false, | ||
}, | ||
}, | ||
-- Add any other plugins needed to reproduce the issue. | ||
-- see https://github.com/folke/lazy.nvim#-lazynvim for details. | ||
}, { root = data_path, state = data_path .. '/lazy-state.json', lockfile = data_path .. '/lazy-lock.json' }) | ||
} |