mirror of https://github.com/buggins/dlangide.git
smart indents support
This commit is contained in:
parent
eb66d0d27c
commit
ba7b25e65f
|
@ -637,5 +637,21 @@ class SimpleDSyntaxSupport : SyntaxSupport {
|
||||||
if (elapsed > 20)
|
if (elapsed > 20)
|
||||||
Log.d("updateHighlight took ", elapsed, "ms");
|
Log.d("updateHighlight took ", elapsed, "ms");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/// returns true if smart indent is supported
|
||||||
|
override bool supportsSmartIndents() {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// apply smart indent, if supported
|
||||||
|
override void applySmartIndent(EditOperation op, Object source) {
|
||||||
|
if (op.isInsertNewLine) {
|
||||||
|
// Enter key pressed - new line inserted or splitted
|
||||||
|
} else if (op.singleChar == '}') {
|
||||||
|
// } entered - probably need
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue