This repository has been archived by the owner on Jun 8, 2024. It is now read-only.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Added support for dot config (.typstfmt.toml) #109
Added support for dot config (.typstfmt.toml) #109
Changes from 1 commit
4e83a99
a4b82ee
449c484
e2af19b
8e6081f
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
I feel like now, this can be confusing, can I ask you to fix it by replacing this line
panic!("Failed to read config file {CONFIG_FILE_NAME:?}: {err}")
with
panic!("Failed to read config file {CONFIG_FILE_NAME:?} (or/then .{CONFIG_FILE_NAME:?}): {err}")
Or something else if you have a better idea?
If you're tired of this PR and want to merge already no problem, I can take care of 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.
What about next error:
Error about reading config file should include file name, but TOML parser error shouldn't?
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.
That's also getting out of date, I didn't notice it. It should include the config file used,
maybe the most simple solution is to, in verbose mode, print which config file is used? But I think it would be nicer if each error contained the name of the file
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.
We don't even have a verbose mode yet. Ok, I'll update this message too. Everything else can be changed after merging this PR.
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.
We do have a verbose mode, it's when verbose is true, did you rebase work on master?
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.
Ohhhh, I checked on the old binary while being on the latest changes. Yes, there is a verbose option. The description says
increase verbosity for non errors
. Pretty sure thatpanic!()
is an error.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.
I meant we could have the error just complain and the verbose option always print the config file used (even on no error)
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.
Ahh (like an init logs), no that's definitely a separate feature.
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.
👍