feat(qml): add first-class spell checking for QML files - #197
Open
marcelpetrick wants to merge 1 commit into
Open
feat(qml): add first-class spell checking for QML files#197marcelpetrick wants to merge 1 commit into
marcelpetrick wants to merge 1 commit into
Conversation
Add a dedicated QML document parser alongside the existing C++ parser. This addresses a long-standing gap by checking user-facing QML text without treating QML and JavaScript code identifiers as prose. The implementation: - scans line comments, block comments, quoted strings, and template literals - preserves file, line, column, offset, length, and token classification - filters URLs, email addresses, numbers, color values, and all-caps words - splits compound candidates at underscores, dots, numbers, and camelCase boundaries - supports current-file and project-wide operation with background processing - reparses edited documents with debouncing and cancels stale or shutdown work - provides independent settings for comments and string literals - adds the Spell Check context menu to the QML editor - registers the parser and required QML dependencies with Qt Creator - documents behavior, configuration, and lexical-scanner limitations - adds focused tests for extraction, filtering, modes, and source positions - sets the plugin version to 3.12.2 This contribution is intended as a helpful addition for a feature that has been missing for years. It is my first Qt Creator plugin contribution, and I am happy to build humbly on the work of Carel Combrink and the other contributors. Tested with Qt Creator 19.0.2 using the build helper from mpe/qml_check. The QML parser test suite passes with /usr/bin/ctest.
Contributor
Author
|
@CJCombrink ready for review |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add a dedicated QML document parser alongside the existing C++ parser. This addresses a long-standing gap by checking user-facing QML text without treating QML and JavaScript code identifiers as prose.
The implementation:
This contribution is intended as a helpful addition for a feature that has been missing for years. It is my first Qt Creator plugin contribution, and I am happy to build humbly on the work of Carel Combrink @CJCombrink and the other contributors.
Tested with Qt Creator 19.0.2 using the build helper from mpe/qml_check. The QML parser test suite passes with /usr/bin/ctest.
Solves #196