AckslD / nvim-neoclip.lua

Clipboard manager neovim plugin with telescope integration
995 stars 20 forks source link

Use cross-platform function for mkdir #50

Closed nzbart closed 2 years ago

nzbart commented 2 years ago

Thanks for this great plugin!

I use neoclip on Windows and Linux, and notice that the mkdir command used here doesn't work correctly on Windows, creating a directory called -p as well as throwing up an error message.

https://github.com/AckslD/nvim-neoclip.lua/blob/6e5d6dbf242c3c3fd55a3521368808490a86ce62/lua/neoclip/db.lua#L17

Would it be possible to use the built-in Neovim function instead?

vim.fn.mkdir(dirname(db_path), 'p')
AckslD commented 2 years ago

Oh right! Thanks for raising this and also providing the solution :)

Would you mind trying out #51 and see if it works for you? I don't have access to windows

nzbart commented 2 years ago

@AckslD thanks for fixing this so promptly!