Open TamaMcGlinn opened 2 years ago
Very late response, but you should be able to use --remote-expr
to get this working, e.g.
$ nvr --remote-expr "g:lua_version"
5
Note: you'll get an error if the variable doesn't exist, e.g.
$ nvr --remote-expr "g:fugitive_conflict_x"
No valid expression: g:fugitive_conflict_x
Test it in Neovim: :echo eval('...')
If you want to execute a command, use -c or -cc instead.
$ echo $?
0
although the exit-code will still be zero.
In order to configure a linter, I'm trying to read a global from the currently active NeoVim instance (the one that spawned the linter, in this case). Basically, I am trying to get something like this to work:
(for the example I just picked an arbitrary global everyone likely has defined; it is either 0 or 1)
It works if I throw it, but this is just disgusting; can we get a print option in nvr or something?
I would have expected writing to stdout the same way as in vim to work (described here), but it doesn't seem to.