Closed yztxwd closed 1 year ago
Thanks!
Your suggestion will be applied in the next version (and will live in the dev branch in the meantime), I will close this issue when I merge it into the master branch.
It's a bit strange that you encountered this issue, I'm also on Linux (obviously no ~/Library/Caches) and I didn't have it. I hope no MacOS users will come screaming back because you broke their :SnipInfo
Describe the bug
:SnipInfo
gave me the errorTo Reproduce
:SnipInfo
Expected behavior Give me a table on compatibility
Environment:
Additional context I found out this is due to somehow the
default_cache_dir
was set to a Macos one "/home/jmy5455/Library/Caches", after looking into the code. It seems like it's due tovim.fn.isdirectory(...)
returned0
, then it's deemed as true, which caused the issue, i'm very new to lua so not sure if this is what it should behave like.I fixed the issue by simply replace the condition with
if (vim.fn.isdirectory(os.getenv("HOME").."/Library/Caches")~=0) then -- we're (probably) on MacOS
Now
:SnipInfo
works well