Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Start migrating from lazy to Rocks #124

Merged
merged 11 commits into from
Nov 7, 2024
3 changes: 1 addition & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
.netrwhist
.vimlog

plugin/
lua/plugin/
plugged/
autoload/
lua/custom/
lazy-lock.json
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -139,3 +139,12 @@ you can find the list of contributors on the [contributors page](https://github.
</a>


| ![pakrohk](https://github.com/Pakrohk.png?size=71) | ![ARS101](https://github.com/ARS101.png?size=71) | ![lorem10](https://github.com/lorem10.png?size=71) | ![nooob-developer](https://github.com/nooob-developer.png?size=71) |
| :------------------------------------------------: | :----------------------------------------------: | ------------------------------------- | -------------- |
| [Pakrohk](https://github.com/Pakrohk) | [ARS101](https://github.com/ARS101) | [lorem10](https://github.com/lorem10) | [nooob-developer](https://github.com/nooob-developer) |

| [H-cyber](https://github.com/H-cyber.png?size=74) | ![mandarvaze](https://github.com/mandarvaze.png?size=74) | ![RealMrHex](https://github.com/RealMrHex.png?size=74) | ![0xj0hn](https://github.com/0xj0hn.png?size=74) |
| --------------------------------------- | ------------------------------------------------------ | --------------------- | ----------------------- |
| [H-cyber](https://github.com/H-cyber) | [mandarvaze](https://github.com/mandarvaze) | [RealMrHex](https://github.com/RealMrHex) | [0xj0hn](https://github.com/0xj0hn) |


5 changes: 2 additions & 3 deletions init.lua
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
require("core") -- load basic config
require("plugins") -- plugins
require("theme") -- load user configs
require("core") -- load basic configs
require("plugins.ui.theme") -- load theme/color configs
2 changes: 2 additions & 0 deletions lua/core/init.lua
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
-- Basic configs
require("core.basic")
require("core.bindings.bindings")
-- Setup Rocks Package Manager
require("core.rocks")
51 changes: 51 additions & 0 deletions lua/core/rocks.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
do
-- Specifies where to install/use rocks.nvim
local install_location = vim.fs.joinpath(vim.fn.stdpath("data"), "rocks")

-- Set up configuration options related to rocks.nvim (recommended to leave as default)
local rocks_config = {
rocks_path = vim.fs.normalize(install_location),
}

vim.g.rocks_nvim = rocks_config

-- Configure the package path (so that plugin code can be found)
local luarocks_path = {
vim.fs.joinpath(rocks_config.rocks_path, "share", "lua", "5.1", "?.lua"),
vim.fs.joinpath(rocks_config.rocks_path, "share", "lua", "5.1", "?", "init.lua"),
}
package.path = package.path .. ";" .. table.concat(luarocks_path, ";")

-- Configure the C path (so that e.g. tree-sitter parsers can be found)
local luarocks_cpath = {
vim.fs.joinpath(rocks_config.rocks_path, "lib", "lua", "5.1", "?.so"),
vim.fs.joinpath(rocks_config.rocks_path, "lib64", "lua", "5.1", "?.so"),
}
package.cpath = package.cpath .. ";" .. table.concat(luarocks_cpath, ";")

-- Load all installed plugins, including rocks.nvim itself
vim.opt.runtimepath:append(vim.fs.joinpath(rocks_config.rocks_path, "lib", "luarocks", "rocks-5.1", "rocks.nvim", "*"))
end

-- If rocks.nvim is not installed then install it!
if not pcall(require, "rocks") then
local rocks_location = vim.fs.joinpath(vim.fn.stdpath("cache"), "rocks.nvim")

if not vim.uv.fs_stat(rocks_location) then
-- Pull down rocks.nvim
vim.fn.system({
"git",
"clone",
"--filter=blob:none",
"https://github.com/nvim-neorocks/rocks.nvim",
rocks_location,
})
end

-- If the clone was successful then source the bootstrapping script
assert(vim.v.shell_error == 0, "rocks.nvim installation failed. Try exiting and re-entering Neovim!")

vim.cmd.source(vim.fs.joinpath(rocks_location, "bootstrap.lua"))

vim.fn.delete(rocks_location, "rf")
end
41 changes: 0 additions & 41 deletions lua/packages/autocomplete/cmp/autopairs/cmp_autopairs.lua

This file was deleted.

7 changes: 0 additions & 7 deletions lua/packages/autocomplete/cmp/autopairs/init.lua

This file was deleted.

19 changes: 0 additions & 19 deletions lua/packages/autocomplete/cmp/autopairs/main.lua

This file was deleted.

23 changes: 0 additions & 23 deletions lua/packages/autocomplete/cmp/formatting.lua

This file was deleted.

21 changes: 0 additions & 21 deletions lua/packages/autocomplete/cmp/init.lua

This file was deleted.

35 changes: 0 additions & 35 deletions lua/packages/autocomplete/cmp/main.lua

This file was deleted.

8 changes: 0 additions & 8 deletions lua/packages/autocomplete/cmp/snippets/init.lua

This file was deleted.

50 changes: 0 additions & 50 deletions lua/packages/autocomplete/cmp/sources.lua

This file was deleted.

17 changes: 0 additions & 17 deletions lua/packages/autocomplete/lspconfig/init.lua

This file was deleted.

8 changes: 0 additions & 8 deletions lua/packages/autocomplete/trouble/init.lua

This file was deleted.

16 changes: 0 additions & 16 deletions lua/packages/colors/base46.lua

This file was deleted.

10 changes: 0 additions & 10 deletions lua/packages/colors/init.lua

This file was deleted.

32 changes: 0 additions & 32 deletions lua/packages/colors/onedark.lua

This file was deleted.

Loading