pappasam / nvim-repl

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Error with :ReplOpen, :ReplClose/:ReplToggle closes current buffer when called after closing REPL

samuel-zuk opened this issue · comments

When I use :ReplOpen, I get the following error:

Error detected while processing function repl#toggle[2]..repl#open[27]..<SNR>102_setup:                                                                                                                     
line    2:
E216: No such group or event: WinClosed <buffer> call s:cleanup()
repl: opened!

The REPL does open correctly, and calling :ReplClose or :ReplToggle after it opens does in fact work. But calling either :ReplClose or :ReplToggle afterwards closes whatever buffer is currently open (or closes nvim if it is the last buffer open). When calling :ReplOpen after :ReplClose, I get the error "repl: already open. To close existing repl, run ":ReplClose"".

Further info:

nvim -version output:

NVIM v0.4.3                                  
Build type: Release                                
LuaJIT 2.1.0-beta3                                
Compilation: /usr/bin/cc -g -O2 -fdebug-prefix-map=/build/neovim-gOb7vg/neovim-0.4.3=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=1 -D                                
DISABLE_LOG -Wdate-time -D_FORTIFY_SOURCE=1 -O2 -DNDEBUG -DMIN_LOG_LEVEL=3 -Wall -Wextra -pedantic -Wno-unused-parameter -Wstrict-prototypes -std=gnu99 -Wshadow -Wconversion -Wmis                                
sing-prototypes -Wimplicit-fallthrough -Wvla -fstack-protector-strong -fdiagnostics-color=always -DINCLUDE_GENERATED_DECLARATIONS -D_GNU_SOURCE -DNVIM_MSGPACK_HAS_FLOAT32 -DNVIM_U                                
NIBI_HAS_VAR_FROM -I/build/neovim-gOb7vg/neovim-0.4.3/build/config -I/build/neovim-gOb7vg/neovim-0.4.3/src -I/usr/include -I/usr/include/lua5.1 -I/build/neovim-gOb7vg/neovim-0.4.3                                
/build/src/nvim/auto -I/build/neovim-gOb7vg/neovim-0.4.3/build/include                                
Compiled by team+vim@tracker.debian.org                                                                                                                                                                            
                                                                                                                                                                                                                   
Features: +acl +iconv +tui                                                                                                                                                                                         
See ":help feature-compile"                                                                                                                                                                                        
                                                                                                                                                                                                                   
   system vimrc file: "$VIM/sysinit.vim"                                                                                                                                                                           
  fall-back for $VIM: "/usr/share/nvim"                                                                                                                                                                            
                                                                                                                                                                                                                   
Run :checkhealth for more info               
  • OS: Ubuntu 20.04.4 LTS x86_64
  • Kernel: 5.4.0-110-generic
  • Shell: zsh 5.8
  • Running on a KVM+QEMU VM, accessing nvim thru ssh.

Host info:

  • OS: RHEL 8.5
  • Kernel: 4.18.0-348.20.1.el8_5.x86_64
    Plugin installed via vim-plug

Edit: just tried simplifying my init.vim setup down to essentially just the lines that tells vim-plug to load nvim-repl and vim-repeat and the error persisted.

Looks like your issue is that you're using a version of neovim below 0.5.0 (0.4.3). As documented in the first line of the README, this package only supports neovim versions greater than or equal to 0.5.0.