gonvim
gonvim copied to clipboard
`has('gui_running')` and `has('gui')` should return true
These options should return true, but it doesn't at the moment.
I think to use https://github.com/dzhou121/gonvim/issues/17 and ginit.vim is better.
https://github.com/equalsraf/neovim-qt/issues/219
Interesting to know that.
Either way, I think it should be supported because there are plugins that use it. For example, tabfold checks is the gui is running for it to choose the mapping it's going to use.
This is to be expected, the GUI only opens AFTER init.vim has been processed, so it cannot handle the font change in init.vim.
Instead put those commands in .config/nvim/ginit.vim - all GUI related options and commands should work there.
What about the case where some plugins should not be loaded when gui running such as vim-airline. How can we achieve that by using ginit.vim?
@SuperBo You could define an UnPlug
command, e.g. https://github.com/thoughtbot/dotfiles/blob/c0317cedb012de5fdc3ad4aa2419f8df650dec77/vimrc.bundles#L5-L11
@SuperBo You could define an
UnPlug
command, e.g. https://github.com/thoughtbot/dotfiles/blob/c0317cedb012de5fdc3ad4aa2419f8df650dec77/vimrc.bundles#L5-L11
This is not an adequate solution. There are certain plugins or commands which might cause an error or slow down the startup when they are run during initialization for nvim-qt. For now, a workaround is to wrap nvim-qt with a script that passes a variable letting your init.vim know it's a GUI session:
nvim-qt $@ -- --cmd 'let g:GuiStartup="true"'
in my case, my init.vim checks for the terminal its running in to see if it's konsole, if it is konsole, then it adjusts the color scheme based on the konsole profile. This causes a problem if I run nvim-qt from inside konsole, because the konsole environment gets passed on and there is no way of telling whether the init.vim is running for a TUI session or a GUI session.
I'm sure other issues can occur as well, and considering how easy this is to fix, it's not something we should pass of by saying "use ginit.vim" or "use unplug," because neither of those solutions is actually the same as this.