HakonHarnes / img-clip.nvim

Effortlessly embed images into any markup language, like LaTeX, Markdown or Typst
MIT License
443 stars 7 forks source link

Suggestion: Elegantly disable plugin when running without an x session #49

Closed jarbus closed 5 months ago

jarbus commented 5 months ago

Is your feature request related to a problem? Please describe. Love this plugin and added it to my dotfiles. I get a popup whenever I open neovim over SSH that says Could not get clipboard command. See :checkhealth img-clip. I have xclip installed, but this error pops up over SSH because xclip doesn't find an X session. When I connect with ssh -X everything works fine.

Describe the solution you'd like I propose some way of detecting when an X session is not found, and disabling the pop-up message.

HakonHarnes commented 5 months ago

Thanks for reporting. I've modified the code so it only shows the pop-up message when the paste command is invoked. Does PR #50 resolve your issue?

jarbus commented 5 months ago

It does indeed! Thanks for the quick fix!

HakonHarnes commented 5 months ago

No problem! Glad you like the plugin :)