-
Notifications
You must be signed in to change notification settings - Fork 20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Feat] default to XDG_PICTURES_DIR
for save path
#124
Conversation
0b2b3b6
to
4b2755e
Compare
Fixed the issue above by just moving to pure lua space. |
Hi @Uzaaft, I think set default value of save_path is great, but maybe there should have more logic for handle edge case, for instance, if the default path does not exist |
What do you mean with edge cases? Isn't the edge cases done here, i.e defaulting to xdg, enough? |
I mean if somehow the value of XDG_PICTURES_DIR does not exists on disk, or if someone removed the ~/Pictures on his Mac, we should tell users what happened, and what they can do in this case. Without default save_path, users should specify save_path explicitly, so the above case shouldn't happen, but if we set default value, we should check and throw more useful error message to users |
I believe the error that will appear if the folder doesn't exist will be as useful as the one you provide today. I.e:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
XDG_PICTURES_DIR
for save pathXDG_PICTURES_DIR
for save path
…im#124 is merged (#1139) fix(codesnap): Remove dir now that mistricky/codesnap.nvim#124 is merged
@mistricky I think this is a better, more saner default were we default to the
xdg_pictures_dir
or/Users/<Username>/Pictures
on mac. Let me know what you think. I tried to update the docs where applicable, not sure if more is required.