ktfmt icon indicating copy to clipboard operation
ktfmt copied to clipboard

Ignore specific multi-line code

Open AlexandrosAlexiou opened this issue 1 year ago • 2 comments

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!

AlexandrosAlexiou avatar Sep 09 '24 07:09 AlexandrosAlexiou

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.

davidtorosyan avatar Sep 17 '24 18:09 davidtorosyan

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

darioseidl avatar Sep 26 '24 11:09 darioseidl

We'll be using Google Java Format to back that. Once they support it you can reopen so we bring that feature to ktfmt

hick209 avatar May 21 '25 05:05 hick209