facebook / ktfmt

A program that reformats Kotlin source code to comply with the common community standard for Kotlin code conventions.
https://facebook.github.io/ktfmt/
Apache License 2.0
924 stars 77 forks source link

Ignore specific multi-line code #515

Open AlexandrosAlexiou opened 2 months ago

AlexandrosAlexiou commented 2 months ago

Hello there!

Is there a way to ignore specific lines with pragma directives?

eg.

// format:off
...
// format:on

Are there plans to add this kind of feature?

Thanks!

davidtorosyan commented 2 months ago

Don't think we have this / plan to have this today.

Two questions:

  1. What's the scenario / why do you want this?
  2. Do you know if GJF supports this? If not, it would be tough, since that's the engine we use.
darioseidl commented 1 month ago

GJF doesn't support that. There is a feature request for it with many arguments for and against it.