forked from nvim-neorg/neorg
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.lua
26 lines (20 loc) · 841 Bytes
/
build.lua
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
-- This build.lua exists to bridge luarocks installation for lazy.nvim users.
-- It's main purposes are:
-- - Shelling out to luarocks.nvim for installation
-- - Installing neorg's dependencies as rocks
-- Important note: we execute the build code in a vim.schedule
-- to defer the execution and ensure that the runtimepath is appropriately set.
vim.schedule(function()
local ok, luarocks = pcall(require, "luarocks-nvim.rocks")
assert(ok, "Unable to install neorg: required dependency `vhyrro/luarocks.nvim` not found!")
luarocks.ensure({
"nvim-nio ~> 1.7",
"lua-utils.nvim == 1.0.2",
"plenary.nvim == 0.1.4",
"nui.nvim == 0.3.0",
"pathlib.nvim ~> 2.2",
})
package.loaded["neorg"] = nil
require("neorg").setup_after_build()
pcall(vim.cmd.Neorg, "sync-parsers")
end)