Browse Source

feat(bootstrap): also override config and data

opalmay 2 years ago
parent
commit
e85a6e1660
1 changed files with 4 additions and 1 deletions
  1. 4 1
      lua/lvim/bootstrap.lua

+ 4 - 1
lua/lvim/bootstrap.lua

@@ -64,11 +64,14 @@ function M:init(base_dir)
   self.lazy_install_dir = join_paths(self.pack_dir, "lazy", "opt", "lazy.nvim")
 
   ---@meta overridden to use LUNARVIM_CACHE_DIR instead, since a lot of plugins call this function internally
-  ---NOTE: changes to "data" are currently unstable, see #2507
   ---@diagnostic disable-next-line: duplicate-set-field
   vim.fn.stdpath = function(what)
     if what == "cache" then
       return _G.get_cache_dir()
+    elseif what == "config" then
+      return _G.get_config_dir()
+    elseif what == "data" then
+      return _G.get_runtime_dir()
     end
     return vim.call("stdpath", what)
   end