summaryrefslogtreecommitdiff
path: root/DevTools/HackStudio/main.cpp
diff options
context:
space:
mode:
authorLinus Groh <mail@linusgroh.de>2020-05-07 15:32:05 +0100
committerAndreas Kling <kling@serenityos.org>2020-05-07 22:04:56 +0200
commit8d01fd9863a5424ab50d089c64e568d8afd982a4 (patch)
tree539055b4ac211655d562c0a5c600dee15118a11d /DevTools/HackStudio/main.cpp
parent7571e9e4608c0ea35eb7c73b46c63e798955fe9f (diff)
downloadserenity-8d01fd9863a5424ab50d089c64e568d8afd982a4.zip
HackStudio: Apply INI syntax highlighter when opening a .ini file
Diffstat (limited to 'DevTools/HackStudio/main.cpp')
-rw-r--r--DevTools/HackStudio/main.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/DevTools/HackStudio/main.cpp b/DevTools/HackStudio/main.cpp
index 02e5047cc1..ae3941922f 100644
--- a/DevTools/HackStudio/main.cpp
+++ b/DevTools/HackStudio/main.cpp
@@ -48,6 +48,7 @@
#include <LibGUI/Application.h>
#include <LibGUI/BoxLayout.h>
#include <LibGUI/Button.h>
+#include <LibGUI/INISyntaxHighlighter.h>
#include <LibGUI/CppSyntaxHighlighter.h>
#include <LibGUI/FilePicker.h>
#include <LibGUI/InputBox.h>
@@ -735,6 +736,8 @@ void open_file(const String& filename)
current_editor().set_syntax_highlighter(make<GUI::CppSyntaxHighlighter>());
else if (filename.ends_with(".js"))
current_editor().set_syntax_highlighter(make<GUI::JSSyntaxHighlighter>());
+ else if (filename.ends_with(".ini"))
+ current_editor().set_syntax_highlighter(make<GUI::IniSyntaxHighlighter>());
else
current_editor().set_syntax_highlighter(nullptr);