diff options
author | opalmay <[email protected]> | 2023-02-24 17:07:55 +0200 |
---|---|---|
committer | opalmay <[email protected]> | 2023-02-24 17:18:10 +0200 |
commit | d3dc0b2bb36145273c549408cd98648846501096 (patch) | |
tree | 4168074f4ae4a523be658ca34490998f32da37db /lua/lvim/plugin-loader.lua | |
parent | e794be453b9f15158ee04c9d79fd3423f49089f1 (diff) |
fix: lazy cache (#3892)
* fix: lazy cache
* refactor: add pcall
Diffstat (limited to 'lua/lvim/plugin-loader.lua')
-rw-r--r-- | lua/lvim/plugin-loader.lua | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/lua/lvim/plugin-loader.lua b/lua/lvim/plugin-loader.lua index 5a3a94de..088b48a8 100644 --- a/lua/lvim/plugin-loader.lua +++ b/lua/lvim/plugin-loader.lua @@ -48,23 +48,12 @@ function plugin_loader.init(opts) vim.opt.runtimepath:append(join_paths(plugins_dir, "*")) pcall(function() - -- set a custom path for lazy's cache and enable it + -- set a custom path for lazy's cache local lazy_cache = require "lazy.core.cache" lazy_cache.path = join_paths(get_cache_dir(), "lazy", "luac") - lazy_cache.enable() end) end -function plugin_loader.reset_cache() - -- TODO(kylo252): is this really necessary anymore? - local lazy_cache = require "lazy.core.cache" - local cache_path = lazy_cache.path - if utils.is_directory(cache_path) then - vim.fn.delete(cache_path, "rf") - vim.fn.mkdir(cache_path, "p") - end -end - function plugin_loader.reload(spec) local Config = require "lazy.core.config" local lazy = require "lazy" |