mistricky / codesnap.nvim

📸 Snapshot plugin with rich features that can make pretty code snapshots for Neovim
MIT License
473 stars 15 forks source link

Adding support to copy to clipboard in wsl #83

Open jhonnyV-V opened 2 months ago

jhonnyV-V commented 2 months ago

Add to dependencies to get system info, to check if is wsl and the current pretty name of the distro.

If wsl is getting used, this should create the image as a temp file inside wsl, then use powershell to copy it to the clipboard, and then it deletes the image from the tmp directory.

this is my first time doing rust so sorry if the code does not follow some good practice, I'm open to any kind of feedback, if something needs to be changed to match the standard in the rest of the codebase just leave a comment and I will fix it

mistricky commented 2 months ago

Hey @jhonnyV-V, thx for this PR. Can you run CodeSnap.nvim on WSL? there are a few issues describe that they can't run CodeSnap.nvim on WSL, it would be great if you could add some documents for the WSL install/usage guide

jhonnyV-V commented 2 months ago

Hi @mistricky, yes I can run it without problems and configuring things inside of WSL, I could give it a try

mistricky commented 1 month ago

Hi @jhonnyV-V, is there any update for https://github.com/mistricky/codesnap.nvim/issues/73#issuecomment-2057344317? It seems like not work perfectly.

jhonnyV-V commented 1 month ago

Hi @mistricky I haven't been able to try to tackle this issue, I will try this week, it seems like a rust issue, where rust fails to access the clipboard, I have to test this more,

mgastonportillo commented 2 weeks ago

WSL's clipboard is tricky. Hopefully this brings some light: https://lib.rs/crates/clipboard-anywhere