Currently the KtlintRuleEngine.format(..) function applies formatting on the entire file or code snippet. For the ktlint-intellij-plugin (https://github.com/nbadal/ktlint-intellij-plugin/issues/385) it is preferred that it possible to only format a selection of the file or code snippet. By passing a range of offsets (start and end offset) the KtlintRuleEngine can apply the autocorrect mode only on nodes for which the startoffset of the node is within the given range of offsets.
Currently the
KtlintRuleEngine.format(..)
function applies formatting on the entire file or code snippet. For thektlint-intellij-plugin
(https://github.com/nbadal/ktlint-intellij-plugin/issues/385) it is preferred that it possible to only format a selection of the file or code snippet. By passing a range of offsets (start and end offset) the KtlintRuleEngine can apply the autocorrect mode only on nodes for which the startoffset of the node is within the given range of offsets.