Skip to content
This repository has been archived by the owner on Aug 12, 2023. It is now read-only.

feat(formatting):adding range_formatting for google-java-format builtin #1623

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

deanbear
Copy link

Hi there,

This PR is about adding the range_formatting method to the built-in source of google-java-format.
In fact, google-java-format already supports the --lines option for range formatting.
However, there's a trick: you need to add four additional options to properly perform the range formatting operation; otherwise, the entire file will be formatted.
Please see the issue at google/google-java-format#942 for more details.

I chose not to use the helpers because there are extra options involved, and I didn't want to disrupt the range_formatting_args_factory.

Have a nice day.

@mskelton
Copy link
Contributor

I'm taking a stab at forking null-ls given the recent announcement that null-ls is being archived, and I've implemented this in mskelton@ea1a4539

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

Successfully merging this pull request may close these issues.

None yet

2 participants