-
Notifications
You must be signed in to change notification settings - Fork 629
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(config): generate default template when config file is not found #3460
Conversation
119f959
to
3beac4c
Compare
Notably, this PR automatically initializes the file on the first attempted load, rather than as a part of |
As for the contents of the template- there are some changes to my suggested template that are definitely improvements, but some of the new wording is a little sloppy, the text jumps around between moods in a strange way, extraneous commentary is included which will reduce the chance of a user properly reading it (users could not care less about the philosophical basis of the configuration file, they just want to change their font and color scheme), and not leading with the docs link front and center is definitely worse. |
I agree, I don't think we should be doing this in the load portion. |
I feel like I prefer this over only generating when Plus, when they follow the docs and try to find the config file at |
Love this:
As a new user, Ghostty created the config file for me and I had a bit of a hl of a time figuring out where it put it, |
1c2b6e2
to
76b3a8b
Compare
76b3a8b
to
98d7778
Compare
/// called from one place that is not performance critical so it is fine | ||
/// to be inline. | ||
inline fn configPath(alloc_arena: Allocator) ![]const u8 { | ||
fn configPath(alloc_arena: Allocator) ![]const u8 { |
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.
This is just an unrelated change I snuck in here because I noticed it.
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.
Alright, I made some edits. I'm still not super happy with how this works but it does the job and I think it'll help users quite a lot. Thanks @pluiedev
Does the directory exist? I just deleted my config files (moved them) and it gets created fine. But @HeySora is correct that it requires the dir to exist which is unfortunate. I'm making an issue to track that now. |
It worked after these steps:
|
Hi @HeySora, Interesting observation! While trying to reproduce this issue, I noticed something different. I can only see the error message in the logs:
But I don't see any UI modal/notification like the one in your screenshot. I'm curious:
Would be helpful to know your setup as it seems to provide a better user experience with visible error notifications! |
Hi @liby, this is just Console.app! It's the built-in macOS app that aggregates logs from every running app (+ has remote debugging for any of your Apple devices, including iOS); Here is an uncropped screenshot to hopefully help with the context of the above image. |
Closes #3203