From be9639cabbaa453932aaffefdd72cfe46c0eed6e Mon Sep 17 00:00:00 2001 From: Leon Connor Holm Date: Tue, 22 Aug 2023 10:09:02 +0200 Subject: [PATCH] fix(#14): install script --- lua/qvim/core/manager.lua | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/lua/qvim/core/manager.lua b/lua/qvim/core/manager.lua index f5fe026..a1aef26 100644 --- a/lua/qvim/core/manager.lua +++ b/lua/qvim/core/manager.lua @@ -5,10 +5,7 @@ local utils = require("qvim.utils") local join_paths = utils.join_paths local fmt = string.format -local get_qvim_config_dir = _G.get_qvim_config_dir - -local plugins_dir = - join_paths(get_qvim_data_dir(), "after", "pack", "lazy", "opt") +local plugins_dir = get_qvim_pack_dir() local function ensure_plugins_in_rtp(lazy_install_dir) local rtp = vim.opt.rtp:get() @@ -42,7 +39,7 @@ function manager:init(opts) if not utils.is_directory(lazy_install_dir) then print("Initializing first time setup") - local core_plugins_dir = join_paths(get_qvim_config_dir(), "plugins") + local core_plugins_dir = join_paths(get_qvim_state_dir(), "plugins") if utils.is_directory(core_plugins_dir) then vim.fn.mkdir(plugins_dir, "p") vim.loop.fs_rmdir(plugins_dir) @@ -57,7 +54,7 @@ function manager:init(opts) lazy_install_dir, }) local default_snapshot_path = - join_paths(get_qvim_config_dir(), "snapshots", "default.json") + join_paths(get_qvim_state_dir(), "snapshots", "default.json") local snapshot = assert( vim.fn.json_decode(vim.fn.readfile(default_snapshot_path)) ) @@ -113,6 +110,7 @@ function manager:load(spec) git = { timeout = 120, }, + -- TODO I'm not exactly sure about this location lockfile = join_paths(get_qvim_rtp_dir(), "lazy-lock.json"), performance = { rtp = {