@@ -195,7 +195,9 @@ impl EditorView {
195195 .find_scope_index("diagnostic")
196196 .or_else(|| theme.find_scope_index("ui.cursor"))
197197 .or_else(|| theme.find_scope_index("ui.selection"))
198− .expect("no selection scope found!");
198+ .expect(
199+ "at least one of the following scopes must be defined in the theme: `diagnostic`, `ui.cursor`, or `ui.selection`",
200+ );
199201
200202 doc.diagnostics()
201203 .iter()
@@ -220,7 +222,7 @@ impl EditorView {
220222
221223 let selection_scope = theme
222224 .find_scope_index("ui.selection")
223− .expect("no selection scope found!");
225+ .expect("could not find `ui.selection` scope in the theme!");
224226 let base_cursor_scope = theme
225227 .find_scope_index("ui.cursor")
226228 .unwrap_or(selection_scope);