From 6132e0ca1aba426199d98d78db6a019e4f0fe07d Mon Sep 17 00:00:00 2001 From: Vhyrro Date: Sat, 2 Sep 2023 21:52:59 +0200 Subject: [PATCH] feat: add installed plugins to `runtimepath` --- lua/rocks/setup.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lua/rocks/setup.lua b/lua/rocks/setup.lua index 363eda0c..310b173b 100644 --- a/lua/rocks/setup.lua +++ b/lua/rocks/setup.lua @@ -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"), @@ -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")