Skip to content

Commit

Permalink
Add Swift, TypeScript, and Go for advanced Auto-indent
Browse files Browse the repository at this point in the history
  • Loading branch information
donho committed Dec 9, 2024
1 parent 83080c3 commit fdf3ed2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion PowerEditor/src/Notepad_plus.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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'))
Expand Down
2 changes: 1 addition & 1 deletion PowerEditor/src/WinControls/Preference/preferenceDlg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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.");

Expand Down

0 comments on commit fdf3ed2

Please sign in to comment.