Open
Description
Problem
In a mixed English/Chinese development environment, sometimes Chinese pinyin (a romanization method for mandarin Chinese) is used as var names. It'd be great if these var names, if correctly following pinyin rules, can be considered as correct words.
There are only finite combinations of consonants and vowels in pinyin. For example, bo
, po
, mo
, fo
, are all valid, ko
or do
are not. Any combinations of these valid syllables can be considered as "word".
Solution
I can think of two ways to do this:
- A simple dictionary of all valid Chinese pinyin syllables. In some cases, to achieve the desired outcome, user will have to also enable the combination word option.
- A "plugin" that extends the features of cspell, that "filters" a typo, if it doesn't fall into any dictionary but follows Chinese pinyin rule. I'm not sure if this is feasible.
Alternatives
No response
Additional Context
cspell team may not be ready to implement this yet. Are there any guides for community dictionaries and plugins? Is there an elegant way to distribute custom dictionaries through NPM?
Code of Conduct
- I agree to follow this project's Code of Conduct