qvacua / vimr

VimR — Neovim GUI for macOS in Swift
https://twitter.com/VimRefined
MIT License
6.64k stars 218 forks source link

Four arguments required for VimR's NvimServer #902

Closed pitkling closed 2 years ago

pitkling commented 2 years ago

When using VimR together with vimtex, I stumbled upon an issue described here lervag/vimtex#2323. It turns out that the NvimServer binary packaged with VimR (on my system under /Applications/VimR.app/Contents/Resources/NvimView_NvimView.bundle/Contents/Resources/NvimServer) for some reason requires always at least four arguments. For example, even when I call .../NvimServer --help I get the following output

We need at least 4 arguments! Printing --version and exiting...
NVIM v0.6.1
Build type: Release
LuaJIT 2.1.0-beta3
Compiled by runner@Mac-1641133962346.local

Features: +acl +iconv -tui
See ":help feature-compile"

   system vimrc file: "$VIM/sysinit.vim"
  fall-back for $VIM: "/usr/local/share/nvim"

Run :checkhealth for more info

Funny enough, calling .../NvimServer --help --help --help --help does actually work.

Does VimR use a customized NvimServer binary here that introduced this strange behavior, or where does that come from? Any ideas or pointers?

qvacua commented 2 years ago

Yes, VimR does not use a "vanilla" Neovim binary, but a binary (with the name NvimServer) which includes Neovim as a static library, libnvim. As such, it needs custom arguments when launching. If you have more questions, please feel free to re-open the issue.

pitkling commented 2 years ago

Thanks for the explanation, no need to keep this open. I was mostly confused since I could not really find any information about the custom arguments for NvimServer. Anyway, my original issue (vimtex detected your NvimServer as the nvim binary and tried to use standard arguments for inverse searching in LaTeX documents) could be resolved using a custom configuration in vimtex.