Closed Jxstxs closed 2 years ago
Thx, I'm really don't familiar with nvim API, so the implementation is merely MVP, grab anything that I knew~
So really need more hints like this ~
Feel free to ask when you need help! :smile:
Feel free to ask when you need help! 😄
Nice ~~ And I have changed the default directory
But the separator /
, is it valid for window? @Jxstxs
I don't know if the above solution would work as it is.
but with vim.loop.os_uname().sysname
you can get the os type in nvim. Now you could write a function which returns the specific character for the os ( /
or \
)
Instead of
vim.env.HOME
I would suggest to usevim.fn.stdpath()
, because of my Knowledge this is OS independent.So I would write the scratch files to cache:
On Linux it should give
~/.cache/nvim/scratch.nvim
and on Windows I think something to
APPDATA