summaryrefslogtreecommitdiff
path: root/Userland/DevTools/HackStudio
diff options
context:
space:
mode:
Diffstat (limited to 'Userland/DevTools/HackStudio')
-rw-r--r--Userland/DevTools/HackStudio/Editor.cpp4
-rw-r--r--Userland/DevTools/HackStudio/Language.cpp4
-rw-r--r--Userland/DevTools/HackStudio/Language.h1
3 files changed, 9 insertions, 0 deletions
diff --git a/Userland/DevTools/HackStudio/Editor.cpp b/Userland/DevTools/HackStudio/Editor.cpp
index d93a6509b0..46ba8c8a35 100644
--- a/Userland/DevTools/HackStudio/Editor.cpp
+++ b/Userland/DevTools/HackStudio/Editor.cpp
@@ -30,6 +30,7 @@
#include <LibJS/SyntaxHighlighter.h>
#include <LibMarkdown/Document.h>
#include <LibSQL/AST/SyntaxHighlighter.h>
+#include <LibWeb/CSS/SyntaxHighlighter/SyntaxHighlighter.h>
#include <LibWeb/DOM/Text.h>
#include <LibWeb/HTML/HTMLHeadElement.h>
#include <LibWeb/HTML/SyntaxHighlighter/SyntaxHighlighter.h>
@@ -594,6 +595,9 @@ void Editor::set_syntax_highlighter_for(const CodeDocument& document)
case Language::Cpp:
set_syntax_highlighter(make<Cpp::SyntaxHighlighter>());
break;
+ case Language::CSS:
+ set_syntax_highlighter(make<Web::CSS::SyntaxHighlighter>());
+ break;
case Language::GML:
set_syntax_highlighter(make<GUI::GMLSyntaxHighlighter>());
break;
diff --git a/Userland/DevTools/HackStudio/Language.cpp b/Userland/DevTools/HackStudio/Language.cpp
index ea20a39adf..229bfae64c 100644
--- a/Userland/DevTools/HackStudio/Language.cpp
+++ b/Userland/DevTools/HackStudio/Language.cpp
@@ -18,6 +18,8 @@ Language language_from_file_extension(const String& extension)
return Language::JavaScript;
if (extension == "html" || extension == "htm")
return Language::HTML;
+ if (extension == "css")
+ return Language::CSS;
if (extension == "gml")
return Language::GML;
if (extension == "ini")
@@ -60,6 +62,8 @@ String language_name_from_file_extension(const String& extension)
return "Markdown";
if (extension == "html" || extension == "htm")
return "HTML";
+ if (extension == "css")
+ return "CSS";
if (extension == "sql")
return "SQL";
if (extension == "txt")
diff --git a/Userland/DevTools/HackStudio/Language.h b/Userland/DevTools/HackStudio/Language.h
index 24806b115f..fc3e172c8f 100644
--- a/Userland/DevTools/HackStudio/Language.h
+++ b/Userland/DevTools/HackStudio/Language.h
@@ -12,6 +12,7 @@ namespace HackStudio {
enum class Language {
Unknown,
Cpp,
+ CSS,
JavaScript,
HTML,
GML,