Skip to content

crate is super common in Rust contexts #2281

Description

@mrjones2014

Currently the word "crate" is recognized as a typo for "create".

In the context of Rust projects, you might have the word "crate" all over your README.md.

"crate" should probably be added to the dictionary.

Activity

  1. linked a pull request that will close this issueremove crate #2282on Feb 18, 2022
  2. peternewman commented on Feb 18, 2022

    @peternewman
    Collaborator

    Hi @mrjones2014 ,

    Please see the previous discussion in #1660 #1902 .

    Essentially the issue is that crate->create is likely to be of use for everyone apart from Rust users, who can skip that one word. Also unlike everything else we've got, it falls across two groups, as it's a genuine potential typo in day to day use, as well as being a code based typo for one language.

  3. peternewman commented on Feb 18, 2022

    @peternewman
    Collaborator

    "crate" should probably be added to the dictionary.

    I think you've missed a word here?

  4. carlosflorencio commented on Feb 28, 2023

    @carlosflorencio

    Can't we check the file extension and if it's .rs, ignore certain words like crate? This would allow having skip lists per filetype.

    Sorry if the proposal is too naive, I don't know how codespell works underneath.

  5. DimitriPapadopoulos commented on Feb 28, 2023

    @DimitriPapadopoulos
    Collaborator

    codespell is currently language-agnostic or said otherwise file-type-agnostic. We'd have to change that first.

    See #17 (comment).

  6. DimitriPapadopoulos commented on Feb 28, 2023

    @DimitriPapadopoulos
    Collaborator

    In any case, crate has been moved to dictionary_rare.txt, but rare is still part of the default 'clear,rare' dictionaries.

    Perhaps we should move it to dictionary_code.txt.

  7. ismet55555 commented on Sep 8, 2024

    @ismet55555

    The codespell: crate ==> create is the most annoying thing when programming rust. Mix that with some of the nvim configurations and trying to add some exempt word to it. It sucks.

  8. DimitriPapadopoulos commented on Sep 8, 2024

    @DimitriPapadopoulos
    Collaborator

    @ismet55555 Don't hesitate to submit a PR to move crate to the code dictionary.

    Not sure about the nvim configuration issue. Can it be fixed in codespell?

  9. ismet55555 commented on Sep 8, 2024

    @ismet55555

    I mean I think it can be fixed by specifying arguments for codespell. However, nvim configuration frameworks like AstroNvim, to get Mason to install it and reference a codespell config file or pass cli arguments is not the most straightforward (at least for me). So for the time being I’m using cspell

  10. added a commit that references this issue on Sep 9, 2024
    ec7bf32
  11. added a commit that references this issue on Sep 9, 2024
    1ad912c
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions