cmake_format icon indicating copy to clipboard operation
cmake_format copied to clipboard

Align kwarg lists

Open adzenith opened this issue 7 years ago • 5 comments

(This is based on top of #35, so just look at the last commit. I can rebase if you like.)

This adds a config option to align lists of arguments across kwargs. It turns this:

          HEADERS a.h
                  b.h
                  c.h
                  d.h
                  e.h
                  f.h
          SOURCES a.cc b.cc d.cc
          LONG_KWARG foo bar baz)

into this:

          HEADERS    a.h
                     b.h
                     c.h
                     d.h
                     e.h
                     f.h
          SOURCES    a.cc b.cc d.cc
          LONG_KWARG foo bar baz)

It also interacts correctly with #35 if you want something like this:

          HEADERS
                    a.h
                    b.h
                    c.h
                    d.h
                    e.h
                    f.h
          SOURCES
                    a.cc b.cc d.cc
          LONG_KWARG
                    foo bar baz)

adzenith avatar Apr 30 '18 16:04 adzenith

I like the idea of supporting this, but I'll have to think about how to properly implement with the overhauled formatting logic.

cheshirekow avatar Jul 14 '18 19:07 cheshirekow

It's been a long time since I've commented on this PR but I just wanted to mention that it's still on my queue. I think that there are definitely some cases where it makes a lot of sense e.g. ExternalProject_Add. Personally I don't think I would want it to apply all the time, so I'm thinking about the different config options to enable this. I will hopefully address this feature soon.

cheshirekow avatar Oct 19 '19 02:10 cheshirekow

@cheshirekow any latest update on this feature request?

dhruvkakadiya avatar Apr 06 '20 21:04 dhruvkakadiya

@dhruvkakadiya not yet, but it's pretty high up in the queue now.

cheshirekow avatar Apr 10 '20 02:04 cheshirekow

@dhruvkakadiya not yet, but it's pretty high up in the queue now.

Thank you.. will look forward to it.

dhruvkakadiya avatar Apr 10 '20 04:04 dhruvkakadiya