elijah-potter / harper

The Grammar Checker for Developers
https://writewithharper.com
Apache License 2.0
1.82k stars 33 forks source link

feat: spellcheck identifier declarations #29

Open elijah-potter opened 9 months ago

elijah-potter commented 9 months ago

As the title says. Make sure you split up the component words of camel or snake case. Might need to auto-detect the style of the file.

Agent-E11 commented 4 months ago

I would like this. It has been bothering me quite a bit.

My initial suggestion would just be to split words up based on case, and then spellcheck them individually:

-- MySpecialClass

And then spellcheck each word (My, Special, Class). And if any of them are wrong, mark the entire word as misspelled.

-- MySpecilClass               Did you mean to spell "MySpecilClass" this way?

Although, it might be annoying if the error is hard to find

-- ThisIsMySpecialClasThatHasAReallyLongName               Did you mean to spell "ThisIsMySpecialClasThatHasAReallyLongName" this way?
elijah-potter commented 4 months ago

It's an intriguing idea. Right now I'm polishing up support for all the doc-comment styles for all the different programming languages (think JSDoc, JavaDoc, RustDoc, etc). Since I now have at least one other person that wants this, I'll place it first in the queue.

Agent-E11 commented 4 months ago

(Please include LuaDoc as well 😄)

I also think it should apply to regular comments as well. For instance, there are quite a few times where there are regular comments talking about variables.

summersz commented 2 months ago

I would also like to see this too. This is how CSpell works. https://cspell.org/docs/how-it-works/

I'd like to see some of the other features listed there too so it can be configured for coding. Like setting a minimum character limit for checking, and case insensitivity.