-
Notifications
You must be signed in to change notification settings - Fork 11
Add Cargo tips #42
base: main
Are you sure you want to change the base?
Add Cargo tips #42
Conversation
✅ Deploy Preview for configtips ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
4960616
to
a7276b0
Compare
f0b9a23
to
6404bf0
Compare
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.
Looking good! Left a suggestion, a question, and my last request is to run pnpm run format
to appease the tests.
@@ -0,0 +1,30 @@ | |||
--- | |||
name: .cargo/config.toml |
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.
For the name, Let's call this Cargo? Or Cargo Config? Would something like that work?
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.
Oh i missed how there are two very similar kinds. But I notice they both have the same filepath in their kinds? Should these maybe be one type? I don't know much about rust/cargo
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.
The issue I found here is that project configuration is in a Cargo.toml
file in the root of the project.
The actual configuration for the Cargo utility is in a .cargo/config.toml
file and the two are exclusive, i.e. you can't mix configuration options in a Cargo.toml
that belong in a .cargo/config.toml
. So, I built two separate collections since it seemed like we were keying off the file name or configuration type.
Happy to rethink the way we're presenting Rust, though!
// Custom render lists in the body | ||
renderer.list = (body, ordered) => { | ||
const type = ordered ? 'ol' : 'ul'; | ||
const className = ordered ? 'list-decimal' : 'list-disc'; |
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.
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'll fix this up in #48 since it deals with that change (this PR is rebased on top of that branch)
- Set the list style type based on whether the list is ordered or unordered - Set list-style-position to inside to avoid weird layouts when text is centered
Tips for both the Cargo project configuration and the configuration of the Cargo build tool, itself
No description provided.