Chore: improve Spell checker API to the example #2133
Merged
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.
Description
It's already known that we have a simple
API
to be able to use our spell checker in the editor, but nevertheless, if we looked closely at how it was working, it was becoming quite cumbersome to activate and deactivate it due to everything that was involved. For this reason, it was updated to the latest version ofsimple_spell_checker
in order to be able to use new methods liketoggleChecker()
(called into the provider astoggleState()
) that just deactivates the service without having to close or replace it (something that we did before since there was no real way to deactivate it without changing the service), andisServiceActive()
so that the developer can always get the status of the service.This not only makes the
API
simpler for other developers but also improved performance since we don't have to change the instance of the service every time we deactivate or activate it.Not related
It was updated to the latest version because if we had the service active there were commonly used characters that were lost or ignored or even checked as if they were a word (for example, in the previous version the character ":" was taken as a word)