Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix :checkhealth to call vim.health #48

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open

Conversation

dfendr
Copy link

@dfendr dfendr commented Mar 16, 2023

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

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

This comment was marked as off-topic.

Copy link

@fangjunzhou fangjunzhou left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Possible solution to attempt to index global 'health' (a nil value)

lua/clipboard-image/health.lua Outdated Show resolved Hide resolved
@prescientmoon
Copy link

I think this really needs to be merged! Was really confused by the errors I was getting after updating.

@diablozzq
Copy link

I tested this out in WSL / neovim 9 and this did fix the checkhealth issue.

@Ttayu Ttayu mentioned this pull request May 8, 2023
@alxndr13
Copy link

@ekickx is there any option that this gets merged? otherwise theres no way this works on neovim 0.9.x

@dfendr
Copy link
Author

dfendr commented Jun 13, 2023

@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 health.lua file in the following ways.

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
end

to this:

  vim.health.start("Checking dependencies")
  if is_dep_exist then
    vim.health.ok(report_msg)
  else
    vim.health.error(report_msg)
  end
end

@alxndr13
Copy link

@postfen thanks, i am currently using your fork :)

@JeffLabonte
Copy link

I am using @postfen fork as well. His changes fixed the issue with the addon plugin

image

@JeffLabonte
Copy link

JeffLabonte commented Jun 16, 2023

@ekickx 😄 it would be nice if you reviewed this. It is blocking a lot of us from using your code 😢

@tan-wei
Copy link

tan-wei commented Oct 11, 2023

Hmm, @postfen 's fork works well.

@Drew-Daniels
Copy link

Using @dfendr 's fork as well 👍🏻

jarossnd added a commit to jarossnd/clipboard-image.nvim that referenced this pull request May 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

8 participants