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

HackStudio+TextEditor: Sync extensions from the FileIconProvider file

This adds more possible extensions for highlighting C/C++ files
and JavaScript module files.
This commit is contained in:
Karol Kosek 2021-07-29 22:31:59 +02:00 committed by Gunnar Beutner
parent d1f5cd3c7e
commit ceadbafa97
2 changed files with 9 additions and 6 deletions

View file

@ -625,9 +625,10 @@ void MainWidget::set_path(StringView const& path)
m_extension = lexical_path.extension();
}
if (m_extension == "c" || m_extension == "cc" || m_extension == "cxx" || m_extension == "cpp" || m_extension == "h") {
if (m_extension == "c" || m_extension == "cc" || m_extension == "cxx" || m_extension == "cpp" || m_extension == "c++"
|| m_extension == "h" || m_extension == "hh" || m_extension == "hxx" || m_extension == "hpp" || m_extension == "h++") {
m_cpp_highlight->activate();
} else if (m_extension == "js" || m_extension == "json") {
} else if (m_extension == "js" || m_extension == "mjs" || m_extension == "json") {
m_js_highlight->activate();
} else if (m_extension == "gml") {
m_gml_highlight->activate();