Add Swift, TypeScript, and Go for advanced Auto-indent

Fix #15900, close #15925
This commit is contained in:
Don Ho 2024-12-09 13:27:19 +01:00
parent 83080c3404
commit fdf3ed2714
2 changed files with 3 additions and 2 deletions

View File

@ -3632,7 +3632,8 @@ void Notepad_plus::maintainIndentation(wchar_t ch)
if (type == L_C || type == L_CPP || type == L_JAVA || type == L_CS || type == L_OBJC ||
type == L_PHP || type == L_JS || type == L_JAVASCRIPT || type == L_JSP || type == L_CSS || type == L_PERL ||
type == L_RUST || type == L_POWERSHELL || type == L_JSON || type == L_JSON5 || autoIndentMode == ExternalLexerAutoIndentMode::C_Like)
type == L_RUST || type == L_POWERSHELL || type == L_JSON || type == L_JSON5 || type == L_TYPESCRIPT || type == L_GOLANG || type == L_SWIFT ||
autoIndentMode == ExternalLexerAutoIndentMode::C_Like)
{
if (((eolMode == SC_EOL_CRLF || eolMode == SC_EOL_LF) && ch == '\n') ||
(eolMode == SC_EOL_CR && ch == '\r'))

View File

@ -3298,7 +3298,7 @@ intptr_t CALLBACK IndentationSubDlg::run_dlgProc(UINT message, WPARAM wParam, LP
wstring tipAutoIndentAdvanced2show = pNativeSpeaker->getLocalizedStrFromID("autoIndentAdvanced-tip",
L"Enable smart indentation for \"C-like\" languages and Python. The \"C-like\" languages include:\n"\
L"C, C++, Java, C#, Objective-C, PHP, JavaScript, JSP, CSS, Perl, Rust, PowerShell and JSON.\n"\
L"C, C++, Java, C#, Objective-C, PHP, JavaScript, JSP, CSS, Perl, Rust, PowerShell, TypeScript, Go, Swift and JSON.\n"\
L"\n"\
L"If you select advanced mode but do not edit files in the aforementioned languages, the indentation will remain in basic mode.");