Closed protex closed 2 years ago
I dug into this more, and it looks like the culprit of this problem may actually be a combination of a few changes from neuron.
The output of neuron query
is:
Plugins enabled: links, tags, neuronignore, uptree, feed
Loading directory tree (2 .md files) ...
Building graph (2 notes) ...
[
....
]
And those first 3 lines are not on stdout, they are on stderr:
$ neuron query 2>/dev/null
[
...
]
Note the lack of diagnostic info after re-directing stderr to /dev/null
.
This makes these the on_stderr
callback get thrown every time cmd.query
is called: https://github.com/oberblastmeister/neuron.nvim/blob/10b189437c3e080502ca14ed0e7bc041274e0610/lua/neuron/cmd.lua#L12
The the cmd.neuron
is set up, it's attempting to parse the json on every stdout event. Since things are printed line by line, it's looks like it's calling the callback on every line.
I think utilizing the on_exit
instead of the on_stdout
and on_stderr
handles may be a better way to handle the output.
I have a feeling that the error I'm facing is related. I get it whenever I try to pick a note using Telescope or insert a link.
E5108: Error executing lua ...cker/start/telescope.nvim/lua/telescope/actions/init.lua:29: Key does not exist for 'telescope.actions': get_selected_entry
If someone more experienced can take a look and confirm whether or not it is, I'll open a new issue for it.
Just noticed the note at the top of the repo about the neuron version and the unstable branch. I had combed over everything and somehow missed it. Closing this.
I am using the unstable branch and the latest version of Neuron and I do get those errors printed out every time I create a new file. @protex, did you have to do anything to not have that in the output every time? I only get those three lines and not the rest of the errors mentioned earlier in the issue.
I just installed this plugin and basically nothing works. I believe this is because of some breaking changes in telescope which now has a minimum requirement of 0.5.1. I can't prove this, I'm just guessing based on the output of an example of the error below and the fact that this project doesn't say it has a minimum requirement of 0.5.1 when it relies on telescope, which does have this requirement.