1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 06:37:44 +00:00

GMLPlayground: Use try_make for syntax highlighting and autocomplete

This commit is contained in:
Karol Kosek 2023-05-09 17:03:03 +02:00 committed by Sam Atkins
parent 477ee34215
commit 23ac52bc80

View file

@ -77,8 +77,8 @@ ErrorOr<NonnullRefPtr<MainWidget>> MainWidget::try_create(GUI::Icon const& icon)
main_widget->m_preview = main_widget->m_preview_frame_widget; main_widget->m_preview = main_widget->m_preview_frame_widget;
main_widget->m_editor->set_syntax_highlighter(make<GUI::GML::SyntaxHighlighter>()); main_widget->m_editor->set_syntax_highlighter(TRY(try_make<GUI::GML::SyntaxHighlighter>()));
main_widget->m_editor->set_autocomplete_provider(make<GUI::GML::AutocompleteProvider>()); main_widget->m_editor->set_autocomplete_provider(TRY(try_make<GUI::GML::AutocompleteProvider>()));
main_widget->m_editor->set_should_autocomplete_automatically(true); main_widget->m_editor->set_should_autocomplete_automatically(true);
main_widget->m_editor->set_automatic_indentation_enabled(true); main_widget->m_editor->set_automatic_indentation_enabled(true);
main_widget->m_editor->set_ruler_visible(true); main_widget->m_editor->set_ruler_visible(true);