daa84 / neovim-gtk

gtk ui for neovim
GNU General Public License v3.0
716 stars 57 forks source link

Configuration: Channel 1 does not exist on regular nvim (rpcnotify) #141

Closed sebastien closed 5 years ago

sebastien commented 5 years ago

I have the following snippet in my init.vim:

call rpcnotify(1, 'Gui', 'FontFeatures', 'PURS, cv17')
call rpcnotify(1, 'Gui', 'Font', 'Iosevka Term 15')

The problem is that with console version of nvim, I get an error:

E475: Invalid argument: Channel doesn't exist

Replacing the channel number from 1 to 0 prevents the error, but then nvim-gtk does not receive it. I can't find any nvim API to detect if a channel is open, so is there a way to detect that either we're running nvim-gtk or that the channel 1 is available? Thanks!

Anrock commented 5 years ago

See https://github.com/daa84/neovim-gtk/wiki/Configuration#configuration

sebastien commented 5 years ago

Right, using the guard works, but I was just curious about detecting the channel. Maybe that question is for neovim rather than neovim-gtk. Thanks!