Skip to content

Commit

Permalink
fix(editor/treesitter): improve indentation logic to handle cases lik…
Browse files Browse the repository at this point in the history
…e lambdas in Java
  • Loading branch information
itsaky committed Mar 30, 2024
1 parent bb62d53 commit 0947a33
Show file tree
Hide file tree
Showing 5 changed files with 323 additions and 246 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -105,8 +105,11 @@ abstract class IDELanguage : Language {
return formatter ?: LSPFormatter(languageServer).also { formatter = it }
}

override fun getIndentAdvance(content: ContentReference, line: Int,
column: Int): Int {
override fun getIndentAdvance(
content: ContentReference,
line: Int,
column: Int
): Int {
return getIndentAdvance(content.getLine(line).substring(0, column))
}

Expand Down
Loading

0 comments on commit 0947a33

Please sign in to comment.