oberblastmeister / neuron.nvim

Make neovim the best note taking application
MIT License
398 stars 34 forks source link

Switch to on_exit callback #16

Closed jqfeld closed 3 years ago

jqfeld commented 3 years ago

The current master of neuron now returns multiline json output for the query command. This breaks the json parsing, which is currently done in the on_stdout callback of the plenary Job, which is run after every line in stdout. To fix this I use the on_exit callback (also minor changes in json_stdout_wrap to account for the different signature in on_exit). For consistency, the new_edit and new_and_callback also use on_exit. utils.on_exit_factory is replaced to account for new behavior.

Hope I did not break anything else, as this is my first time working with lua...