daa84 / neovim-gtk

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

NGTransparency not recognized #181

Open pbartyik opened 5 years ago

pbartyik commented 5 years ago

The command :NGTransparency .5 .5 Yields

E492: Not an editor command: NGTransparency .5 .5

As per wiki I think it should work.

Technical information (please complete the following information):

davidsierradz commented 5 years ago

Check this

From neovim-gtk-git AUR package, it copies to /usr/share/nvim-gtk/runtime/nvim_gui_shim.vim, neovim doesn't source this directory by itself, check #13,

Find if this file is in your system and run :scriptnames inside neovim, see help 'runtimepath'

Look for /usr/share/nvim-gtk/runtime/nvim_gui_shim.vim https://github.com/daa84/neovim-gtk/blob/c075c3232fd7cc3c8c95f5a5f93d7273cb661398/runtime/plugin/nvim_gui_shim.vim#L62

Try to link to /usr/share/nvim/runtime/plugin:

sudo ln -s /usr/share/nvim-gtk/runtime/nvim_gui_shim.vim /usr/share/nvim/runtime/plugin

and restart nvim-gtk.

pbartyik commented 5 years ago

Seems that /usr/share/nvim-gtk/runtime/nvim_gui_shim.vim is hard coded, as I installed it with PREFIX=~/nvim-gtk.

find . | grep gui ./share/nvim-gtk/runtime/plugin/nvim_gui_shim.vim

:source -ing the file manually does enable the command. This seems to set the transparency only towards the configured :highlight normal guibg color, but if it is set to none, it uses black instead of the desktop background.

mcepl commented 5 years ago

Isn't it a better idea just to add /usr/share/nvim-gtk/runtime/ to runtimepath ?

Lythenas commented 5 years ago

:source -ing the file manually does enable the command.

That doesn't work for me. I get E746: Function name does not match script file name: provider#clipboard#Call (but I'm setting s:GuiInternalClipboard).

Linking the file like @davidsierradz suggested works. But that also makes the commands available in console nvim and they (obviously) fail when executed.

virtadpt commented 8 months ago

For some reason, adding source /usr/share/nvim-gtk/runtime/nvim_gui_shim.vim to my ~/.config/init.vim file doesn't work, either. It doesn't show up in the output of :scriptnames (though my ~/.vimrc file, which is included by sourceing in ~/.config/init.vim does).