updating libraries 💥

This commit is contained in:
Carlos Gutierrez
2026-01-10 14:40:04 -05:00
parent d6f00d0d99
commit 97795e90b3
14 changed files with 405 additions and 131 deletions

View File

@@ -1,5 +1,15 @@
return {
"CarGDev/rest.nvim",
build = function()
-- Install LuaRocks dependencies for Lua 5.1 (Neovim uses LuaJIT which is Lua 5.1 compatible)
local packages = { "mimetypes", "xml2lua" }
for _, pkg in ipairs(packages) do
local result = vim.fn.system("luarocks install --local --lua-version=5.1 " .. pkg .. " 2>&1")
if vim.v.shell_error ~= 0 and not result:match("already installed") then
vim.notify("Warning: Failed to install " .. pkg .. ": " .. result, vim.log.levels.WARN)
end
end
end,
dependencies = {
"nvim-treesitter/nvim-treesitter",
opts = function(_, opts)
@@ -8,6 +18,26 @@ return {
end,
},
config = function()
-- Verify LuaRocks dependencies are available
local function check_dependency(name)
local success = pcall(require, name)
if not success then
vim.notify(
string.format(
"rest.nvim: Missing dependency '%s'. Please run: luarocks install --local %s",
name,
name
),
vim.log.levels.WARN
)
end
return success
end
-- Check for required dependencies
check_dependency("mimetypes")
check_dependency("xml2lua")
-- Basic configuration for rest.nvim
vim.g.rest_nvim = {
-- Enable request highlighting