I never wrote a #QtCreator #plugin before. Somehow I always avoided that, because first you have to set up your environment, then build a husk, make it build, yada yada.
But the spellchecker plugin from Carel Combrink was missing support for QML-type files for years now. C++ parsing existed, #QML did not.
๐ฆ๐ผ ๐ ๐ฒ๐ ๐ฝ๐ฎ๐ป๐ฑ๐ฒ๐ฑ ๐ถ๐.
New QML parser added next to the existing C++ parser. As you know: QML is different from C++ ๐
It now scans QML comments and user-visible string literals:
* // line comments
* /* block comments */
* double-quoted strings
* single-quoted strings
* template literals
It also tries hard to not be annoying. It ignores QML/JavaScript code tokens like imports, ids, property names, bindings, and component names. URLs, emails, pure numbers, color values, and all-caps words are filtered out as well.
Source positions are preserved, so underlines and replacements land where they should. It works for current-file and project-wide checks, with background processing, reparsing, and settings for comments and string literals.
Lots of #testing. Unit tests, yes. But also manual testing, because certain aspects were not part of my initial implementation plan. As always.
So now you can use any Hunspell dictionary to check your QML files for typos and get them fixed.
Typos in code and comments are a real concentration breaker while reading code.
๐ ๐ถ๐๐๐ถ๐ผ๐ป ๐ฑ๐ผ๐ป๐ฒ. ๐๐ป๐ผ๐๐ต๐ฒ๐ฟ ๐๐ต๐ถ๐ป๐ด ๐น๐ฒ๐ฎ๐ฟ๐ป๐ฒ๐ฑ. ๐๐ป๐ฑ ๐บ๐ฎ๐๐ฏ๐ฒ ๐๐ต๐ฒ ๐ฝ๐ฎ๐๐ฐ๐ต ๐ถ๐ ๐ฎ๐ฐ๐ฐ๐ฒ๐ฝ๐๐ฒ๐ฑ.
If someone really wants to check the patch themselves on GitHub:
https://github.com/CJCombrink/SpellChecker-Plugin/pull/197
Thanks to Carel Combrink and the other contributors for the existing work this builds on.
๐๐ญ๐๐ง๐๐ข๐ง๐ ๐จ๐ง ๐ญ๐ก๐ ๐ฌ๐ก๐จ๐ฎ๐ฅ๐๐๐ซ๐ฌ ๐จ๐ ๐ ๐ข๐๐ง๐ญ๐ฌ.
#Spellchecking


