Replies: 53 comments 4 replies
-
Also I got these errors [rest.nvim] WARN: Unrecognized configs found in setup: { "keybinds.2", "keybinds.1" }
[rest.nvim] Dependency 'lua-curl' was not found. Default HTTP client won't work
[rest.nvim] Dependency 'xml2lua' was not found. rest.nvim will be completely unable to use XML bodies in your requests
[rest.nvim] Dependency 'nvim-nio' was not found. rest.nvim will not work asynchronously
[rest.nvim] Dependency 'mimetypes' was not found. rest.nvim will be completely unable to recognize the file type of external body files |
Beta Was this translation helpful? Give feedback.
-
I added the dependencies to luarocks.nvim and it's working, I use lazy.nvim so this is my config: {
"vhyrro/luarocks.nvim",
opts = {
rocks = { "lua-curl", "nvim-nio", "mimetypes", "xml2lua" }, -- Specify LuaRocks packages to install
},
} |
Beta Was this translation helpful? Give feedback.
-
Thanks, I ll try that. This should be clarified in the documentation. |
Beta Was this translation helpful? Give feedback.
-
This works, but the keybinds options seems like still broken. still have that error message, but it's fine, gotta setup them manually for now |
Beta Was this translation helpful? Give feedback.
-
Hey, I'm very sorry that everything broke, but it was for improvement and it was necessary, nothing will break again! Could you send your keybind setup? I'm busy right now so I can't help much, but as soon as I can I'll take a look. Also thanks @8uff3r for helping there! :) |
Beta Was this translation helpful? Give feedback.
-
It's okay for breaking changes, I like a new result preview, however it is better to make a stable release for the previous version that doesn't break, because I needed to search to the whole commit history just to make everything works as the previous one again. Anyway, here is my config options: opts = {
client = "curl",
env_file = ".env",
env_pattern = "\\.env$",
env_edit_command = "tabedit",
encode_url = true,
skip_ssl_verification = false,
custom_dynamic_variables = {},
logs = {
level = "info",
save = true,
},
highlight = {
enable = true,
timeout = 750,
},
result = {
split = {
in_place = false,
horizontal = false,
stay_in_current_window_after_split = true,
},
behavior = {
decode_url = true,
show_info = {
url = true,
headers = true,
http_info = true,
curl_command = true,
},
formatters = {
json = "jq",
html = function(body)
if vim.fn.executable("tidy") == 0 then
return body, { found = false, name = "tidy" }
end
local fmt_body = vim.fn.system({
"tidy",
"-i",
"-q",
"--tidy-mark", "no",
"--show-body-only", "auto",
"--show-errors", "0",
"--show-warnings", "0",
"-",
}, body):gsub("\n$", "")
return fmt_body, { found = true, name = "tidy" }
end,
},
},
},
keybinds = {
{ "<localleader>rr", "<cmd>Rest run<cr>", "Run request under the cursor", },
{ "<localleader>rl", "<cmd>Rest run last<cr>", "Re-run latest request", },
}
}, I just pasted everything from the default config based on the new README. |
Beta Was this translation helpful? Give feedback.
-
I leave this comment here, just in case anyone else that want to revert to previous version. |
Beta Was this translation helpful? Give feedback.
-
You can use lazy.nvim to setup your keybinds with {
"rest-nvim/rest.nvim",
keys = {
{ "<leader>rr", "<cmd>Rest run<cr>", desc = "Run REST request" },
},
}, |
Beta Was this translation helpful? Give feedback.
-
In the repository there are tags and semantic releases that you can use in your plugin manager to rollback to the previous stable release :) Now, that bug is a little weird, I'll definitely take a look at it as soon as I get home, thanks for reporting it and also for providing a commit in case someone wants to rollback that way, that is appreciated. |
Beta Was this translation helpful? Give feedback.
-
Oh, my bad, I didn't check the release tags, haha. Sorry for that |
Beta Was this translation helpful? Give feedback.
-
@radvil I think I fixed the |
Beta Was this translation helpful? Give feedback.
-
btw @8uff3r, does your lazy's install = {
missing = true,
} |
Beta Was this translation helpful? Give feedback.
-
No I don't have that in my config but I according to lazy's docs it should be the default |
Beta Was this translation helpful? Give feedback.
-
Could you please tell me what I am doing wrong? I keep getting the same OP errors with this configuration in Lazyvim:
|
Beta Was this translation helpful? Give feedback.
-
In your luarocks.nvim config, you should remove this part: config = function()
require("luarocks").setup({})
end, So that it would be like this: {
"vhyrro/luarocks.nvim",
opts = {
rocks = { "lua-curl", "nvim-nio", "mimetypes", "xml2lua" },
},
} The removed part is overriding the |
Beta Was this translation helpful? Give feedback.
-
@mesa123123 pushed a fix which I think might resolve the issue! As usual remove the luarocks.nvim and rest.nvim plugins with |
Beta Was this translation helpful? Give feedback.
-
Heres what pops up for me: I'm not sure what the go is sadly :/ |
Beta Was this translation helpful? Give feedback.
-
Tried to install luarocks on its own and then rest and still same error popping up :/ |
Beta Was this translation helpful? Give feedback.
-
Hey @mesa123123, just noticed I had to modify the |
Beta Was this translation helpful? Give feedback.
-
No dice sorry :/ Maybe its my config? |
Beta Was this translation helpful? Give feedback.
-
Also no need to apologise! This is part of being in open source! All part of it :D |
Beta Was this translation helpful? Give feedback.
-
OK so I think I got it working: Basically I've added paths to my package path so nvim knows where to look for my paths: -- Package Path Upgrade
----------
-- Rocks installed through luarocks.nvim
package.path = package.path .. ";" .. plugin_path .. "/luarocks.nvim/.rocks/share/lua/6.1/?.lua;"
package.path = package.path .. ";" .. plugin_path .. "/luarocks.nvim/.rocks/share/lua/5.1/?/?.lua;"
-- Rocks installed through local luarocks
package.path = package.path .. ";" .. fn.expand("$HOME") .. "/.luarocks/share/lua/5.1/?/init.lua;"
package.path = package.path .. ";" .. fn.expand("$HOME") .. "/.luarocks/share/lua/5.1/?.lua;"
---------- And it seems to work now! Or at least my errors are all about treesitter!
Thats the output I get when I open a .http file |
Beta Was this translation helpful? Give feedback.
-
I arrive a little later, but I figure out a way to make it works on macOS using previous comments and advice. {
"vhyrro/luarocks.nvim”,
-- explicit tell Lazy the module name due to error on calling
-- the module with the suffix ‘.nvim’; in this way Lazy will call < require “luarocks”.setup({}) >
name = "luarocks”,
config = true
},
{
"rest-nvim/rest.nvim",
dependencies = { "luarocks" },
ft = { "http", "https" },
config = function(_, o)
require "rest-nvim".setup(o)
end
} With this config all the build and installation is done correctly. |
Beta Was this translation helpful? Give feedback.
-
with all the breaking changes, it would be nice to have documentation on how to migrate from the previous setup |
Beta Was this translation helpful? Give feedback.
-
I seem to be getting an error as well. Not sure if it's related to this new release but sharing just in case. I am also stuck trying to get past it. Here is the error message. It seems to be a tree-sitter parsing issue but cannot for the life of me get passed this.
I should say that I've also tried several other iterations of configs setup that have been suggested in this thread, all with the same result. |
Beta Was this translation helpful? Give feedback.
-
Check trailing spaces in your http file, delete them even in |
Beta Was this translation helpful? Give feedback.
-
@cyaconi I have made sure that all of the white space has been cleared, there were none so unfortunately that isn't the issue :/ |
Beta Was this translation helpful? Give feedback.
-
@nezudevv try to change {
"vhyrro/luarocks.nvim”,
name = ‘luarocks’,
opts = {
rocks = { "lua-curl", "nvim-nio", "mimetypes", "xml2lua" }
}
} Before reloading this config, in the If this is not working, try to send here the content of the file you’re trying to run via |
Beta Was this translation helpful? Give feedback.
-
Hi there, I'm sorry for the disappearance here. Life has been a little busy and unmotivated lately. I'm really thinking about dropping any lazy support in
I want to focus on continuing to integrate missing features from previous versions, add new ones and fix existing bugs during my free time, and focusing on this prevents me from working on it. However, I want to package If anyone comes up with a reproducible way to fix the lazy issues and can submit a PR with updated instructions, I'll be more than happy to accept it, but I personally won't do it due to the reasons above.
No, yes you will be able to do it. Only you will have to set your version to the latest v1 that came out. In case there is a critical bug in that version I will create a new branch to fix it and maintain that version separately, but there is nothing more I can do on my part with it. Apologies and thank you for understanding, I really wish this were all simpler, but folke is not interested in luarocks so support in lazy.nvim is a hijack that I myself cannot improve :( |
Beta Was this translation helpful? Give feedback.
-
I'm a Iazyvim user and had trouble setting v2 up. I followed these instructions: #348 (comment) and ended up with this configuration: return {
{
"vhyrro/luarocks.nvim",
branch = "go-away-python",
opts = {
rocks = { "lua-curl", "nvim-nio", "mimetypes", "xml2lua" }, -- Specify LuaRocks packages to install
},
},
{
"rest-nvim/rest.nvim",
event = "VeryLazy",
ft = { "http" },
dependencies = {
{
"luarocks.nvim",
},
{
"folke/which-key.nvim",
optional = true,
opts = {
defaults = {
["<leader>r"] = { name = "+rest" },
},
},
},
},
config = function()
require("rest-nvim").setup()
require("telescope").load_extension("rest")
end,
keys = {
{ "<leader>rr", "<cmd>Rest run<cr>", desc = "Run rest http request under cursor" },
{ "<leader>re", "<cmd>Telescope rest select_env<cr>", desc = "Select environment file for rest testing" },
},
},
} Now everything is working fine! |
Beta Was this translation helpful? Give feedback.
-
Seems like the neweset version breaks everything, all dependencies, options,everything.
Can you make a new branch associated to previous version before the breaking changes ??
It's so pain in the ass to re adjusting my configuration, like I dont have time.
Please make a new branch. Thanks
Beta Was this translation helpful? Give feedback.
All reactions