Skip to content
This repository was archived by the owner on Oct 18, 2024. It is now read-only.

Commit 0947a33

Browse files
committed
fix(editor/treesitter): improve indentation logic to handle cases like lambdas in Java
1 parent bb62d53 commit 0947a33

File tree

5 files changed

+323
-246
lines changed

5 files changed

+323
-246
lines changed

editor/src/main/java/com/itsaky/androidide/editor/language/IDELanguage.kt

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,8 +105,11 @@ abstract class IDELanguage : Language {
105105
return formatter ?: LSPFormatter(languageServer).also { formatter = it }
106106
}
107107

108-
override fun getIndentAdvance(content: ContentReference, line: Int,
109-
column: Int): Int {
108+
override fun getIndentAdvance(
109+
content: ContentReference,
110+
line: Int,
111+
column: Int
112+
): Int {
110113
return getIndentAdvance(content.getLine(line).substring(0, column))
111114
}
112115

0 commit comments

Comments
 (0)