hismailbulut / Neoray

Simple and lightweight GUI client for Neovim
MIT License
148 stars 5 forks source link

The `--version` flag is passed to nvim, so it is not a way to figure out version of neoray #15

Closed bunyk closed 3 years ago

bunyk commented 3 years ago

Describe the bug --version flag is passed to nvim, it probably prints version to stdout and exits, but neoray still tries to establish rpc session with it.

I would expect it to output version of nvim.

Steps to reproduce

Just start it with --version and observe error logs:

tbunyk@ZALANDO-33620:~/projects/neoray$ bin/neoray_debug --version
[DEBUG] [NVIM] Neovim started with command: nvim --embed --version
[ERROR] [NVIM] Failed to get api information: msgpack/rpc: session closed
[ERROR] [NVIM] Failed to set client information: msgpack/rpc: session closed
[ERROR] [NVIM] Failed to execute scripts.vim: msgpack/rpc: session closed
[FATAL] [NVIM] Attaching ui failed: msgpack/rpc: session closed
bunyk commented 3 years ago

I just figured out that -h flag shows a window with the version. Maybe --version should do the same. Or it would be nice to print it also to terminal, because in that window it's impossible to copy that information to paste in bug tickets.

hismailbulut commented 3 years ago

Ok I accept. I did it like this because I am using windows and gui programs in windows prints it like this. Printing both messagebox and stdout may good but in linux only stdout will be usefull and in windows only messagebox. Maybe --version only prints the version and exits, on linux only to stdout and on windows only to messagebox. I dont know what will be good on macos.

bunyk commented 3 years ago

:+1: