Neovim-qt: Add global sentinel variable to identify neovim-qt

Created on 31 Aug 2018  路  3Comments  路  Source: equalsraf/neovim-qt

The idea is to introduce a variable (say, g:NvimQt) such that g:NvimQt == 1 when neovim is launched with nvim-qt. This allows for nvim-qt specific customization.

See this comment.

Most helpful comment

Nvim 0.3.x has nvim_get_chan_info(). When a UI connects it can call nvim_set_client_info() to set the "client" field of nvim_get_chan_info().

It would be strongly preferred for Nvim-Qt to do this instead of adding another special-case variable. This gives users a common mechanism for discovering info about connects clients/UIs.

All 3 comments

Nvim 0.3.x has nvim_get_chan_info(). When a UI connects it can call nvim_set_client_info() to set the "client" field of nvim_get_chan_info().

It would be strongly preferred for Nvim-Qt to do this instead of adding another special-case variable. This gives users a common mechanism for discovering info about connects clients/UIs.

Set channel info in #458. I also added a GuiName function you can use in ginit.vim. Try something like this.

if GuiName() == 'nvim-qt'
    echom "Oh no ..."
endif

Closing this - it is now available with the latest version.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

gagbo picture gagbo  路  6Comments

gwerbin picture gwerbin  路  10Comments

HelloKashif picture HelloKashif  路  5Comments

stu0292 picture stu0292  路  3Comments

augustblizzard picture augustblizzard  路  6Comments