rcasia / neotest-java

Neotest adapter for Java.
MIT License
44 stars 24 forks source link

Remove call to vim.notify within loop callback #125

Closed MathiasSM closed 3 months ago

MathiasSM commented 4 months ago

Using nvim 0.10, I'm getting

E5560: nvim_echo must not be called in a lua loop callback

Pointing to this vim.notify call. I'm assuming it's safe to change for a log.error.

rcasia commented 4 months ago

vim.notify is also found in other places throughout the code and should be replaced. The correct replacement would be:

local lib = require("neotest.lib")
-- 
lib.notify("foo")

PS: I don't get any errors using version 0.10.0 or with the nightly version either, but it might be due to some plugin acting up.

beneeng commented 3 months ago

PS: I don't get any errors using version 0.10.0 or with the nightly version either, but it might be due to some plugin acting up.

You probably use your own notify plugin and override the default vim.notify (thus no call to nvim_echo), which solved the issue for me :-D