mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 04:48:14 +00:00
HackStudio+TextEditor: Add the Shell syntax highlighter
This commit is contained in:
parent
72b68221cc
commit
c1fc27cab2
5 changed files with 14 additions and 2 deletions
|
@ -66,6 +66,7 @@
|
|||
#include <LibGUI/Menu.h>
|
||||
#include <LibGUI/MenuBar.h>
|
||||
#include <LibGUI/MessageBox.h>
|
||||
#include <LibGUI/ShellSyntaxHighlighter.h>
|
||||
#include <LibGUI/Splitter.h>
|
||||
#include <LibGUI/StackWidget.h>
|
||||
#include <LibGUI/TabWidget.h>
|
||||
|
@ -216,6 +217,8 @@ void HackStudioWidget::open_file(const String& filename)
|
|||
current_editor().set_syntax_highlighter(make<GUI::JSSyntaxHighlighter>());
|
||||
else if (filename.ends_with(".ini"))
|
||||
current_editor().set_syntax_highlighter(make<GUI::IniSyntaxHighlighter>());
|
||||
else if (filename.ends_with(".sh"))
|
||||
current_editor().set_syntax_highlighter(make<GUI::ShellSyntaxHighlighter>());
|
||||
else
|
||||
current_editor().set_syntax_highlighter(nullptr);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue