mirror of
https://github.com/RGBCube/serenity
synced 2025-05-17 12:25:07 +00:00

.html files were recognised before -- the name was shown on the statusbar, but it didn't actually enable the syntax highlighting. This also sneaks a highlighting for JSON using JS highlighting. It isn't technically correct, but so does TextEditor. :^)
27 lines
433 B
C++
27 lines
433 B
C++
/*
|
|
* Copyright (c) 2020, the SerenityOS developers.
|
|
*
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include <AK/String.h>
|
|
|
|
namespace HackStudio {
|
|
enum class Language {
|
|
Unknown,
|
|
Cpp,
|
|
JavaScript,
|
|
HTML,
|
|
GML,
|
|
Ini,
|
|
Shell,
|
|
SQL,
|
|
};
|
|
|
|
Language language_from_file_extension(const String&);
|
|
Language language_from_name(const String&);
|
|
String language_name_from_file_extension(const String&);
|
|
|
|
}
|