mbpowers / nvimager

Inline markdown image/gif/video/pdf/LaTeX previewer for nvim using ueberzug.
MIT License
79 stars 3 forks source link

Crash #2

Open raffaem opened 8 months ago

raffaem commented 8 months ago

I followed the instructions but I get this error message on <Plug>NvimagerToggle:

1 change; before #494  2 seconds ago
E5108: Error executing lua ...le/.local/share/nvim/lazy/nvimager/lua/nvimager/init.lua:157: attempt to concatenate a nil value
stack traceback:
    ...le/.local/share/nvim/lazy/nvimager/lua/nvimager/init.lua:157: in function 'createTexPreview'
    ...le/.local/share/nvim/lazy/nvimager/lua/nvimager/init.lua:236: in function 'init'
    ...le/.local/share/nvim/lazy/nvimager/lua/nvimager/init.lua:292: in function 'toggle'
    [string ":lua"]:1: in main chunk
E354: Invalid register name: '#'
mbpowers commented 8 months ago

this is because you do not have an XDG_CACHE_HOME variable set in your shell environment. you can add something like

export XDG_CACHE_HOME="$HOME/.cache"

to your shell config and it should work

raffaem commented 8 months ago

Hello, thanks for your answer. Now it doesn't crash. I think that should be the default value if the variable is undefined, and in any case it should give me a more detailed error message. It doesn't crash but it doesn't do anything either. I don't see any images and no error messages either after activating the plugin. There seems to be no :CheckHealth nvimager either? Best

raffaem commented 8 months ago
❯ ueberzug --version
ueberzugpp 2.9.2
❯ pdftoppm -v
pdftoppm version 24.01.0
Copyright 2005-2024 The Poppler Developers - http://poppler.freedesktop.org
Copyright 1996-2011, 2022 Glyph & Cog, LLC
❯ ffmpeg -version
ffmpeg version n6.1.1 Copyright (c) 2000-2023 the FFmpeg developers
built with gcc 13.2.1 (GCC) 20230801
configuration: --prefix=/usr --disable-debug --disable-static --disable-stripping --enable-amf --enable-avisynth --enable-cuda-llvm --enable-lto --enable-fontconfig --enable-frei0r --enable-gmp --enable-gnutls --enable-gpl --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libdav1d --enable-libdrm --enable-libfreetype --enable-libfribidi --enable-libgsm --enable-libharfbuzz --enable-libiec61883 --enable-libjack --enable-libjxl --enable-libmodplug --enable-libmp3lame --enable-libopencore_amrnb --enable-libopencore_amrwb --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libplacebo --enable-libpulse --enable-librav1e --enable-librsvg --enable-librubberband --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libssh --enable-libsvtav1 --enable-libtheora --enable-libv4l2 --enable-libvidstab --enable-libvmaf --enable-libvorbis --enable-libvpl --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxcb --enable-libxml2 --enable-libxvid --enable-libzimg --enable-nvdec --enable-nvenc --enable-opencl --enable-opengl --enable-shared --enable-vapoursynth --enable-version3 --enable-vulkan
libavutil      58. 29.100 / 58. 29.100
libavcodec     60. 31.102 / 60. 31.102
libavformat    60. 16.100 / 60. 16.100
libavdevice    60.  3.100 / 60.  3.100
libavfilter     9. 12.100 /  9. 12.100
libswscale      7.  5.100 /  7.  5.100
libswresample   4. 12.100 /  4. 12.100
libpostproc    57.  3.100 / 57.  3.100
➜ magick --version
Version: ImageMagick 7.1.1-27 Q16-HDRI x86_64 21931 https://imagemagick.org
Copyright: (C) 1999 ImageMagick Studio LLC
License: https://imagemagick.org/script/license.php
Features: Cipher DPC HDRI Modules OpenCL OpenMP(4.5)
Delegates (built-in): bzlib cairo djvu fftw fontconfig freetype heic jbig jng jp2 jpeg jxl lcms lqr ltdl lzma openexr pangocairo png raqm raw rsvg tiff webp wmf x xml zip zlib zstd
Compiler: gcc (13.2)
➜ pdftex --version
pdfTeX 3.141592653-2.6-1.40.25 (TeX Live 2023/Arch Linux)
kpathsea version 6.3.5
Copyright 2023 Han The Thanh (pdfTeX) et al.
There is NO warranty.  Redistribution of this software is
covered by the terms of both the pdfTeX copyright and
the Lesser GNU General Public License.
For more information about these matters, see the file
named COPYING and the pdfTeX source.
Primary author of pdfTeX: Han The Thanh (pdfTeX) et al.
Compiled with libpng 1.6.40; using libpng 1.6.42
Compiled with zlib 1.3.1; using zlib 1.3.1
Compiled with xpdf version 4.04