Closed Demianeen closed 4 months ago
This is also the case for me, but I found a work around for my system. I looked at the Neovim :checkhealth rest-nvim
entries for rest-nvim and manually installed all the dependencies mentioned in the opts
table using luarocks
.
cd $HOME
luarocks --local --lua-version=5.1 install xml2lua
luarocks --local --lua-version=5.1 install lua-curl
luarocks --local --lua-version=5.1 install mimetypes
This should create a directory in your home called ~/.luarocks
and neovim should not emit any more errors afterwards.
Because I use Arch Linux
my Lua version is updated to 5.4
but I think this plugin requires Lua version 5.1
according to the error logs. Not sure though.
Error: Failed installing dependency: https://luarocks.org/lua-curl-0.3.13-1.src.rock - Build error: Lua header lua.h found at /usr/include does not match Lua version 5.1. You can use
luarocks config variables.LUA_INCDIR <path>
to set the correct location.
Thanks! I checked the health of rest.nvim and found that it installs xml2lua:
==============================================================================
rest-nvim: require("rest-nvim.health").check()
Installation ~
- OK Found `luarocks` installed in your system
- OK Found Luarocks PATHs in your Neovim's Lua `package.path`
- OK Dependency `nvim-treesitter` was found
- OK Dependency `mimetypes` was found
- OK Dependency `xml2lua` was found
- OK Dependency `nvim-nio` was found
- OK Dependency `lua-curl` was found
- OK Tree-sitter `http` parser is installed
Configuration ~
- OK No unrecognized configuration options were found
- OK Formatter for `html` is set to `tidy` and rest.nvim found it in your system
- OK Formatter for `json` is set to `jq` and rest.nvim found it in your system
But when I make a request I still get the same error:
GET http://localhost:8080/
HTTP/1.1 200 OK
#+RES
Config: missing or malformed argument for option: show-body-only
Error: Can't open "auto"
#+END
There was a similar issue but they solved it by manually setting luarocks to install. Which I also do in the configuration above.
Do you know what I can look into next to solve the issue?
Sorry I don't know, so far the plugin works perfectly for me. I tried to do the same query as you, but with https://google.com
GET https://www.google.com
The response was OK, so I'm not sure if this is still a problem relevant to the plugin itself. Maybe it's related the web app your interfacing with, but I still haven't done any POST requests with JSON bodies so, I don't know.
Get the same issue, just fresh install with lazyvim. Healthcheck also give
rest-nvim: require("rest-nvim.health").check()
Installation ~
- OK Found `luarocks` installed in your system
- OK Found Luarocks PATHs in your Neovim's Lua `package.path`
- OK Dependency `mimetypes` was found
- OK Dependency `nvim-treesitter` was found
- OK Dependency `xml2lua` was found
- OK Dependency `nvim-nio` was found
- OK Dependency `lua-curl` was found
- OK Tree-sitter `http` parser is installed
Configuration ~
- OK No unrecognized configuration options were found
- OK Formatter for `json` is set to `jq` and rest.nvim found it in your system
- OK Formatter for `html` is set to `tidy` and rest.nvim found it in your system
And yes, the same response.
Ok, fixed for me by updating tidy
brew update
brew install tidy-html5
@Kryvonis, fixed it for me!
After update rest.nvim stopped working for me and I found that it don't work for me even with minimal repro of default setup:
Take a look:
https://github.com/rest-nvim/rest.nvim/assets/51330172/5c1ed09d-510f-469f-8ef3-30bffb39210c
nvim version:
Have I done something wrong?