EWSoftware / VSSpellChecker

A Visual Studio spell checker editor extension that checks the spelling of comments, strings, and plain text as you type. Supports configuration and various languages.
Other
377 stars 65 forks source link

Words in the dictionary are evaluated regardless of uppercase or lowercase #292

Closed vberkaltun closed 1 year ago

vberkaltun commented 1 year ago

Words in the dictionary are not evaluated in the same way that they are added to the dictionary. When a capital-only word is added to the dictionary (or vice versa), I expected it to be evaluated in the same way.

As an example, the given word is defined in the dictionary of a project:

EWS

In one of the code file, the given words are used:

/// <summary>
/// EWS or ews. Both of them are assumed correct but only the EWS must be correct.
/// </summary>

In that case, both EWS and ews are considered valid, even though the word in the dictionary is defined with only capital letters. Is there any configuration flag that can be used so that spell-checking can be done separately for uppercase and lowercase?

Regards, Berk

EWSoftware commented 1 year ago

The dictionaries are case insensitive and offer suggestions in matching case be that upper, lower, or captitalized. There is an option to ignore words in all uppercase that if enabled will ignore them.

vberkaltun commented 1 year ago

So far my experience is that there is no case check over the words. In the SS below, you can see that all the uppercase/lowercase words are evaluated as valid:

words

It's possible that I created my .editorconfig incorrectly. In case you are interested, I attached my example project below:

spell_check.zip

Regards, Berk

EWSoftware commented 1 year ago

Yes, and I did say the dictionaries are case insensitive. They'll match words regardless of case. Suggestions offered will match the case of the misspelling. For example, if you enter "Exampleeee" it will offer "Exammplee" as a replacement matching the capital casing of the misspelling, not the all uppercase version in the dictionary.

vberkaltun commented 1 year ago

Thanks for the clarification. :) Just wondering if you have any plan in your mind for the case-sensitive dictionaries in the roadmap. I think it would be beneficial for some developers. If you are open to this addition, I would like to contribute to the project. I have no clue how complex it is but I can give it a try.

Regards, Berk

EWSoftware commented 1 year ago

That isn't a function of the spell checker but of the dictionaries themselves. I believe there is a flag that can be defined in the affix file to mark words such that case is retained but you'd have to add that option to every word in the dictionary. Such affix modifiers don't apply to user dictionaries which are just lists of words.