HackStudio: Use Syntax::Language instead of our own one

The one behavior difference here is that the statusbar used to display
"Unknown" for unknown file types, and "Markdown" for md, but we now
display "Plain Text" for all file types without syntax highlighters.
This commit is contained in:
Sam Atkins 2023-03-08 20:59:05 +00:00 committed by Sam Atkins
commit 08c1effc04
Notes: sideshowbarker 2024-07-16 23:04:12 +09:00
9 changed files with 35 additions and 160 deletions

View file

@ -1614,7 +1614,7 @@ void HackStudioWidget::update_statusbar()
}
m_statusbar->set_text(0, builder.to_deprecated_string());
m_statusbar->set_text(1, current_editor_wrapper().editor().code_document().language_name());
m_statusbar->set_text(1, Syntax::language_to_string(current_editor_wrapper().editor().code_document().language().value_or(Syntax::Language::PlainText)));
m_statusbar->set_text(2, DeprecatedString::formatted("Ln {}, Col {}", current_editor().cursor().line() + 1, current_editor().cursor().column()));
}