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

bug: proxy timeout #258

Closed
3 tasks done
ranebrown opened this issue Dec 30, 2022 · 7 comments · Fixed by #263
Closed
3 tasks done

bug: proxy timeout #258

ranebrown opened this issue Dec 30, 2022 · 7 comments · Fixed by #263
Labels
bug Something isn't working

Comments

@ranebrown
Copy link

Did you check docs and existing issues?

  • I have read all the lazy docs
  • I have searched the existing issues of lazy
  • I have searched the exsiting issues of the plugin I have a problem with

Neovim version (nvim -v)

v0.9.0-dev-3dadd3aca

Operating system/version

MacOS 12.6.2

Describe the bug

When a proxy is set and it can't be reached the cloning of plugins on startup will hang for whatever the git timeout value is set to before failing. There is no way to cancel the operation or exit nvim until the timeout occurs.

Steps To Reproduce

  1. Set a proxy server that needs to also be reached through a VPN server
  2. Attempt to install plugins while not connected to the VPN

Expected Behavior

A q mapping to cancel the clone prior to the timeout.

Repro

-- DO NOT change the paths and don't remove the colorscheme
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",
    "--single-branch",
    "https://github.com/folke/lazy.nvim.git",
    lazypath,
  })
end
vim.opt.runtimepath:prepend(lazypath)

-- install plugins
local plugins = {
  "folke/tokyonight.nvim",
  -- add any other plugins here
}
require("lazy").setup(plugins, {
  root = root .. "/plugins",
})

vim.cmd.colorscheme("tokyonight")
-- add anything else here
@ranebrown ranebrown added the bug Something isn't working label Dec 30, 2022
@folke
Copy link
Owner

folke commented Dec 30, 2022

This is too specific. Won't add anything special for that.

@folke folke closed this as not planned Won't fix, can't repro, duplicate, stale Dec 30, 2022
@ranebrown
Copy link
Author

Why I ran into this is specific but there could be other reasons that would cause a clone to hang. Requiring waiting for the timeout with no option to cancel seems silly.

@folke
Copy link
Owner

folke commented Dec 30, 2022

You can just lower the timeout

@folke
Copy link
Owner

folke commented Dec 30, 2022

<c-c> might also work

@ranebrown
Copy link
Author

<c-c> or any other keys I've tried don't work. I'm just stuck on the lazy window with no option to escape which seems wrong to me. If I want to abort I think there should be an option for that. That being said, I can probably find a lower timeout value that makes it bearable.

@folke folke reopened this Dec 31, 2022
@folke folke closed this as completed in d6b5d6e Dec 31, 2022
@folke
Copy link
Owner

folke commented Dec 31, 2022

You can now press <c-c> in the ui to abort running tasks

@ranebrown
Copy link
Author

Thanks! Works great.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants