diff --git a/DevTools/HackStudio/Makefile b/DevTools/HackStudio/Makefile index d1f17a0651..50443ca585 100644 --- a/DevTools/HackStudio/Makefile +++ b/DevTools/HackStudio/Makefile @@ -17,6 +17,6 @@ OBJS = \ PROGRAM = HackStudio -LIB_DEPS = GUI Web VT Protocol Markdown Gfx IPC Thread Pthread Core +LIB_DEPS = GUI Web VT Protocol Markdown Gfx IPC Thread Pthread Core JS include ../../Makefile.common diff --git a/DevTools/HackStudio/main.cpp b/DevTools/HackStudio/main.cpp index 3f987dd4f9..5a5a128460 100644 --- a/DevTools/HackStudio/main.cpp +++ b/DevTools/HackStudio/main.cpp @@ -46,6 +46,7 @@ #include #include #include +#include #include #include #include @@ -590,6 +591,10 @@ void open_file(const String& filename) if (filename.ends_with(".cpp") || filename.ends_with(".h")) current_editor().set_syntax_highlighter(make()); + else if (filename.ends_with(".js")) + current_editor().set_syntax_highlighter(make()); + else + current_editor().set_syntax_highlighter(nullptr); if (filename.ends_with(".frm")) { set_edit_mode(EditMode::Form);