diff --git a/PowerEditor/Test/FunctionList/toml/unitTest b/PowerEditor/Test/FunctionList/toml/unitTest new file mode 100644 index 000000000..cf47c2262 --- /dev/null +++ b/PowerEditor/Test/FunctionList/toml/unitTest @@ -0,0 +1,58 @@ +# This is a TOML document. + +title = "TOML Example" + + +[owner] +name = "Tom Preston-Werner" +dob = 1979-05-27T07:32:00-08:00 # First class dates + +[database] +server = "192.168.1.1" +ports = [ 8000, 8001, 8002 ] +connection_max = 5000 +enabled = true + +[servers] +toto = "titi" + + # Indentation (spaces) is allowed but not required + [servers.alpha] + ip = "10.0.0.1" + dc = "eqdc10" + + # Indentation (tabs) is allowed but not required + [servers.beta] + ip = "10.0.0.2" + dc = "eqdc10" + +# No indentation is correct too +[servers.gamma] +ip = "10.0.0.3" +dc = "eqdc10" + +[servers_underscore] +ip = "10.0.0.4" +dc = "eqdc10" + +[servers."double-quot"] +ip = "10.0.0.4" +dc = "eqdc10" + +[servers.'single-quot'] +ip = "10.0.0.4" +dc = "eqdc10" + + +[clients] +data = [ ["gamma", "delta"], [1, 2] ] + +[clients-2nd-group] +data2 = "Another data" + + +# Line breaks are OK when inside arrays +hosts = [ + "alpha", + "omega" +] \ No newline at end of file diff --git a/PowerEditor/Test/FunctionList/toml/unitTest.expected.result b/PowerEditor/Test/FunctionList/toml/unitTest.expected.result new file mode 100644 index 000000000..04464a93c --- /dev/null +++ b/PowerEditor/Test/FunctionList/toml/unitTest.expected.result @@ -0,0 +1 @@ +{"leaves":["owner","database","servers","servers.alpha","servers.beta","servers.gamma","servers_underscore","servers.\"double-quot\"","servers.'single-quot'","clients","clients-2nd-group"],"root":"unitTest"} \ No newline at end of file diff --git a/PowerEditor/installer/functionList/toml.xml b/PowerEditor/installer/functionList/toml.xml new file mode 100644 index 000000000..58b171ec3 --- /dev/null +++ b/PowerEditor/installer/functionList/toml.xml @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/PowerEditor/installer/themes/Bespin.xml b/PowerEditor/installer/themes/Bespin.xml index a4894ffd4..b99e36748 100644 --- a/PowerEditor/installer/themes/Bespin.xml +++ b/PowerEditor/installer/themes/Bespin.xml @@ -596,6 +596,23 @@ Credits: + + + + + + + + + + + + + + + + + diff --git a/PowerEditor/installer/themes/Black board.xml b/PowerEditor/installer/themes/Black board.xml index 19b384edd..626ed2429 100644 --- a/PowerEditor/installer/themes/Black board.xml +++ b/PowerEditor/installer/themes/Black board.xml @@ -594,6 +594,23 @@ Credits: + + + + + + + + + + + + + + + + + diff --git a/PowerEditor/installer/themes/Choco.xml b/PowerEditor/installer/themes/Choco.xml index d5f7862ea..e2fd25796 100644 --- a/PowerEditor/installer/themes/Choco.xml +++ b/PowerEditor/installer/themes/Choco.xml @@ -586,6 +586,23 @@ Credits: + + + + + + + + + + + + + + + + + diff --git a/PowerEditor/installer/themes/DansLeRuSH-Dark.xml b/PowerEditor/installer/themes/DansLeRuSH-Dark.xml index d154811a4..0867910eb 100644 --- a/PowerEditor/installer/themes/DansLeRuSH-Dark.xml +++ b/PowerEditor/installer/themes/DansLeRuSH-Dark.xml @@ -983,6 +983,23 @@ Installation : Copy this file to "%APPDATA%\Notepad++\themes" and in a portable + + + + + + + + + + + + + + + + + diff --git a/PowerEditor/installer/themes/DarkModeDefault.xml b/PowerEditor/installer/themes/DarkModeDefault.xml index 84b3847bf..70ffbd65c 100644 --- a/PowerEditor/installer/themes/DarkModeDefault.xml +++ b/PowerEditor/installer/themes/DarkModeDefault.xml @@ -1519,6 +1519,23 @@ License: GPL2 + + + + + + + + + + + + + + + + + diff --git a/PowerEditor/installer/themes/Deep Black.xml b/PowerEditor/installer/themes/Deep Black.xml index e1c9431c1..89c855a62 100644 --- a/PowerEditor/installer/themes/Deep Black.xml +++ b/PowerEditor/installer/themes/Deep Black.xml @@ -568,6 +568,23 @@ https://notepad-plus-plus.org/donate/ + + + + + + + + + + + + + + + + + diff --git a/PowerEditor/installer/themes/Hello Kitty.xml b/PowerEditor/installer/themes/Hello Kitty.xml index df7d2ebe7..1dee0f551 100644 --- a/PowerEditor/installer/themes/Hello Kitty.xml +++ b/PowerEditor/installer/themes/Hello Kitty.xml @@ -841,6 +841,23 @@ so your enhanced file can be included in Notepad++ future release. + + + + + + + + + + + + + + + + + diff --git a/PowerEditor/installer/themes/HotFudgeSundae.xml b/PowerEditor/installer/themes/HotFudgeSundae.xml index 1523ccc1d..db56c7b2e 100644 --- a/PowerEditor/installer/themes/HotFudgeSundae.xml +++ b/PowerEditor/installer/themes/HotFudgeSundae.xml @@ -1006,6 +1006,23 @@ Installation: if else for while bool long int char + + + + + + + + + + + + + + + + + diff --git a/PowerEditor/installer/themes/Mono Industrial.xml b/PowerEditor/installer/themes/Mono Industrial.xml index 86e524d14..b2dd2656a 100644 --- a/PowerEditor/installer/themes/Mono Industrial.xml +++ b/PowerEditor/installer/themes/Mono Industrial.xml @@ -590,6 +590,23 @@ Credits: + + + + + + + + + + + + + + + + + diff --git a/PowerEditor/installer/themes/Monokai.xml b/PowerEditor/installer/themes/Monokai.xml index 0ef1fb4b1..bd8ae2de2 100644 --- a/PowerEditor/installer/themes/Monokai.xml +++ b/PowerEditor/installer/themes/Monokai.xml @@ -590,6 +590,23 @@ Credits: + + + + + + + + + + + + + + + + + diff --git a/PowerEditor/installer/themes/MossyLawn.xml b/PowerEditor/installer/themes/MossyLawn.xml index a6840b411..74b1f8de0 100644 --- a/PowerEditor/installer/themes/MossyLawn.xml +++ b/PowerEditor/installer/themes/MossyLawn.xml @@ -1006,6 +1006,23 @@ Installation: + + + + + + + + + + + + + + + + + diff --git a/PowerEditor/installer/themes/Navajo.xml b/PowerEditor/installer/themes/Navajo.xml index 94f575a5f..07d69251e 100644 --- a/PowerEditor/installer/themes/Navajo.xml +++ b/PowerEditor/installer/themes/Navajo.xml @@ -1003,6 +1003,23 @@ Installation: + + + + + + + + + + + + + + + + + diff --git a/PowerEditor/installer/themes/Obsidian.xml b/PowerEditor/installer/themes/Obsidian.xml index 10bde97ee..19598c5c5 100644 --- a/PowerEditor/installer/themes/Obsidian.xml +++ b/PowerEditor/installer/themes/Obsidian.xml @@ -856,6 +856,23 @@ Notepad++ Custom Style + + + + + + + + + + + + + + + + + diff --git a/PowerEditor/installer/themes/Plastic Code Wrap.xml b/PowerEditor/installer/themes/Plastic Code Wrap.xml index d2d61c1d4..dcabfc602 100644 --- a/PowerEditor/installer/themes/Plastic Code Wrap.xml +++ b/PowerEditor/installer/themes/Plastic Code Wrap.xml @@ -602,6 +602,23 @@ Credits: + + + + + + + + + + + + + + + + + diff --git a/PowerEditor/installer/themes/Ruby Blue.xml b/PowerEditor/installer/themes/Ruby Blue.xml index 03290b2ab..497567e48 100644 --- a/PowerEditor/installer/themes/Ruby Blue.xml +++ b/PowerEditor/installer/themes/Ruby Blue.xml @@ -585,6 +585,23 @@ http://sourceforge.net/donate/index.php?group_id=95717 + + + + + + + + + + + + + + + + + diff --git a/PowerEditor/installer/themes/Solarized-light.xml b/PowerEditor/installer/themes/Solarized-light.xml index 74488d18d..5de556cc3 100644 --- a/PowerEditor/installer/themes/Solarized-light.xml +++ b/PowerEditor/installer/themes/Solarized-light.xml @@ -1014,6 +1014,23 @@ Installation: + + + + + + + + + + + + + + + + + diff --git a/PowerEditor/installer/themes/Solarized.xml b/PowerEditor/installer/themes/Solarized.xml index 1556b79a7..ba5c21db2 100644 --- a/PowerEditor/installer/themes/Solarized.xml +++ b/PowerEditor/installer/themes/Solarized.xml @@ -1376,6 +1376,23 @@ Installation: + + + + + + + + + + + + + + + + + diff --git a/PowerEditor/installer/themes/Twilight.xml b/PowerEditor/installer/themes/Twilight.xml index 349c5c2a8..89373521a 100644 --- a/PowerEditor/installer/themes/Twilight.xml +++ b/PowerEditor/installer/themes/Twilight.xml @@ -591,6 +591,23 @@ Credits: + + + + + + + + + + + + + + + + + diff --git a/PowerEditor/installer/themes/Vibrant Ink.xml b/PowerEditor/installer/themes/Vibrant Ink.xml index bc0161bef..1b4ce3874 100644 --- a/PowerEditor/installer/themes/Vibrant Ink.xml +++ b/PowerEditor/installer/themes/Vibrant Ink.xml @@ -566,6 +566,23 @@ http://sourceforge.net/donate/index.php?group_id=95717 + + + + + + + + + + + + + + + + + diff --git a/PowerEditor/installer/themes/Zenburn.xml b/PowerEditor/installer/themes/Zenburn.xml index 4e1b771f9..171df63ee 100644 --- a/PowerEditor/installer/themes/Zenburn.xml +++ b/PowerEditor/installer/themes/Zenburn.xml @@ -1487,6 +1487,23 @@ License: GPL2 + + + + + + + + + + + + + + + + + diff --git a/PowerEditor/installer/themes/khaki.xml b/PowerEditor/installer/themes/khaki.xml index 4db06a19b..5e1164636 100644 --- a/PowerEditor/installer/themes/khaki.xml +++ b/PowerEditor/installer/themes/khaki.xml @@ -1003,6 +1003,23 @@ Installation: + + + + + + + + + + + + + + + + + diff --git a/PowerEditor/installer/themes/vim Dark Blue.xml b/PowerEditor/installer/themes/vim Dark Blue.xml index 523d62e66..3a731e4ea 100644 --- a/PowerEditor/installer/themes/vim Dark Blue.xml +++ b/PowerEditor/installer/themes/vim Dark Blue.xml @@ -832,6 +832,23 @@ + + + + + + + + + + + + + + + + + diff --git a/PowerEditor/src/MISC/PluginsManager/Notepad_plus_msgs.h b/PowerEditor/src/MISC/PluginsManager/Notepad_plus_msgs.h index d94f64276..97b77dbb7 100644 --- a/PowerEditor/src/MISC/PluginsManager/Notepad_plus_msgs.h +++ b/PowerEditor/src/MISC/PluginsManager/Notepad_plus_msgs.h @@ -39,7 +39,7 @@ enum LangType {L_TEXT, L_PHP , L_C, L_CPP, L_CS, L_OBJC, L_JAVA, L_RC,\ L_MMIXAL, L_NIM, L_NNCRONTAB, L_OSCRIPT, L_REBOL, \ L_REGISTRY, L_RUST, L_SPICE, L_TXT2TAGS, L_VISUALPROLOG,\ L_TYPESCRIPT, L_JSON5, L_MSSQL, L_GDSCRIPT, L_HOLLYWOOD,\ - L_GOLANG, L_RAKU,\ + L_GOLANG, L_RAKU, L_TOML,\ // Don't use L_JS, use L_JAVASCRIPT instead // The end of enumated language type, so it should be always at the end L_EXTERNAL}; diff --git a/PowerEditor/src/Notepad_plus.cpp b/PowerEditor/src/Notepad_plus.cpp index f668d3369..e4247796c 100644 --- a/PowerEditor/src/Notepad_plus.cpp +++ b/PowerEditor/src/Notepad_plus.cpp @@ -4058,6 +4058,8 @@ LangType Notepad_plus::menuID2LangType(int cmdID) return L_GOLANG; case IDM_LANG_RAKU: return L_RAKU; + case IDM_LANG_TOML: + return L_TOML; case IDM_LANG_USER: return L_USER; default: diff --git a/PowerEditor/src/Notepad_plus.rc b/PowerEditor/src/Notepad_plus.rc index bb48bd5c2..6fa7c696d 100644 --- a/PowerEditor/src/Notepad_plus.rc +++ b/PowerEditor/src/Notepad_plus.rc @@ -1041,6 +1041,7 @@ BEGIN MENUITEM "TCL", IDM_LANG_TCL MENUITEM "Tektronix extended HEX", IDM_LANG_TEHEX MENUITEM "TeX", IDM_LANG_TEX + MENUITEM "TOML", IDM_LANG_TOML MENUITEM "txt2tags", IDM_LANG_TXT2TAGS MENUITEM "TypeScript", IDM_LANG_TYPESCRIPT MENUITEM "Verilog", IDM_LANG_VERILOG @@ -1193,6 +1194,7 @@ BEGIN MENUITEM "TCL", IDM_LANG_TCL MENUITEM "Tektronix extended HEX",IDM_LANG_TEHEX MENUITEM "TeX", IDM_LANG_TEX + MENUITEM "TOML", IDM_LANG_TOML MENUITEM "txt2tags", IDM_LANG_TXT2TAGS MENUITEM "TypeScript", IDM_LANG_TYPESCRIPT END diff --git a/PowerEditor/src/NppCommands.cpp b/PowerEditor/src/NppCommands.cpp index b0012f473..5edf7cd1c 100644 --- a/PowerEditor/src/NppCommands.cpp +++ b/PowerEditor/src/NppCommands.cpp @@ -3845,6 +3845,7 @@ void Notepad_plus::command(int id) case IDM_LANG_HOLLYWOOD: case IDM_LANG_GOLANG: case IDM_LANG_RAKU: + case IDM_LANG_TOML: case IDM_LANG_USER : { setLanguage(menuID2LangType(id)); diff --git a/PowerEditor/src/Parameters.cpp b/PowerEditor/src/Parameters.cpp index ba58025f4..20603100d 100644 --- a/PowerEditor/src/Parameters.cpp +++ b/PowerEditor/src/Parameters.cpp @@ -8266,6 +8266,9 @@ int NppParameters::langTypeToCommandID(LangType lt) const case L_RAKU: id = IDM_LANG_RAKU; break; + + case L_TOML: + id = IDM_LANG_TOML; break; case L_SEARCHRESULT : id = -1; break; diff --git a/PowerEditor/src/ScintillaComponent/Buffer.cpp b/PowerEditor/src/ScintillaComponent/Buffer.cpp index dbd163289..e3fee87d7 100644 --- a/PowerEditor/src/ScintillaComponent/Buffer.cpp +++ b/PowerEditor/src/ScintillaComponent/Buffer.cpp @@ -134,7 +134,7 @@ void Buffer::setLangType(LangType lang, const wchar_t* userLangName) _userLangExt = userLangName; _needLexer = true; //change of lang means lexern needs updating - doNotify(BufferChangeLanguage|BufferChangeLexing); + doNotify(BufferChangeLanguage | BufferChangeLexing); } diff --git a/PowerEditor/src/ScintillaComponent/ScintillaEditView.cpp b/PowerEditor/src/ScintillaComponent/ScintillaEditView.cpp index c51c8a64e..36e2e3616 100644 --- a/PowerEditor/src/ScintillaComponent/ScintillaEditView.cpp +++ b/PowerEditor/src/ScintillaComponent/ScintillaEditView.cpp @@ -161,6 +161,7 @@ LanguageNameInfo ScintillaEditView::_langNameInfoArray[L_EXTERNAL + 1] = { {L"hollywood", L"Hollywood", L"Hollywood script", L_HOLLYWOOD, "hollywood"}, {L"go", L"Go", L"Go source file", L_GOLANG, "cpp"}, {L"raku", L"Raku", L"Raku source file", L_RAKU, "raku"}, + {L"toml", L"TOML", L"Tom's Obvious Minimal Language file", L_TOML, "toml"}, {L"ext", L"External", L"External", L_EXTERNAL, "null"} }; @@ -2063,6 +2064,9 @@ void ScintillaEditView::defineDocType(LangType typeDoc) case L_RAKU: setRakuLexer(); break; + case L_TOML: + setTomlLexer(); break; + case L_TEXT : default : if (typeDoc >= L_EXTERNAL && typeDoc < NppParameters::getInstance().L_END) diff --git a/PowerEditor/src/ScintillaComponent/ScintillaEditView.h b/PowerEditor/src/ScintillaComponent/ScintillaEditView.h index 30d00431a..b1326ff90 100644 --- a/PowerEditor/src/ScintillaComponent/ScintillaEditView.h +++ b/PowerEditor/src/ScintillaComponent/ScintillaEditView.h @@ -1252,6 +1252,10 @@ protected: execute(SCI_SETPROPERTY, reinterpret_cast("fold.raku.comment.pod"), reinterpret_cast("1")); }; + void setTomlLexer(){ + setLexer(L_TOML, LIST_0); + }; + //-------------------- void setSearchResultLexer() { diff --git a/PowerEditor/src/langs.model.xml b/PowerEditor/src/langs.model.xml index 61f060997..f5d0f7f8c 100644 --- a/PowerEditor/src/langs.model.xml +++ b/PowerEditor/src/langs.model.xml @@ -565,6 +565,9 @@ + + false inf nan true + addhandler addressof aggregate alias and andalso ansi as assembly async attribute auto await begin binary boolean by byref byte byval call case catch cbool cbyte cchar ccur cdate cdbl cdec char cint class clng clnglng clngptr cobj compare const continue csbyte cshort csng cstr ctype cuint culng currency cushort custom cvar date decimal declare default defbool defbyte defcur defdate defdbl defdec defint deflng deflnglng deflngptr defobj defsng defstr defvar delegate dim directcast distinct do double each else elseif end endif enum equals erase error event exit explicit false finally for friend from function get gettype global gosub goto group handles if implement implements imports in inherits integer interface into is isfalse isnot istrue iterator join key let lib like load long longlong longptr loop lset me mid mod module mustinherit mustoverride mybase myclass namespace narrowing new next not nothing notinheritable notoverridable object of off on operator option optional or order orelse out overloads overridable overrides paramarray partial preserve private property protected ptrsafe public raiseevent readonly redim rem removehandler resume return rset sbyte select set shadows shared short single skip static step stop strict string structure sub synclock take text then throw to true try trycast type typeof uinteger ulong unicode unload until ushort using variant vbarray vbboolean vbbyte vbcurrency vbdataobject vbdate vbdecimal vbdouble vbempty vberror vbinteger vblong vblonglong vbnull vbobject vbsingle vbuserdefinedtype vbvariant wend when where while widening with withevents writeonly xor yield diff --git a/PowerEditor/src/menuCmdID.h b/PowerEditor/src/menuCmdID.h index 6895bc209..ffe43b6e1 100644 --- a/PowerEditor/src/menuCmdID.h +++ b/PowerEditor/src/menuCmdID.h @@ -561,6 +561,7 @@ #define IDM_LANG_HOLLYWOOD (IDM_LANG + 88) #define IDM_LANG_GOLANG (IDM_LANG + 89) #define IDM_LANG_RAKU (IDM_LANG + 90) + #define IDM_LANG_TOML (IDM_LANG + 91) #define IDM_LANG_EXTERNAL (IDM_LANG + 165) #define IDM_LANG_EXTERNAL_LIMIT (IDM_LANG + 179) diff --git a/PowerEditor/src/stylers.model.xml b/PowerEditor/src/stylers.model.xml index fa892f4dd..1e5dd4cb6 100644 --- a/PowerEditor/src/stylers.model.xml +++ b/PowerEditor/src/stylers.model.xml @@ -542,6 +542,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -837,10 +864,10 @@ - - - - + + + + @@ -1012,47 +1039,47 @@ - - carp croak - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + carp croak + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -1187,36 +1214,36 @@ - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + - - - - - - - + + + + + + + @@ -1495,6 +1522,23 @@ + + + + + + + + + + + + + + + + + @@ -1550,33 +1594,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - -