Closed donovanglover closed 1 year ago
The aim is not to have any display issues. Making it compatible with zen-mode is out of scope, as it's not an issue but a missing feature at best, but my guess is that it should work even there. Try it out.
I would love to try image.nvim! Unfortunately, I haven't been able to get magick
working yet. The instructions in the README have been a great help, however changing try_to_load
to /nix/store/vhc3pka4gjs6hghbsk7alc2nsry9k81i-imagemagick-7.1.1-12/lib/libMagickWand-7.Q16HDRI.so
doesn't change the error message for me.
I was trying to add magick to nixpkgs earlier. I think patching it like this could get it to work and I might be using the wrong .so
. See: https://github.com/NixOS/nixpkgs/pull/243687
Yes, it's a bit of a pain, would be great to get it in nixpkgs. I'm looking to replace it as the rock can't be used to do masking.
To get it to work I patched ~/.luarocks/share/lua/5.1/magick/wand/lib.lua like this:
Not sure if I missed anything but I couldn't get that to work either. Can you share the file later? Planning to add the patch to the PR if I can get it to work.
I did a luarocks --local install magick
and then went to find the wand .so from the nix store:
cd (dirname (which magick))/../lib
# found libMagickWand-7.Q16HDRI.so
And then I just hardcoded the path to that .so in ~/.luarocks/share/lua/5.1/magick/wand/lib.lua
Thanks, I got it to work! Took a second for me to figure out that you need to add treesitter
since there were no errors with the vimwiki
syntax, but having jpg
and other image formats in the editor is great.
I made a PR https://github.com/NixOS/nixpkgs/pull/244038 to add image.nvim to nixpkgs and updated the magick PR with the patch.
Thanks, I got it to work! Took a second for me to figure out that you need to add
treesitter
since there were no errors with thevimwiki
syntax, but havingjpg
and other image formats in the editor is great.I made a PR https://github.com/NixOS/nixpkgs/pull/244038 to add image.nvim to nixpkgs and updated the magick PR with the patch.
Amazing, glad it works, and thanks for the PR!
This plugin doesn't seem to work nicely with zen-mode either - images become misplaced in zen-mode, and are stuck in the position where there were before switching to zen-mode; switching back from zen-mode, they behave correctly again.
Would be great if there was documentation on how this project compares to hologram.nvim. For example, does it fix any of the display issues present in the original?