neovim-gtk icon indicating copy to clipboard operation
neovim-gtk copied to clipboard

NGTransparency not recognized

Open pbartyik opened this issue 5 years ago • 5 comments

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):

  • OS: Ubuntu 18.14 LTS @ linux 4.15.0-45-generic / compton v5.1
  • Neovim version: v0.3.1
  • Neovim-Gtk build version: 0.2.0, latest commit c075c3232fd7cc3c8c95f5a5f93d7273cb661398

pbartyik avatar Feb 28 '19 16:02 pbartyik

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.

davidsierradz avatar Feb 28 '19 19:02 davidsierradz

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.

pbartyik avatar Mar 01 '19 07:03 pbartyik

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

mcepl avatar Apr 08 '19 05:04 mcepl

: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.

Lythenas avatar May 22 '19 11:05 Lythenas

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).

virtadpt avatar Nov 01 '23 05:11 virtadpt