ide-java icon indicating copy to clipboard operation
ide-java copied to clipboard

Add settings for formatting

Open winstliu opened this issue 6 years ago • 3 comments

Makes all the formatting settings from the LS configurable :tada:. And now that we have this additional level of configuration, I figure it's a good time to hook into the format-on-type and format-on-save providers. On-type can be disabled within ide-java, and on-save can be disabled via atom-ide-ui.

I still need to figure out how to make this a smooth transition, though, as I'm sure most projects aren't following Eclipse's default formatting rules.

Fixes #109

winstliu avatar Jun 19 '19 02:06 winstliu

I see a few options here:

  1. Add an option to ide-java that controls on-save formatting, and default both that one and the on-type formatting to off. (Note that the on-save option would be in a different section, which would be weird)
  2. Add a notification that pops up on upgrade letting people know about the new formatting behavior and how to customize it.
  3. Don't add on-save/on-type formatting. Keep it range/file-based only.
  4. Only enable on-save/on-type formatting if a URL is provided in settings.
  5. Something else?

winstliu avatar Jun 20 '19 01:06 winstliu

I like the popup. Until atom has some place a person can go to look at settings across packages, it's going to be hard to discover these settings. I also think it would be okay to have a short mention of the on-save setting in the README.

calebmeyer avatar Jun 20 '19 14:06 calebmeyer

I see this includes the change in #116. Any chance of getting one of these merged?

mdiin avatar Feb 21 '20 05:02 mdiin