diff --git a/lua/sourcer/init.lua b/lua/sourcer/init.lua index 9a4da45..3612b9f 100644 --- a/lua/sourcer/init.lua +++ b/lua/sourcer/init.lua @@ -4,18 +4,16 @@ function M.lookup() local keywords = vim.fn.getreg("*") -- receive yanked text local url = "https://dl.acm.org/action/doSearch?AllField=" .. keywords - print("Entering the function") - -- Setup a http socket and request - local command = string.format("curl -s '%s'", "https://nickr.eu") + local command = string.format("curl -s '%s'", url) -- Execute the curl command and capture its output local handle = io.popen(command) local response = handle:read("*a") handle:close() - print("Test") - print(keywords) + print("Keywords: " .. keywords) + print("URL: " .. url) print("Response: " .. response) end