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

Allow file-specific wordlists #59

Closed
ellsclytn opened this issue Nov 28, 2019 · 3 comments
Closed

Allow file-specific wordlists #59

ellsclytn opened this issue Nov 28, 2019 · 3 comments

Comments

@ellsclytn
Copy link

I often come across words that are very specific to a single file, and the probability of that same word being used elsewhere in the codebase legitimately is extremely low (low enough that it's more likely to be the result of a typo).

In this situation, it would be great to be able to have wordlists for specific files.

@ellsclytn
Copy link
Author

Another alternative would be to allow the interface to easily create additional dictionaries on-the-fly. E.g. I'm using Logstash for some logging stuff. And so I've got some very specific files that are concerned with logging, and the concern of Logstash should remain within those very specific files. So when spellr tells me that "logstash" is an error, I could press some buttons to create a new "logging" wordlist, or "infrastructure" wordlist, or something like that, and only individual files or folders can be added into that wordlist.

@robotdana
Copy link
Owner

robotdana commented Nov 29, 2019

You can make wordlists that apply to a single file, just set it up as the only file for that language.

languages: 
  logstash: 
     includes:
         - path/to/logstash

there isn't yet a way to set up a wordlist during an interactive spell check session (single file or not), (this would require writing to the .spellr.yml and i don't want to accidentally clobber comments like package.json does). If you have any solution for this (perhaps a yaml parser that doesn't strip comments and keeps track of formatting, or a secondary file like .rubocop_todo.yml)

@robotdana
Copy link
Owner

I've added a documentation: 58e881f, and #66 for the more complicated dynamic/interactive aspect of this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants