You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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:
nvr +echo\ g:fugitive_conflict_x
(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?
nvr +throw\ g:fugitive_conflict_x 2>&1| grep NvimError | sed 's/pynvim.api.common.NvimError: //'
I would have expected writing to stdout the same way as in vim to work (described here), but it doesn't seem to.
The text was updated successfully, but these errors were encountered:
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
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:
nvr +echo\ g:fugitive_conflict_x
(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.
The text was updated successfully, but these errors were encountered: