diff --git a/PowerEditor/src/MISC/PluginsManager/Notepad_plus_msgs.h b/PowerEditor/src/MISC/PluginsManager/Notepad_plus_msgs.h index eca8c2db9..a5eec5658 100644 --- a/PowerEditor/src/MISC/PluginsManager/Notepad_plus_msgs.h +++ b/PowerEditor/src/MISC/PluginsManager/Notepad_plus_msgs.h @@ -37,6 +37,7 @@ enum LangType {L_TEXT, L_PHP , L_C, L_CPP, L_CS, L_OBJC, L_JAVA, L_RC,\ L_ASM, L_DIFF, L_PROPS, L_PS, L_RUBY, L_SMALLTALK, L_VHDL, L_KIX, L_AU3,\ L_CAML, L_ADA, L_VERILOG, L_MATLAB, L_HASKELL, L_INNO, L_SEARCHRESULT,\ L_CMAKE, L_YAML, L_COBOL, L_GUI4CLI, L_D, L_POWERSHELL, L_R, L_JSP,\ + L_COFFEESCRIPT,\ // The end of enumated language type, so it should be always at the end L_EXTERNAL}; enum winVer{WV_UNKNOWN, WV_WIN32S, WV_95, WV_98, WV_ME, WV_NT, WV_W2K, WV_XP, WV_S2003, WV_XPX64, WV_VISTA, WV_WIN7, WV_WIN8}; diff --git a/PowerEditor/src/Notepad_plus.cpp b/PowerEditor/src/Notepad_plus.cpp index ca819b76c..780eb8cfa 100644 --- a/PowerEditor/src/Notepad_plus.cpp +++ b/PowerEditor/src/Notepad_plus.cpp @@ -2514,6 +2514,8 @@ enum LangType Notepad_plus::menuID2LangType(int cmdID) return L_POWERSHELL; case IDM_LANG_R : return L_R; + case IDM_LANG_COFFEESCRIPT : + return L_COFFEESCRIPT; case IDM_LANG_USER : return L_USER; diff --git a/PowerEditor/src/Notepad_plus.rc b/PowerEditor/src/Notepad_plus.rc index 3ac33e012..cf5523f9e 100644 --- a/PowerEditor/src/Notepad_plus.rc +++ b/PowerEditor/src/Notepad_plus.rc @@ -629,6 +629,7 @@ BEGIN MENUITEM "Caml", IDM_LANG_CAML MENUITEM "Cmake", IDM_LANG_CMAKE MENUITEM "COBOL", IDM_LANG_COBOL + MENUITEM "Coffee script", IDM_LANG_COFFEESCRIPT MENUITEM "CSS", IDM_LANG_CSS MENUITEM "D", IDM_LANG_D MENUITEM "Diff", IDM_LANG_DIFF @@ -695,6 +696,7 @@ BEGIN MENUITEM "Caml", IDM_LANG_CAML MENUITEM "Cmake", IDM_LANG_CMAKE MENUITEM "COBOL", IDM_LANG_COBOL + MENUITEM "Coffee script", IDM_LANG_COFFEESCRIPT MENUITEM "CSS", IDM_LANG_CSS END POPUP "D" diff --git a/PowerEditor/src/NppCommands.cpp b/PowerEditor/src/NppCommands.cpp index 231f37de2..53cbaef19 100644 --- a/PowerEditor/src/NppCommands.cpp +++ b/PowerEditor/src/NppCommands.cpp @@ -2317,6 +2317,7 @@ void Notepad_plus::command(int id) case IDM_LANG_POWERSHELL : case IDM_LANG_R : case IDM_LANG_JSP : + case IDM_LANG_COFFEESCRIPT: case IDM_LANG_USER : { setLanguage(menuID2LangType(id)); diff --git a/PowerEditor/src/Parameters.cpp b/PowerEditor/src/Parameters.cpp index aa91d91dc..a9f0e58c0 100644 --- a/PowerEditor/src/Parameters.cpp +++ b/PowerEditor/src/Parameters.cpp @@ -5477,6 +5477,9 @@ int NppParameters::langTypeToCommandID(LangType lt) const case L_R : id = IDM_LANG_R; break; + case L_COFFEESCRIPT : + id = IDM_LANG_COFFEESCRIPT; break; + case L_SEARCHRESULT : id = -1; break; diff --git a/PowerEditor/src/ScitillaComponent/ScintillaEditView.cpp b/PowerEditor/src/ScitillaComponent/ScintillaEditView.cpp index 7ad78b78c..b8f5e383c 100644 --- a/PowerEditor/src/ScitillaComponent/ScintillaEditView.cpp +++ b/PowerEditor/src/ScitillaComponent/ScintillaEditView.cpp @@ -131,6 +131,7 @@ LanguageName ScintillaEditView::langNames[L_EXTERNAL+1] = { {TEXT("powershell"), TEXT("PowerShell"), TEXT("Windows PowerShell"), L_POWERSHELL, SCLEX_POWERSHELL}, {TEXT("r"), TEXT("R"), TEXT("R programming language"), L_R, SCLEX_R}, {TEXT("jsp"), TEXT("JSP"), TEXT("JavaServer Pages script file"), L_JSP, SCLEX_HTML}, +{TEXT("coffeeScript"), TEXT("Coffee Script"), TEXT("Coffee script file"), L_COFFEESCRIPT, SCLEX_COFFEESCRIPT}, {TEXT("ext"), TEXT("External"), TEXT("External"), L_EXTERNAL, SCLEX_NULL} }; @@ -1432,6 +1433,9 @@ void ScintillaEditView::defineDocType(LangType typeDoc) case L_R : setRLexer(); break; + case L_COFFEESCRIPT : + setCoffeeScriptLexer(); break; + case L_TEXT : default : if (typeDoc >= L_EXTERNAL && typeDoc < NppParameters::getInstance()->L_END) diff --git a/PowerEditor/src/ScitillaComponent/ScintillaEditView.h b/PowerEditor/src/ScitillaComponent/ScintillaEditView.h index e21898335..5c7fab6db 100644 --- a/PowerEditor/src/ScitillaComponent/ScintillaEditView.h +++ b/PowerEditor/src/ScitillaComponent/ScintillaEditView.h @@ -890,6 +890,10 @@ protected: void setRLexer() { setLexer(SCLEX_R, L_R, LIST_0 | LIST_1 | LIST_2); }; + + void setCoffeeScriptLexer() { + setLexer(SCLEX_COFFEESCRIPT, L_COFFEESCRIPT, LIST_0 | LIST_1 | LIST_2 | LIST_3); + }; //-------------------- diff --git a/PowerEditor/src/menuCmdID.h b/PowerEditor/src/menuCmdID.h index ba8726e8c..351510b8c 100644 --- a/PowerEditor/src/menuCmdID.h +++ b/PowerEditor/src/menuCmdID.h @@ -420,6 +420,7 @@ #define IDM_LANG_POWERSHELL (IDM_LANG + 53) #define IDM_LANG_R (IDM_LANG + 54) #define IDM_LANG_JSP (IDM_LANG + 55) + #define IDM_LANG_COFFEESCRIPT (IDM_LANG + 56) #define IDM_LANG_EXTERNAL (IDM_LANG + 65) #define IDM_LANG_EXTERNAL_LIMIT (IDM_LANG + 79) diff --git a/PowerEditor/src/stylers.model.xml b/PowerEditor/src/stylers.model.xml index cbf277960..1fa16eeb1 100644 --- a/PowerEditor/src/stylers.model.xml +++ b/PowerEditor/src/stylers.model.xml @@ -774,6 +774,24 @@ + + + + + + + + + + + + + + + + + +