Closed KaiVinter closed 1 year ago
Hello,
Thanks for your feedback, and sorry for this issue!
The file is lilypond.lua
in nvim-lilypond-suite/lua/nvls/
, and it seems that the function getLastMod()
is the problem. This function checks if the compiled midi file is more recent than the last mp3 created by the plugin using the stat
utility, and recreates an mp3 if necessary.
Can you check if stat
is present on your system by checking the return of the following command?
which stat
I just checked, it gives /usr/bin/stat
, so it's there.
It can totally be an error in my setup, because I'm kind of new using Neovim and some things might be above my understanding 😅
But it's also the only issue for now, so... I'm not sure
OK ! What's the output of :lua print(lilyAudioFile)
?
When editing a .ly
file: /Users/username/Documents/LilyPond/Test/Test.mp3
When no file open, just Neovim: nil
OK, and :
:lua print(tonumber(io.popen("stat -c %Y " .. lilyMidiFile):read()))
(when editing a .ly
file, after compile)
This appears:
Documents/LilyPond/Test/Test.ly 1,1 All
stat: illegal option -- copen("stat -c %Y " .. lilyMidiFile):read()))
usage: stat [-FLnq] [-f format | -l | -r | -s | -x] [-t timefmt] [fi5,1 All
: ni
Ok thanks !
It look like stat
command has not the same options in linux or osx. You can change stat -c %Y
line 13 in lua/nvls/lilypond.lua
with stat -f %m
. I'll pull a fix tonight !
I just made an update, it should work now. Keep me informed, I do not have a mac to test it !
Hello!
I tried stat -f %m
and it gave me 1674867642
, which doesn't sound like something intuitive, but it looks like something works. I'll try your update
Here again!
I tried your update and now it shows [NVLS] Function not supported on your system
(Which is not what I intended, but it's better than before 😆).
However, using F3 does work (and it worked before the update) when doing a visual selection, so I'm not sure whether this actually doesn't work or it just needs something else
Haha sorry for that... I have made a mistake, fixed now ! Yes the player should work !
Thank you! It does work now ✨
Hello! I managed to get pretty much everything working, but for some reason the shortcut F3 doesn't work. It gives me the next error:
I also can't seem to find the
lilypond.lua
the log says nor those directories.I'm using MacOS Monterrey 12.6.1