mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 11:48:10 +00:00
HackStudio: Enable CMake syntax highlighting
This commit is contained in:
parent
ac824677b8
commit
0d0ad22572
4 changed files with 10 additions and 2 deletions
|
@ -5,7 +5,6 @@
|
|||
*/
|
||||
|
||||
#include "Language.h"
|
||||
#include <AK/LexicalPath.h>
|
||||
|
||||
namespace HackStudio {
|
||||
|
||||
|
@ -19,6 +18,8 @@ Language language_from_file(LexicalPath const& file)
|
|||
if (extension == "c" || extension == "cc" || extension == "cxx" || extension == "cpp" || extension == "c++"
|
||||
|| extension == "h" || extension == "hh" || extension == "hxx" || extension == "hpp" || extension == "h++")
|
||||
return Language::Cpp;
|
||||
if (extension == "cmake" || (extension == "txt" && file.title() == "CMakeLists"))
|
||||
return Language::CMake;
|
||||
if (extension == "js" || extension == "mjs" || extension == "json")
|
||||
return Language::JavaScript;
|
||||
if (extension == "html" || extension == "htm")
|
||||
|
@ -61,6 +62,8 @@ DeprecatedString language_name_from_file(LexicalPath const& file)
|
|||
if (extension == "c" || extension == "cc" || extension == "cxx" || extension == "cpp" || extension == "c++"
|
||||
|| extension == "h" || extension == "hh" || extension == "hxx" || extension == "hpp" || extension == "h++")
|
||||
return "C++";
|
||||
if (extension == "cmake" || (extension == "txt" && file.title() == "CMakeLists"))
|
||||
return "CMake";
|
||||
if (extension == "js" || extension == "mjs" || extension == "json")
|
||||
return "JavaScript";
|
||||
if (extension == "gml")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue