Open Akuli opened 4 years ago
need to be able to spell check wordssmashedtogether, as in gettext.bindtextdomain
this will actually be really difficult for programming languages where smashing words together is a thing
I first thought of treating any 3 letters or less as a known word, so bindgittextdomain
would be valid:
bind
is known wordgit
is short enough, let's assume it's valid and not bother looking it up from a word listtext
is known worddomain
is known wordbut how about something like updatechdirresults
?
update
is known wordchdir
(meant to be interpreted as ch
dir
, "change directory") is too long to skip, also not a valid word, so it's flagged as typoresults
is known wordspell checking only contents of strings doesn't help:
conffig_dir
spell checking names only when defining variables or functions or classes or something else would allow using imported wordsmashedtogether amed functions, but currently there's no good way to detect that, e.g. foo = bar
in python may define a new variable or change the value of an existing variable
I use this in vscode: https://marketplace.visualstudio.com/items?itemName=streetsidesoftware.code-spell-checker
Uses cspell which is a js lib.
The UX of it is great, IMO we should emulate it if we decide to go further with this. IT addresses basically all of your concerns.
@taahol did some spell checker experiments at some point, but I think I never got around to trying his branch or something like that.
turns out that it's hard to find a big list of english words in a text file
maybe should use this https://github.com/dwyl/english-words
can't use git submodules because the pip command in README.md doesn't understand them, and not all porcupine users have git