Fix :checkhealth to call vim.health#48
Conversation
Changed health check function to function appropriately, modelled after documentation here: https://neovim.io/doc/user/pi_health.html#health-dev.
fangjunzhou
left a comment
There was a problem hiding this comment.
Possible solution to attempt to index global 'health' (a nil value)
|
I think this really needs to be merged! Was really confused by the errors I was getting after updating. |
|
I tested this out in WSL / neovim 9 and this did fix the checkhealth issue. |
|
@ekickx is there any option that this gets merged? otherwise theres no way this works on neovim 0.9.x |
Feel free to use my fork in the meantime if you don't want to change the code yourself, the author hasn't responded in awhile. https://github.com/postfen/clipboard-image.nvim Otherwise, you can edit the Remove line 3, local health = require "health"and change these lines (51-57) health.report_start "Checking dependencies"
if is_dep_exist then
health.report_ok(report_msg)
else
health.report_error(report_msg)
end
endto this: vim.health.start("Checking dependencies")
if is_dep_exist then
vim.health.ok(report_msg)
else
vim.health.error(report_msg)
end
end |
|
@postfen thanks, i am currently using your fork :) |
|
@ekickx 😄 it would be nice if you reviewed this. It is blocking a lot of us from using your code 😢 |
|
Hmm, @postfen 's fork works well. |
|
Using @dfendr 's fork as well 👍🏻 |
You can also achieve this using
The A quick shoutout to this Stack Overflow answer for providing useful insights on obtaining the diff file of a pull request! Hope this helps someone! |

Changed health check function to work properly, modelled after documentation here: https://neovim.io/doc/user/pi_health.html#health-dev.