1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 15:48:12 +00:00

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
parent ffce6cc977
commit 08c1effc04
9 changed files with 35 additions and 160 deletions

View file

@ -24,8 +24,7 @@ CodeDocument::CodeDocument(DeprecatedString const& file_path, Client* client)
, m_file_path(file_path)
{
auto lexical_path = LexicalPath(file_path);
m_language = language_from_file(lexical_path);
m_language_name = language_name_from_file(lexical_path);
m_language = Syntax::language_from_filename(lexical_path);
}
CodeDocument::CodeDocument(Client* client)