Skip to content

Commit

Permalink
revert(installer): only add rocks.nvim to rtp in install script (#88)
Browse files Browse the repository at this point in the history
This reverts commit c1ef187.
The change prevents files in `plugin` directories, etc. from being
sourced.
  • Loading branch information
mrcjkb committed Dec 17, 2023
1 parent 26f6357 commit 3d7da89
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 7 deletions.
2 changes: 1 addition & 1 deletion installer.lua
Original file line number Diff line number Diff line change
Expand Up @@ -396,7 +396,7 @@ local function install()
" }",
' package.cpath = package.cpath .. ";" .. table.concat(luarocks_cpath, ";")',
" ",
' vim.opt.runtimepath:append(vim.fs.joinpath(rocks_config.rocks_path, "lib", "luarocks", "rocks-5.1", "rocks.nvim", "*"))',
' vim.opt.runtimepath:append(vim.fs.joinpath(rocks_config.rocks_path, "lib", "luarocks", "rocks-5.1", "*", "*"))',
"<",
"Thank you for installing rocks.nvim!",
"",
Expand Down
4 changes: 2 additions & 2 deletions lua/rocks/config/internal.lua
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@
---@field rocks_path string Local path in your filesystem to install rocks
---@field config_path string Rocks declaration file path
---@field luarocks_binary string Luarocks binary path
---@field lazy boolean Whether to query luarocks.org lazily
---@field dynamic_rtp boolean Whether to automatically add freshly installed plugins to the 'runtimepath'
---@field lazy boolean Whether to query luarocks.org lazily.
---@field dynamic_rtp boolean Whether to automatically add freshly installed plugins to the 'runtimepath'.
---@field debug_info RocksConfigDebugInfo

---@class (exact) RocksConfigDebugInfo
Expand Down
2 changes: 1 addition & 1 deletion nix/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,4 @@ local luarocks_cpath = {
}
package.cpath = package.cpath .. ";" .. table.concat(luarocks_cpath, ";")

vim.opt.runtimepath:append(vim.fs.joinpath(rocks_config.rocks_path, "lib", "luarocks", "rocks-5.1", "rocks.nvim", "*"))
vim.opt.runtimepath:append(vim.fs.joinpath(rocks_config.rocks_path, "lib", "luarocks", "rocks-5.1", "*", "*"))
3 changes: 0 additions & 3 deletions plugin/rocks.lua
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,3 @@ if not config.lazy then
})
end)
end

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

0 comments on commit 3d7da89

Please sign in to comment.