Skip to content
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

Spellchecking type names, identifiers and strings #208

Open
hunger opened this issue Oct 12, 2021 · 1 comment
Open

Spellchecking type names, identifiers and strings #208

hunger opened this issue Oct 12, 2021 · 1 comment
Labels
enhancement 🦚 New feature or request help wanted 🤝 Extra attention is needed

Comments

@hunger
Copy link
Contributor

hunger commented Oct 12, 2021

Is your feature request related to a particular use-case?

No.

Describe the solution you'd like to implement/see implemented

cargo-spellcheck is checking my documentation , which is great. But this is not place I can put spelling mistakes that are user visible:-)

Could cargo-spellcheck optionally also check strings? Those are likely to be seen by users.

In addition it would be cool to also spell check identifiers (variable names, type names, etc.), which I consider also to be user visible strings in he case of library crates.

Describe alternatives you've considered

Using the cspell plugin in VS Code:-)

Additional context

Some rules to split identifiers in snake_case or CamelCase will be needed of course.

@drahnr
Copy link
Owner

drahnr commented Oct 13, 2021

Related #196
Mildly related #201

TL;DR

yes, this is possible, but requires some effort on the parsing front. There could be an alt layer like, CommonMark / Markdown are abstracted, there could be an IdentLayer that covers a file and relevant, non-keyword identifiers.

Somebody just needs to put in the effort to extract those.

Note: Currently both syn and ra_ap_syntax are used for parsing, it might be a good idea to unified towards ra_ap_syntax first.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement 🦚 New feature or request help wanted 🤝 Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants