diff --git a/harper-core/src/linting/spell_check.rs b/harper-core/src/linting/spell_check.rs index 63baaa03..11b1d788 100644 --- a/harper-core/src/linting/spell_check.rs +++ b/harper-core/src/linting/spell_check.rs @@ -26,7 +26,10 @@ impl Linter for SpellCheck { continue; } - let possibilities = suggest_correct_spelling(word_chars, 3, 3, &self.dictionary); + let mut possibilities = suggest_correct_spelling(word_chars, 10, 3, &self.dictionary); + + // People more likely to misspell words by omission, so show the longest words first. + possibilities.sort_by_key(|p| usize::MAX - p.len()); let suggestions = possibilities .into_iter()