Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

struct element alignment #135

Open
lmajano opened this issue Dec 2, 2021 · 5 comments
Open

struct element alignment #135

lmajano opened this issue Dec 2, 2021 · 5 comments

Comments

@lmajano
Copy link

lmajano commented Dec 2, 2021

@jcberquist what can we do to do alignment for struct literals when doing method calls or assignments.

This code

var s = {
	themeName : currentSite.getActiveTheme(),
	themeRecord : themeRecord,
	site : currentSite
}

// Or This
variables.interceptorService.announce(
  "cbadmin_onThemeDeactivation",
  {
	themeName   : currentSite.getActiveTheme(),
	themeRecord : themeRecord,
	site  : currentSite
  }
);

To look like this

var s = {
	themeName   : currentSite.getActiveTheme(),
	themeRecord : themeRecord,
	site                 : currentSite
}

// Or This
variables.interceptorService.announce(
  "cbadmin_onThemeDeactivation",
  {
	themeName   : currentSite.getActiveTheme(),
	themeRecord : themeRecord,
	site                 : currentSite
  }
);
@jcberquist
Copy link
Owner

I am not sure I follow this issue. Are you saying that cfformat is not aligning the colons in your two examples?

@lmajano
Copy link
Author

lmajano commented Dec 6, 2021

Yes exactly. It’s not aligning.

@jcberquist
Copy link
Owner

I am not able to reproduce this currently. Given your example code above, if I set "alignment.consecutive.assignments": true and the structs are printed over multiple lines, the colons are aligned. Can I see the full settings you are using to see if some other setting is interfering?

@lmajano
Copy link
Author

lmajano commented Dec 6, 2021

Here are the files for you to test wit
Archive.zip
h.

@lmajano
Copy link
Author

lmajano commented Dec 6, 2021

I have included our cfformat and the themservice

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants