Closed daUnknownCoder closed 5 months ago
I am also not able to get breadcrumbs, and I can't get rid of the mac window bar.
Thx for using and show interesting in this project, for problems this issues mentioned:
Without selecting code, i would like a vim.notify or vim.print instead of WTF type logs
That's a great idea, for these languages like Rust or Golang, they clearly distinguish between "error" and "panic", the selected empty scenario is expect error, but in lua, there just have one error type which is error(unexpect error like exception in JS or Java), I would use print log instead represent expect error in lua.
sometimes with luck [tho i can't paste this anywhere] i get Save snapshot into clipboard successfully
Okay... it's nothing to do with lucky, looks like the set copy data action failed interact with your clipboard utils. @daUnknownCoder What's your XDG_SESSION_TYPE? If you are using some DE using wayland, this problem may to do with the wl-clipboard, CodeSnap.nvim is based on arboard, that will interact with wl-clipboard if you are using wayland, but the wl-clipboard have a problem:
When we copy something on Wayland (using wl-clipboard) and close the application we copied from, the copied data disappears from the clipboard and we cannot paste it anymore
So if you are using wayland, you can try this util wl-clip-persist that can persist the copy data whatever if the copied source process was exited, it works fine on my machine (x86_64 Arch Linux with wayland session).
and I can't get rid of the mac window bar.
This issue has fix by https://github.com/mistricky/codesnap.nvim/pull/54, it will be released along with the next version. @tnthi115
And the another bug this issue mentioned:
I am also not able to get breadcrumbs
I can't reproduce on my machine, but I will continue observe this bug.
The CodeSnap was released 1.1.5, can you guys try with v1.1.5 and validate? if this bug still exist, please let me know @tnthi115 @daUnknownCoder
@mistricky Congrats on the new release, and thanks for your work! I've tested on my end again, and both issues I previously mentioned are resolved.
Okay, seems like this issue can be closed.
sorry @mistricky, i was busy these days, i am indeed using wayland (Hyprland) but im using both xclip
and wl-clipboard
for the clipboard stuff coz some apps are using native wayland and some are using xwayland, and i also have nwg-clipman
to update on any copy stuff on both clipboard managers, and my current terminal is on xwayland...
When we copy something on Wayland (using wl-clipboard) and close the application we copied from, the copied data disappears from the clipboard and we cannot paste it anymore
this thing doesnt apply, since i just switch windows, my terminal is open 24x7 i never close it
this time it saved, but it took me 1 whole minute to generate this, without using the persist
thing u mentioned
nwg-clipman
says this
and yeah, the No code is selected
looks clean, congrats on the release tho 🎉
Hi @daUnknownCoder, thx for your reply.
this thing doesnt apply, since i just switch windows, my terminal is open 24x7 i never close it
Maybe I expressed wrong before, I mean wl-clipboard cannot read copied data that come from exited processes. In this case, the exited process is a module called generator
which used to generate screenshots. When you run CodeSnap
command, the generator runs in background and does some work for generating screenshots, and copy the generated screenshots into the clipboard, and then exits. wl-clipboard cannot read the copied screenshot anymore.
I'm also using Arch + Hyprland as my daily platform, as Hyprland document say:
When we copy something on Wayland (using wl-clipboard) and close the application we copied from, the copied data disappears from the clipboard and we cannot paste it anymore. So to fix this problem we can use a program called as wl-clip-persist which will preserve the data in the clipboard after the application is closed. Github
CodeSnap.nvim + wl-clipboard-persist working fine on my machine.
this time it saved, but it took me 1 whole minute to generate this
Cause the CodeSnap.nvim needs few time to draw a screenshot, on my machine it will take about 1s to finish screenshot draw. Maybe on some machines it takes a longer time, but it definitely can be optimized in the future.
When we copy something on Wayland (using wl-clipboard) and close the application we copied from, the copied data disappears from the clipboard and we cannot paste it anymore. So to fix this problem we can use a program called as wl-clip-persist which will preserve the data in the clipboard after the application is closed.
This solved a few doubts of mine..., I see it takes time then I guess my PC is slow enough... I have 4gb RAM btw
So the plugin works well, keep updating this i love this plugin..., I'll try this persist thing... But ig I won't need it coz i m using clipman
Hey @daUnknownCoder Thank u again for showing interesting in this project. Seems like this issue can be closed.
Without selecting code, i would like a
vim.notify
orvim.print
instead of WTF type logs log1 -> happens when i first time tryCodeSnap
without selection:log2 -> happens after 1st time of no code selection
sometimes with luck [tho i can't paste this anywhere] i get
Save snapshot into clipboard successfully
check video:Kooha-2024-03-17-20-11-04.webm
CodeSnapSave
works, but i dont get breadcrumbs in it:And sometimes, neovim crashes, check video:
Kooha-2024-03-17-20-02-00.webm
@mistricky, my config: