Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

V2.0 not running asynchronously #357

Open
kevintraver opened this issue Apr 12, 2024 · 5 comments
Open

V2.0 not running asynchronously #357

kevintraver opened this issue Apr 12, 2024 · 5 comments

Comments

@kevintraver
Copy link
Contributor

kevintraver commented Apr 12, 2024

When using the latest version (2.0), neovim completely locks up until the request has finished:

GET https://httpbin.org/delay/10

Config:

MacOS : 14.4.1
Neovim: 0.9.5
LuaJIT: 2.1.1710088188

init.lua:

local root = vim.fn.fnamemodify("./.repro", ":p")

-- set stdpaths to use .repro
for _, name in ipairs({ "config", "data", "state", "cache" }) do
  vim.env[("XDG_%s_HOME"):format(name:upper())] = root .. "/" .. name
end

-- bootstrap lazy
local lazypath = root .. "/plugins/lazy.nvim"
if not vim.loop.fs_stat(lazypath) then
  vim.fn.system({ "git", "clone", "--filter=blob:none", "https://github.com/folke/lazy.nvim.git", lazypath })
end
vim.opt.runtimepath:prepend(lazypath)

-- install plugins
local plugins = {
  {
    "vhyrro/luarocks.nvim",
    priority = 1000,
    config = true,
  },
  {
    "nvim-treesitter/nvim-treesitter",
    config = true,
    build = ":TSUpdate",
  },
  {
    "rest-nvim/rest.nvim",
    ft = "http",
    tag = "v2.0.1",
    dependencies = { "luarocks.nvim", "nvim-treesitter" },
    config = function()
      require("rest-nvim").setup()
    end,
  },
}
require("lazy").setup(plugins, {
  root = root .. "/plugins",
})
@NTBBloodbath
Copy link
Member

Hi, is nvim-nio installed? Please send the output of :checkhealth rest-nvim as well and I'll take a look at it asap :)

@kevintraver
Copy link
Contributor Author

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 `lua-curl` was found
- OK Dependency `nvim-nio` was found
- OK Dependency `xml2lua` was found
- OK Dependency `mimetypes` 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

@kevintraver
Copy link
Contributor Author

I also tested the latest version of Neovim v0.10.0-dev-2893+g328a23735-Homebrew but still encounter the same issue.

@daniilrozanov
Copy link
Contributor

Same thing happens for me. :checkhealth rest-nvim is ok, latest v0.10... neovim. Queries that take long time freeze neovim

@egiw
Copy link

egiw commented May 8, 2024

Hi, thank you for this great plugin and the latest update is awesome. I experienced it too while running a Go debugger. When it hits breakpoint it freezes and I can't do anything other than force close the terminal. Have tried to open on separate terminal, it also freezes until I continue the debug breakpoint.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants