neovim-qt: nvim-qt won't open files passed in as command line arguments

nvim-qt foo.txt

nvim just opens up a new buffer, instead of opening the file.

For reference, I built nvim using fix in #138. I also get these error message when ever I start nvim-qt https://github.com/equalsraf/neovim-qt/issues/146#issuecomment-228262160

About this issue

  • Original URL
  • State: closed
  • Created 8 years ago
  • Comments: 23 (7 by maintainers)

Most upvoted comments

2 years since this was closed, and this is still an issue for me in the most recent version of neovim-qt from releases page — 0.2.9

won’t work

nvim-qt file1
nvim-qt -- file1

will actually work

nvim-qt -- -- file1

in other words, double -- delimiter is required.

I’d almost rather have the nvim-qt options be the ones that appear after the --, since most people would expect nvim-qt to be able to be called the same way as nvim or gvim. I’m not sure how difficult that would be to accomplish, though.

Just found this because I also got 0.3.1 via chocolatey. nvim-qt file doesn’t work and after a few weeks it really started to bother me, so I researched why and came here. it’s true, with 0.3.1 you need to use nvim-qt -- -- file.

it does work with nvim-qt 0.3.2 win64 though, so at least there this regression seems to be catched here (can’t download win32 package: “wasn’t found”).

just tested it with nvim-qt 0.3.1 win64, also doesn’t work

I’d almost rather have the nvim-qt options be the ones that appear after the --, since most people would expect nvim-qt to be able to be called the same way as nvim or gvim.

But Neovim itself accepts ‘–’ as a special argument separator i.e. nvim-qt NVIM_QT_ARGS -- NVIM_ARGS_PART1 -- NVIM_ARGS_PART2, which is why we handle it that way.

Also, even though we can’t enumerate all the neovim CLI options/flags, could we enumerate all the ones that neovim-qt parses instead? Then, whatever’s left over could be passed to nvim.

Some of them could overlap, have the same name (now or in the future), and that is what we need to avoid.

that seems a bit odd to me. @suy