From 5c09e6fe71f4bb930eeffe24d45762fa3ffada4e Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Thu, 6 Nov 2025 10:24:29 +0100 Subject: [PATCH] fix(luarocks): proper parsing of dependency name. Closes #2086 --- lua/lazy/pkg/rockspec.lua | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lua/lazy/pkg/rockspec.lua b/lua/lazy/pkg/rockspec.lua index e8ece1b..af13ad1 100644 --- a/lua/lazy/pkg/rockspec.lua +++ b/lua/lazy/pkg/rockspec.lua @@ -285,7 +285,10 @@ function M.get(plugin) ---@param dep string local rocks = vim.tbl_filter(function(dep) - local name = dep:gsub("%s.*", "") + local name = dep:match("^%s*([^~><=%s]+)") + if not name then + return false + end local url = Community.get_url(name) local spec = Community.get_spec(name)