Open bordaigorl opened 5 years ago
Maybe I'm wrong, but doesn't Sublime just use the system's spellcheck?
From the docs:
Sublime Text uses Hunspell for its spell checking support.
That's the only official statement on this I could find...
Also from the same docs:
Commands
next_misspelling
: Select the next misspellingprev_misspelling
: Select the previous misspellingadd_word
: Adds the word given by the word argument to the add listignore_word
: Adds the word given by the word argument to the ignore list
which offers a rather limited interface.
Was about to request the same thing. It would be really good to have something like that in place as currently there is no way to pick a spell check suggestion rather than using a mouse/trackpad which is very inconvenient
Problem description
There is currently no API to control/interact with the spell checker. It is impossible, for example, to obtain a list of suggested changes, obtain a list of the spelling errors, apply a suggestion. Possible use cases:
Preferred solution
An API exposing the basic spellchecker functions.
Ideally:
view.spelling()
returns aSpelling
objectSpelling.mistakes()
returns list of regionsSpelling.check(region)
returns list of suggestionsSpelling.set/get_dictionary(...)
Spelling.on_suggestion_accepted
event (just before suggestion is applied)Optionally, spell checking functionality could be provided independently of views, i.e.
sublime.spellchecker()
returns an instance ofSpellchecker
with API likeSpellchecker.config(dict)
,Spellchecker.check(text)
etc..