MCPcopy Create free account
hub / github.com/cogentcore/core / initSpell

Function initSpell

texteditor/basespell.go:23–34  ·  view source on GitHub ↗

initSpell ensures that the [spell.Spell] spell checker is set up.

()

Source from the content-addressed store, hash-verified

21
22// initSpell ensures that the [spell.Spell] spell checker is set up.
23func initSpell() error {
24 if core.TheApp.Platform().IsMobile() { // todo: too slow -- fix with aspell
25 return nil
26 }
27 if spell.Spell != nil {
28 return nil
29 }
30 pdir := core.TheApp.CogentCoreDataDir()
31 openpath := filepath.Join(pdir, "user_dict_en_us")
32 spell.Spell = spell.NewSpell(openpath)
33 return nil
34}
35
36// spellCheck has all the texteditor spell check state
37type spellCheck struct {

Callers 2

setSpellMethod · 0.85
newSpellFunction · 0.85

Calls 4

NewSpellFunction · 0.92
IsMobileMethod · 0.80
PlatformMethod · 0.65
CogentCoreDataDirMethod · 0.65

Tested by

no test coverage detected