From ffcaae6c32fb10c7716dde2593e30bdf044719db Mon Sep 17 00:00:00 2001 From: kylo252 <59826753+kylo252@users.noreply.github.com> Date: Mon, 15 Nov 2021 09:20:45 +0100 Subject: fix: use an indepdent shadafile from neovim (#1910) --- lua/lvim/bootstrap.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lua/lvim/bootstrap.lua') diff --git a/lua/lvim/bootstrap.lua b/lua/lvim/bootstrap.lua index 74a9bf45..051f7698 100644 --- a/lua/lvim/bootstrap.lua +++ b/lua/lvim/bootstrap.lua @@ -46,7 +46,7 @@ end function M:init(base_dir) self.runtime_dir = get_runtime_dir() self.config_dir = get_config_dir() - self.cache_path = get_cache_dir() + self.cache_dir = get_cache_dir() self.pack_dir = join_paths(self.runtime_dir, "site", "pack") self.packer_install_dir = join_paths(self.runtime_dir, "site", "pack", "packer", "start", "packer.nvim") self.packer_cache_path = join_paths(self.config_dir, "plugin", "packer_compiled.lua") @@ -80,7 +80,7 @@ function M:init(base_dir) if not os.getenv "LVIM_TEST_ENV" then _G.PLENARY_DEBUG = false require("lvim.impatient").setup { - path = vim.fn.stdpath "cache" .. "/lvim_cache", + path = join_paths(self.cache_dir, "lvim_cache"), enable_profiling = true, } end -- cgit v1.2.3 From 5c0ccff78f199c46aea47fa756e7c748477e5c65 Mon Sep 17 00:00:00 2001 From: kylo252 <59826753+kylo252@users.noreply.github.com> Date: Sun, 28 Nov 2021 16:52:56 +0100 Subject: fix: correct order for cmp's setup (#1999) --- lua/lvim/bootstrap.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'lua/lvim/bootstrap.lua') diff --git a/lua/lvim/bootstrap.lua b/lua/lvim/bootstrap.lua index 051f7698..7545b3be 100644 --- a/lua/lvim/bootstrap.lua +++ b/lua/lvim/bootstrap.lua @@ -2,6 +2,7 @@ local M = {} local uv = vim.loop local path_sep = uv.os_uname().version:match "Windows" and "\\" or "/" +local in_headless = #vim.api.nvim_list_uis() == 0 ---Join path segments that were passed as input ---@return string @@ -77,7 +78,7 @@ function M:init(base_dir) vim.fn.mkdir(get_cache_dir(), "p") -- FIXME: currently unreliable in unit-tests - if not os.getenv "LVIM_TEST_ENV" then + if not in_headless then _G.PLENARY_DEBUG = false require("lvim.impatient").setup { path = join_paths(self.cache_dir, "lvim_cache"), -- cgit v1.2.3 From e0336ed029f8368fb1c7a0240f93af1ccf409ffd Mon Sep 17 00:00:00 2001 From: kylo252 <59826753+kylo252@users.noreply.github.com> Date: Wed, 1 Dec 2021 21:24:48 +0100 Subject: fix: more accessible changelog (#2019) --- lua/lvim/bootstrap.lua | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) (limited to 'lua/lvim/bootstrap.lua') diff --git a/lua/lvim/bootstrap.lua b/lua/lvim/bootstrap.lua index 7545b3be..44705a53 100644 --- a/lua/lvim/bootstrap.lua +++ b/lua/lvim/bootstrap.lua @@ -175,10 +175,23 @@ end function M:get_version(type) type = type or "" local opts = { cwd = get_lvim_base_dir() } - local status_ok, results = git_cmd({ "describe", "--tags" }, opts) + + local _, branch = git_cmd({ "branch", "--show-current" }, opts) + + local is_on_master = branch == "master" + if not is_on_master then + local log_status_ok, log_results = git_cmd({ "log", "--pretty=format:%h", "-1" }, opts) + local abbrev_version = log_results[1] or "" + if not log_status_ok or string.match(abbrev_version, "%d") == nil then + return nil + end + return "dev-" .. abbrev_version + end + + local tag_status_ok, results = git_cmd({ "describe", "--tags" }, opts) local lvim_full_ver = results[1] or "" - if not status_ok or string.match(lvim_full_ver, "%d") == nil then + if not tag_status_ok or string.match(lvim_full_ver, "%d") == nil then return nil end if type == "short" then -- cgit v1.2.3 From 68cdb62f87543d5420e70c241ebd5942ed9c7b0e Mon Sep 17 00:00:00 2001 From: kylo252 <59826753+kylo252@users.noreply.github.com> Date: Thu, 9 Dec 2021 11:51:37 +0100 Subject: fix(bootstrap): remove hard-coded spellfile option (#2061) --- lua/lvim/bootstrap.lua | 3 --- 1 file changed, 3 deletions(-) (limited to 'lua/lvim/bootstrap.lua') diff --git a/lua/lvim/bootstrap.lua b/lua/lvim/bootstrap.lua index 44705a53..702dfae1 100644 --- a/lua/lvim/bootstrap.lua +++ b/lua/lvim/bootstrap.lua @@ -72,11 +72,8 @@ function M:init(base_dir) -- TODO: we need something like this: vim.opt.packpath = vim.opt.rtp vim.cmd [[let &packpath = &runtimepath]] - vim.cmd("set spellfile=" .. join_paths(self.config_dir, "spell", "en.utf-8.add")) end - vim.fn.mkdir(get_cache_dir(), "p") - -- FIXME: currently unreliable in unit-tests if not in_headless then _G.PLENARY_DEBUG = false -- cgit v1.2.3