# HG changeset patch # User wenzelm # Date 1497900798 -7200 # Node ID 070f2be51330a17cb4fa819a3aa2b7fd0ebfd37e # Parent e03ff7e831cc66e5d1f0860d358f37e9160f7bc7 added spell-checker completion; diff -r e03ff7e831cc -r 070f2be51330 src/Tools/VSCode/src/vscode_rendering.scala --- a/src/Tools/VSCode/src/vscode_rendering.scala Mon Jun 19 21:15:06 2017 +0200 +++ b/src/Tools/VSCode/src/vscode_rendering.scala Mon Jun 19 21:33:18 2017 +0200 @@ -97,7 +97,11 @@ if (no_completion) Nil else { - Completion.Result.merge(history, semantic_completion, syntax_completion) match { + val results = + Completion.Result.merge(history, + Completion.Result.merge(history, semantic_completion, syntax_completion), + spell_checker_completion(caret)) + results match { case None => Nil case Some(result) => result.items.map(item => @@ -201,6 +205,9 @@ Document_Model.Decoration.ranges("spell_checker", ranges) } + def spell_checker_completion(caret: Text.Offset): Option[Completion.Result] = + model.resources.spell_checker.get.flatMap(_.completion(rendering, caret)) + /* decorations */