glow.nvim icon indicating copy to clipboard operation
glow.nvim copied to clipboard

Neovim hangs right after running :Glow file

Open gvolpe opened this issue 2 years ago • 7 comments

Describe the bug

  • Neovim version: v0.9.0-dev-cbd4480
  • glow.nvim version: Latest main, commit a3f24fd
  • OS: NixOS 23.05.20230317.b573a7f (Stoat) x86_64

Configuration:

require('glow').setup({
  glow_path = "/nix/store/iakavyzx55i95i2ysylnfdm3xn8d21k1-glow-1.5.0/bin/glow",
  border = "shadow", 
  pager = true,
  width = 120,
})

To Reproduce Steps to reproduce the behavior:

  1. Run :Glow file.md and the file is displayed on a floating window.
  2. Neovim becomes unresponsive to further inputs, can't even close the floating window.

There are no logs under ~/.cache/nvim/log, so I'm not sure how to debug this. Any ideas?

Expected behavior It should not hang.

gvolpe avatar Mar 29 '23 16:03 gvolpe

hey @gvolpe by "hangs" what do you mean exactly? Does it open a floating window with nothing inside? Does it freezes the editor and you can't type anything?

ellisonleao avatar Mar 30 '23 00:03 ellisonleao

@ellisonleao apologies for the poor description. I've made a video to demonstrate the issue:

https://user-images.githubusercontent.com/443978/228772545-8c218c19-29cc-40a7-9e71-1d151831d443.mp4

gvolpe avatar Mar 30 '23 08:03 gvolpe

I have this problem too.

johnmathews avatar Apr 01 '23 15:04 johnmathews

Could you @gvolpe try turning off pager, so set pager = false?

I also get an unresponsive window when turning on the pager option. It works fine when this is turned off (by default).

For debugging:

  • When I mouse click in the unresponsive window (so with pager = true), it unfreezes and is responsive to further keyboard typing.
  • It also start the Glow window with the cursor at the bottom t seems.
  • Defining other variables does not freeze the window

JMulder99 avatar Apr 06 '23 21:04 JMulder99

@JMulder99 I can confirm pager = false fixes the issue. I have the mouse completely disabled on Neovim, so I never tried clicking.

gvolpe avatar Apr 07 '23 09:04 gvolpe

I also have this issue using the newly released v0.9.0. I noticed that when it freezes my status line section that displays which mode I'm in (Normal, Insert, etc) says 'Terminal'. Once I click the window with my mouse it changes to 'Normal' and becomes responsive again.

Can confirm the 'pager' solution did work for me.

jimigrunge avatar Apr 12 '23 13:04 jimigrunge

There's also some interaction with some :terminal settings. I can <C-\><C-n> to get cursor in and then q or Esc work.

junkblocker avatar Jun 06 '23 18:06 junkblocker