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

conflict with goyo [vimade#Redraw[6]] #70

Open
YuCao16 opened this issue Jan 11, 2022 · 3 comments
Open

conflict with goyo [vimade#Redraw[6]] #70

YuCao16 opened this issue Jan 11, 2022 · 3 comments

Comments

@YuCao16
Copy link

YuCao16 commented Jan 11, 2022

Hi,
Thanks for your work, it works unbelievable well.
It seems not capable with Goyo, however, if I type :Goyo, it was fine, but when I quit Goyo by typing :Goyo!, it raise me this error:

Error detected while processing function vimade#Redraw[6]..provider#python3#Call:
line   18:
Error invoking 'python_execute' on channel 4 (python3-script-host):
Traceback (most recent call last):
  File "<string>", line 2, in <module>
  File "/Users/caoyu/.config/nvim/autoload/plugged/vimade/lib/vimade/bridge.py", line 14, in unfadeAll
    fader.unfadeAll()
  File "/Users/caoyu/.config/nvim/autoload/plugged/vimade/lib/vimade/fader.py", line 334, in unfadeAll
    unfadeAllSigns()
  File "/Users/caoyu/.config/nvim/autoload/plugged/vimade/lib/vimade/fader.py", line 320, in unfadeAllSigns
    signs.unfade_bufs(list(currentBuffers.values()))
  File "/Users/caoyu/.config/nvim/autoload/plugged/vimade/lib/vimade/signs.py", line 35, in unfade_bufs
    buf_signs = util.eval_and_return('[' + ','.join(['get(getbufinfo('+x.bufnr+')[0], \'signs\', [])' for x in bufs ]) + ']')
  File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/pynvim/plugin/script_host.py", line 205, in eval
    obj = self.request("vim_eval", expr)
  File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/pynvim/api/nvim.py", line 182, in request
    res = self._session.request(name, *args, **kwargs)
  File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/pynvim/msgpack_rpc/session.py", line 102, in reques
t
    raise self.error_wrapper(err)
pynvim.api.common.NvimError: Vim:E684: list index out of range: 0

I'm using:
neovim==0.6.0
goyo==1.6.0(???)
vimade==0.0.5,

I saw there is a related commits dad8122, but I don't have any clues how to fix it. Can anyone help?

@YuCao16
Copy link
Author

YuCao16 commented Jan 11, 2022

Actually, I have found a less elegant solution, if I quit Goyo by :q and type :so ~/.config/nvim/init.vim, it will return to the origin window. The reason I refresh init.vim is I set background transparent and it can restart Vimade, as well.
However, if possible, it is still hoped that other solutions can be found, Thanks!

@TaDaa
Copy link
Owner

TaDaa commented Jan 12, 2022

Latest update should fix this error, let me know if not

@YuCao16
Copy link
Author

YuCao16 commented Jan 12, 2022

It works, thanks for your help!

In case some people also use transparent background, with amazing Vimade and Goyo,

function! s:QuitGoyo()
    hi Normal guibg=NONE ctermbg=NONE
    hi NonText ctermbg=NONE guibg=NONE
endfunction
autocmd! User GoyoLeave nested call <SID>QuitGoyo()

this function above will reset background when you quit Goyo.

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

2 participants