Skip to content

Commit

Permalink
fix: properly require lua-utils
Browse files Browse the repository at this point in the history
  • Loading branch information
vhyrro committed Mar 24, 2024
1 parent 5fcae0b commit b8a78c0
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions lua/neorg.lua
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,9 @@ function neorg.setup(cfg)
},
})

local lua_utils =
assert((pcall(require, "lua-utils")), "unable to find lua-utils dependency. Perhaps try restarting Neovim?")
local ok, lua_utils = pcall(require, "lua-utils")
assert(ok, "unable to find lua-utils dependency. Perhaps try restarting Neovim?")

neorg.lib = lua_utils

-- If the file we have entered has a `.norg` extension:
Expand Down Expand Up @@ -68,8 +69,9 @@ function neorg.setup_after_build()
end

-- HACK(vhyrro): Please do this elsewhere.
local lua_utils =
assert((pcall(require, "lua-utils")), "unable to find lua-utils dependency. Perhaps try restarting Neovim?")
local ok, lua_utils = pcall(require, "lua-utils")
assert(ok, "unable to find lua-utils dependency. Perhaps try restarting Neovim?")

neorg.lib = lua_utils

neorg.setup(user_configuration)
Expand Down

0 comments on commit b8a78c0

Please sign in to comment.