Skip to content

Option to rename Cargo.lockΒ #8624

@alexxroche

Description

@alexxroche

While learning rust I found myself editing Cargo.toml many times. I also noticed that I edited Cargo.lock zero times, (yet the name space collision of the two files is frustrating, and I wonder if its just old people with text editors and an aversion to using mice while writing code, or if there are literally dozens of us.)

I would like a ~/.cargo/config setting that would enable me to rename Cargo.lock to something like .Cargo.lock because it would permit me to edit Cargo.toml with 6 keystrokes rather than 8). "2 keystrokes? Is that all?" said someone that hasn't studied workflow, cognitive load and recursion. I don't need to see the lock file, and everything else that has a lock file finds a nice clean way to tuck it away. (Why isn't it in ~/.cargo/registry/lockfiles/ ? )

Even cargo_lock.toml would be better than the exiting Cargo.lock as $editor C{tab} would open Cargo.toml

I found someone else on a rust discord server that had raised a similar issue (which has been closed but I still face this problem.)

I also noticed a possibly related ticket that I was going to just comment on but realised that it is easier to combine issues into a project than to curate comments into a consistent correction.)

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-feature-requestCategory: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions