diff --git a/lua/qvim/bootstrap.lua b/lua/qvim/bootstrap.lua index 9807b70..50ea749 100644 --- a/lua/qvim/bootstrap.lua +++ b/lua/qvim/bootstrap.lua @@ -80,6 +80,8 @@ function _G.get_qvim_cache_dir() end M.qvim_config_dir = get_qvim_config_dir() +M.qvim_state_dir = get_qvim_state_dir() +M.qvim_rtp_dir = get_qvim_rtp_dir() M.qvim_cache_dir = get_qvim_cache_dir() M.opt_dir = join_paths(get_qvim_data_dir(), "after", "pack", "lazy", "opt") M.lazy_install_dir = join_paths(M.opt_dir, "lazy.nvim") @@ -126,7 +128,7 @@ function M:init() install_path = self.lazy_install_dir, }) - vim.opt.rtp = self:bootstrap() + vim.opt.rtp = self:bootstrap() require("qvim.config"):init() @@ -174,16 +176,12 @@ function M:bootstrap(stds, expands) -- remove vim.tbl_contains( rtp_paths, - _G.join_paths( - vim.call("stdpath", what), - unpack(expand) - ) + _G.join_paths(vim.call("stdpath", what), unpack(expand)) ) then - rtp:remove(_G.join_paths( - vim.call("stdpath", what), - unpack(expand) - )) + rtp:remove( + _G.join_paths(vim.call("stdpath", what), unpack(expand)) + ) end if not vim.tbl_contains( @@ -201,6 +199,7 @@ function M:bootstrap(stds, expands) end return rtp end + ---Update qvimVim ---pulls the latest changes from github and, resets the startup cache function M:update() diff --git a/tests/minimal_init.lua b/tests/minimal_init.lua index d2d163f..fc10c3a 100644 --- a/tests/minimal_init.lua +++ b/tests/minimal_init.lua @@ -1,5 +1,5 @@ -local path_sep = vim.loop.os_uname().version:match "Windows" and "\\" or "/" -local base_dir = os.getenv "QUANTUMVIM_CONFIG_DIR" +local path_sep = vim.loop.os_uname().version:match("Windows") and "\\" or "/" +local base_dir = os.getenv("QUANTUMVIM_RTP_DIR") local tests_dir = base_dir .. path_sep .. "tests" vim.opt.rtp:append(tests_dir) @@ -7,4 +7,4 @@ require("qvim.bootstrap"):init() -- NOTE: careful about name collisions -- see https://github.com/nvim-lualine/lualine.nvim/pull/621 -require "tests.qvim.helpers" +require("tests.qvim.helpers")