From 44adb0f35f30a0ad3311842c8e1eb39be81cb34f Mon Sep 17 00:00:00 2001 From: Kristijan Husak Date: Sat, 21 Dec 2024 09:42:06 +0100 Subject: [PATCH] Revert "fix(mininit): Ensure minimal init works on 0.11" This reverts commit 12d2324f7e10f3c2378da3997c43e8cbe280e660. --- lua/orgmode/config/init.lua | 7 ++++--- scripts/minimal_init.lua | 4 ---- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/lua/orgmode/config/init.lua b/lua/orgmode/config/init.lua index 2944b4877..ab18a5630 100644 --- a/lua/orgmode/config/init.lua +++ b/lua/orgmode/config/init.lua @@ -30,10 +30,11 @@ function Config:__index(key) end function Config:install_grammar() - local ok, _, err = pcall(vim.treesitter.language.add, 'org') - if not ok or err ~= nil then - require('orgmode.utils.treesitter.install').run() + local ok = pcall(vim.treesitter.language.add, 'org') + if ok then + return end + require('orgmode.utils.treesitter.install').run() end ---@param url? string diff --git a/scripts/minimal_init.lua b/scripts/minimal_init.lua index 418925c85..2966879f9 100644 --- a/scripts/minimal_init.lua +++ b/scripts/minimal_init.lua @@ -3,10 +3,6 @@ local nvim_root = tmp_dir .. '/nvim_orgmode' local lazy_root = nvim_root .. '/lazy' local lazypath = lazy_root .. '/lazy.nvim' -for _, name in ipairs({ "config", "data", "state", "cache" }) do - vim.env[("XDG_%s_HOME"):format(name:upper())] = nvim_root .. "/" .. name -end - -- Install lazy.nvim if not already installed if not vim.loop.fs_stat(lazypath) then vim.fn.system({