|
|
@@ -2,6 +2,30 @@
|
|
|
vim.g.loaded_netrw = 1
|
|
|
vim.g.loaded_netrwPlugin = 1
|
|
|
|
|
|
+-- override stdpath locations, so that config is fully hermetic
|
|
|
+local orig_stdpath = vim.fn.stdpath
|
|
|
+vim.fn.stdpath = function(value)
|
|
|
+ local config_path = orig_stdpath("config")
|
|
|
+
|
|
|
+ if value == "config" then
|
|
|
+ return config_path
|
|
|
+ end
|
|
|
+
|
|
|
+ if value == "data" then
|
|
|
+ return config_path .. "/data"
|
|
|
+ end
|
|
|
+
|
|
|
+ if value == "cache" then
|
|
|
+ return config_path .. "/cache"
|
|
|
+ end
|
|
|
+
|
|
|
+ if value == "state" then
|
|
|
+ return config_path .. "/state"
|
|
|
+ end
|
|
|
+
|
|
|
+ return orig_stdpath(value)
|
|
|
+end
|
|
|
+
|
|
|
-- package manager
|
|
|
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
|
|
|
if not (vim.uv or vim.loop).fs_stat(lazypath) then
|