@@ -94,45 +94,45 @@ body:
94
94
-- #######################################
95
95
96
96
local root = vim.fn.stdpath("run") .. "/nvim/diffview.nvim"
97
- vim.fn.mkdir(root, "p")
97
+ local plugin_dir = root .. "/plugins"
98
+ vim.fn.mkdir(plugin_dir, "p")
98
99
99
- -- set stdpaths to use root
100
100
for _, name in ipairs({ "config", "data", "state", "cache" }) do
101
101
vim.env[("XDG_%s_HOME"):format(name:upper())] = root .. "/" .. name
102
102
end
103
103
104
- -- bootstrap lazy
105
- local lazypath = root .. "/plugins/lazy.nvim"
106
- if not vim.loop.fs_stat(lazypath) then
107
- vim.fn.system({ "git", "clone", "--filter=blob:none", "https://github.com/folke/lazy.nvim.git", lazypath, })
108
- end
109
- vim.opt.runtimepath:prepend(lazypath)
110
-
111
- -- install plugins
112
104
local plugins = {
113
- {
114
- "sindrets/diffview.nvim",
115
- dependencies = { "nvim-tree/nvim-web-devicons" },
116
- config = function()
117
- require("diffview").setup({
118
- -- ##############################################################################
119
- -- ### ADD DIFFVIEW.NVIM CONFIG THAT IS _NECESSARY_ FOR REPRODUCING THE ISSUE ###
120
- -- ##############################################################################
121
- })
122
- end,
123
- },
105
+ { "nvim-web-devicons", url = "https://github.com/nvim-tree/nvim-web-devicons.git" },
106
+ { "diffview.nvim", url = "https://github.com/sindrets/diffview.nvim.git" },
124
107
-- ##################################################################
125
108
-- ### ADD PLUGINS THAT ARE _NECESSARY_ FOR REPRODUCING THE ISSUE ###
126
109
-- ##################################################################
127
110
}
128
- require("lazy").setup(plugins, { root = root .. "/plugins" })
129
- require("lazy").sync({ show = false, wait = true })
111
+
112
+ for _, spec in ipairs(plugins) do
113
+ local install_path = plugin_dir .. "/" .. spec[1]
114
+ if vim.fn.isdirectory(install_path) ~= 1 then
115
+ if spec.url then
116
+ print(string.format("Installing '%s'...", spec[1]))
117
+ vim.fn.system({ "git", "clone", "--depth=1", spec.url, install_path })
118
+ end
119
+ end
120
+ vim.opt.runtimepath:append(spec.path or install_path)
121
+ end
122
+
123
+ require("diffview").setup({
124
+ -- ##############################################################################
125
+ -- ### ADD DIFFVIEW.NVIM CONFIG THAT IS _NECESSARY_ FOR REPRODUCING THE ISSUE ###
126
+ -- ##############################################################################
127
+ })
130
128
131
129
vim.opt.termguicolors = true
132
130
vim.cmd("colorscheme " .. (vim.fn.has("nvim-0.8") == 1 and "habamax" or "slate"))
133
131
134
132
-- ############################################################################
135
133
-- ### ADD INIT.LUA SETTINGS THAT ARE _NECESSARY_ FOR REPRODUCING THE ISSUE ###
136
134
-- ############################################################################
135
+
136
+ print("Ready!")
137
137
validations :
138
138
required : false
0 commit comments