Skip to content

Commit 44adb0f

Browse files
Revert "fix(mininit): Ensure minimal init works on 0.11"
This reverts commit 12d2324.
1 parent 12d2324 commit 44adb0f

File tree

2 files changed

+4
-7
lines changed

2 files changed

+4
-7
lines changed

lua/orgmode/config/init.lua

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,11 @@ function Config:__index(key)
3030
end
3131

3232
function Config:install_grammar()
33-
local ok, _, err = pcall(vim.treesitter.language.add, 'org')
34-
if not ok or err ~= nil then
35-
require('orgmode.utils.treesitter.install').run()
33+
local ok = pcall(vim.treesitter.language.add, 'org')
34+
if ok then
35+
return
3636
end
37+
require('orgmode.utils.treesitter.install').run()
3738
end
3839

3940
---@param url? string

scripts/minimal_init.lua

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,6 @@ local nvim_root = tmp_dir .. '/nvim_orgmode'
33
local lazy_root = nvim_root .. '/lazy'
44
local lazypath = lazy_root .. '/lazy.nvim'
55

6-
for _, name in ipairs({ "config", "data", "state", "cache" }) do
7-
vim.env[("XDG_%s_HOME"):format(name:upper())] = nvim_root .. "/" .. name
8-
end
9-
106
-- Install lazy.nvim if not already installed
117
if not vim.loop.fs_stat(lazypath) then
128
vim.fn.system({

0 commit comments

Comments
 (0)