Skip to content

Commit

Permalink
feat: add installed plugins to runtimepath
Browse files Browse the repository at this point in the history
  • Loading branch information
vhyrro committed Sep 2, 2023
1 parent 719f97e commit 6132e0c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lua/rocks/setup.lua
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ end
--- Initialize rocks.nvim
--- Add luarocks Neovim tree paths to LUA_PATH and LUA_CPATH and download required rocks to work
function setup.init()
-- First set up the paths then check if toml rock is installed or not
-- Set up the paths then check if toml rock is installed or not
local luarocks_path = {
vim.fs.joinpath(config.rocks_path, "share", "lua", "5.1", "?.lua"),
vim.fs.joinpath(config.rocks_path, "share", "lua", "5.1", "?", "init.lua"),
Expand All @@ -52,6 +52,8 @@ function setup.init()
}
package.cpath = package.cpath .. ";" .. table.concat(luarocks_cpath, ";")

vim.opt.runtimepath:append(vim.fs.joinpath(config.rocks_path, "lib", "luarocks", "rocks-5.1", "*", "*"))

-- Is toml rock installed? No? Well let's install it now!
local is_toml_installed, _ = pcall(require, "toml")

Expand Down

0 comments on commit 6132e0c

Please sign in to comment.