mirror of
https://github.com/notepad-plus-plus/notepad-plus-plus.git
synced 2025-07-25 23:05:13 +02:00
Add Swift, TypeScript, and Go for advanced Auto-indent
Fix #15900, close #15925
This commit is contained in:
parent
83080c3404
commit
fdf3ed2714
@ -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'))
|
||||
|
@ -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.");
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user