computeFromPrecedingElements
open fun computeFromPrecedingElements(precedingElements: List<TextElement>): List<TextElement>(source)
Computes the indentation that should be used based on the elements preceding the current position. This analyzes the elements to find the last newline and extracts all whitespace characters that follow it. This method is used when we need to match existing indentation in the source code.
Return
list of indentation elements (spaces/tabs) after the last newline, or empty list if no newline found
Parameters
precedingElements
elements before the current position