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

Update ktfmt plugin for IntelliJ IDEA #420

Conversation

greyhairredbear
Copy link
Contributor

@greyhairredbear greyhairredbear commented Sep 18, 2023

Changes:

  • update build dependencies
    • gradle wrapper
    • intellij gradle plugin
  • use AsyncDocumentFormattingService implementation to format code with ktfmt (adjusted from google-java-format IDEA plugin)

Intended to fix #399 (IDEA plugin seems to have been published for 0.46)

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Sep 18, 2023
@hick209
Copy link
Contributor

hick209 commented Sep 19, 2023

I believe this will also fix #388

- gradle wrapper
- intellij gradle plugin
@greyhairredbear greyhairredbear marked this pull request as ready for review September 24, 2023 00:44
@greyhairredbear
Copy link
Contributor Author

Note for reviewers: The google-java-format plugin contains a test for GoogleJavaFormatFormattingService, which I haven't adjusted and ported for ktfmt. If required however, writing a similar test for KtfmtFormattingService should be possible.

@greyhairredbear greyhairredbear changed the title WIP: Update ktfmt plugin for IntelliJ IDEA Update ktfmt plugin for IntelliJ IDEA Sep 24, 2023
@greyhairredbear
Copy link
Contributor Author

@cgrushko @strulovich Seems running the workflows on this PR need approval from a maintainer - would it be possible to run the workflows?

Other than that, is there a way to get feedback on the changes? Could I help in any way?

@facebook-github-bot
Copy link
Contributor

@hick209 has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

@hick209
Copy link
Contributor

hick209 commented Mar 25, 2024

Sorry the super long delay here @greyhairredbear. I went on paternity leave in September (son born on 22 of Sept) and once I was back early this year there were many things pilled up that took me a while to go through.

I'm importing this internally for review and we should have some feedback for you this week.

@greyhairredbear
Copy link
Contributor Author

Sorry the super long delay here @greyhairredbear. I went on paternity leave in September (son born on 22 of Sept) and once I was back early this year there were many things pilled up that took me a while to go through.

I'm importing this internally for review and we should have some feedback for you this week.

Hi, no need for excuses here. Congrats on your son, being a father of three, I completely understand the priorities here :)

Happy about any feedback or change requests

Copy link
Contributor

@hick209 hick209 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just have one question here, since I'm just mildly familiar with IJ API

Copy link
Contributor

@hick209 hick209 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We are good to ship this internally, but I'm sending back to you to get an answer from the question I've asked above.

@facebook-github-bot
Copy link
Contributor

@hick209 merged this pull request in fc1eac3.

@greyhairredbear greyhairredbear deleted the feature/update-idea-plugin branch March 27, 2024 15:48
facebook-github-bot pushed a commit that referenced this pull request Apr 23, 2024
Summary:
Changelog:
* Migrated to Google Java Format 1.22.0 (#440 and #452)
* Added support for RangUntil (`..<`) operator (#433)
* Trailing space issue on lambda blocks (#426)
* Fix empty enum parse error (#425)
* Preserving empty enums semicolons (#434)
* Always use UTF8 (#437)
* IntelliJI DEA plugin update (#420)
* Managing trailing commas in enums (#449)
* Badges on README (#446 and #453)
* Emit parsing error for calls with multiple trailing lambdas (#457)
* Removed duplicated line in editorconfig file (#456)

Reviewed By: cortinico

Differential Revision: D56467599

fbshipit-source-id: 10e90a34118267e36db80940f6a4e43aef89fbd3
github-merge-queue bot referenced this pull request in slackhq/foundry Apr 27, 2024
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [com.facebook:ktfmt](https://togithub.com/facebookincubator/ktfmt) |
dependencies | minor | `0.47` -> `0.49` |

---

> [!WARNING]
> Some dependencies could not be looked up. Check the Dependency
Dashboard for more information.

---

### Release Notes

<details>
<summary>facebookincubator/ktfmt (com.facebook:ktfmt)</summary>

### [`v0.49`](https://togithub.com/facebook/ktfmt/releases/tag/v0.49)

#### Changelog

- Stop emitting multiple trailing commas in enum entry lists with
multiline items
([https://github.com/facebook/ktfmt/pull/458](https://togithub.com/facebook/ktfmt/pull/458))
– [@&#8203;nreid260](https://togithub.com/nreid260)

**Full Changelog**:
facebook/ktfmt@v0.48...v0.49

### [`v0.48`](https://togithub.com/facebook/ktfmt/releases/tag/v0.48):
0.48

Changelog:

- Migrated to Google Java Format 1.22.0
([https://github.com/facebook/ktfmt/pull/440](https://togithub.com/facebook/ktfmt/pull/440),
[https://github.com/facebook/ktfmt/pull/452](https://togithub.com/facebook/ktfmt/pull/452))
– [@&#8203;j-bahr](https://togithub.com/j-bahr),
[@&#8203;nreid260](https://togithub.com/nreid260)
- Added support for RangUntil (`..<`) operator
([https://github.com/facebook/ktfmt/pull/433](https://togithub.com/facebook/ktfmt/pull/433))
– [@&#8203;ArchdukeTim](https://togithub.com/ArchdukeTim)
- Trailing space issue on lambda blocks
([https://github.com/facebook/ktfmt/pull/426](https://togithub.com/facebook/ktfmt/pull/426))
– [@&#8203;fredyw](https://togithub.com/fredyw),
[@&#8203;hick209](https://togithub.com/hick209)
- Fix empty enum parse error
([https://github.com/facebook/ktfmt/pull/425](https://togithub.com/facebook/ktfmt/pull/425))
– [@&#8203;fredyw](https://togithub.com/fredyw)
- Preserving empty enums semicolons
([https://github.com/facebook/ktfmt/pull/434](https://togithub.com/facebook/ktfmt/pull/434))
– [@&#8203;nreid260](https://togithub.com/nreid260)
- Always use UTF8
([https://github.com/facebook/ktfmt/pull/437](https://togithub.com/facebook/ktfmt/pull/437))
– [@&#8203;nreid260](https://togithub.com/nreid260)
- IntelliJI DEA plugin update
([https://github.com/facebook/ktfmt/pull/420](https://togithub.com/facebook/ktfmt/pull/420))
– [@&#8203;greyhairredbear](https://togithub.com/greyhairredbear)
- Managing trailing commas in enums
([https://github.com/facebook/ktfmt/pull/449](https://togithub.com/facebook/ktfmt/pull/449))
– [@&#8203;nreid260](https://togithub.com/nreid260)
- Badges on README
([https://github.com/facebook/ktfmt/pull/448](https://togithub.com/facebook/ktfmt/pull/448),
[https://github.com/facebook/ktfmt/pull/453](https://togithub.com/facebook/ktfmt/pull/453))
–
[@&#8203;JavierSegoviaCordoba](https://togithub.com/JavierSegoviaCordoba),
[@&#8203;hick209](https://togithub.com/hick209)
- Emit parsing error for calls with multiple trailing lambdas
([https://github.com/facebook/ktfmt/pull/457](https://togithub.com/facebook/ktfmt/pull/457))
– [@&#8203;nreid260](https://togithub.com/nreid260)
- Removed duplicated line in editorconfig file
([https://github.com/facebook/ktfmt/pull/456](https://togithub.com/facebook/ktfmt/pull/456))
– [@&#8203;sabufung30](https://togithub.com/sabufung30)

Big thanks to all the contributors!

**Full Changelog**:
facebook/ktfmt@v0.47...v0.48

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Enabled.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Renovate
Bot](https://togithub.com/renovatebot/renovate).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4zMjUuMSIsInVwZGF0ZWRJblZlciI6IjM3LjMyNS4xIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119-->

---------

Co-authored-by: Zac Sweers <pandanomic@gmail.com>
github-merge-queue bot referenced this pull request in slackhq/circuit Apr 28, 2024
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [com.facebook:ktfmt](https://togithub.com/facebook/ktfmt) |
dependencies | minor | `0.47` -> `0.49` |

---

> [!WARNING]
> Some dependencies could not be looked up. Check the Dependency
Dashboard for more information.

---

### Release Notes

<details>
<summary>facebook/ktfmt (com.facebook:ktfmt)</summary>

### [`v0.49`](https://togithub.com/facebook/ktfmt/releases/tag/v0.49)

#### Changelog

- Stop emitting multiple trailing commas in enum entry lists with
multiline items
([https://github.com/facebook/ktfmt/pull/458](https://togithub.com/facebook/ktfmt/pull/458))
– [@&#8203;nreid260](https://togithub.com/nreid260)

**Full Changelog**:
facebook/ktfmt@v0.48...v0.49

### [`v0.48`](https://togithub.com/facebook/ktfmt/releases/tag/v0.48):
0.48

Changelog:

- Migrated to Google Java Format 1.22.0
([https://github.com/facebook/ktfmt/pull/440](https://togithub.com/facebook/ktfmt/pull/440),
[https://github.com/facebook/ktfmt/pull/452](https://togithub.com/facebook/ktfmt/pull/452))
– [@&#8203;j-bahr](https://togithub.com/j-bahr),
[@&#8203;nreid260](https://togithub.com/nreid260)
- Added support for RangUntil (`..<`) operator
([https://github.com/facebook/ktfmt/pull/433](https://togithub.com/facebook/ktfmt/pull/433))
– [@&#8203;ArchdukeTim](https://togithub.com/ArchdukeTim)
- Trailing space issue on lambda blocks
([https://github.com/facebook/ktfmt/pull/426](https://togithub.com/facebook/ktfmt/pull/426))
– [@&#8203;fredyw](https://togithub.com/fredyw),
[@&#8203;hick209](https://togithub.com/hick209)
- Fix empty enum parse error
([https://github.com/facebook/ktfmt/pull/425](https://togithub.com/facebook/ktfmt/pull/425))
– [@&#8203;fredyw](https://togithub.com/fredyw)
- Preserving empty enums semicolons
([https://github.com/facebook/ktfmt/pull/434](https://togithub.com/facebook/ktfmt/pull/434))
– [@&#8203;nreid260](https://togithub.com/nreid260)
- Always use UTF8
([https://github.com/facebook/ktfmt/pull/437](https://togithub.com/facebook/ktfmt/pull/437))
– [@&#8203;nreid260](https://togithub.com/nreid260)
- IntelliJI DEA plugin update
([https://github.com/facebook/ktfmt/pull/420](https://togithub.com/facebook/ktfmt/pull/420))
– [@&#8203;greyhairredbear](https://togithub.com/greyhairredbear)
- Managing trailing commas in enums
([https://github.com/facebook/ktfmt/pull/449](https://togithub.com/facebook/ktfmt/pull/449))
– [@&#8203;nreid260](https://togithub.com/nreid260)
- Badges on README
([https://github.com/facebook/ktfmt/pull/448](https://togithub.com/facebook/ktfmt/pull/448),
[https://github.com/facebook/ktfmt/pull/453](https://togithub.com/facebook/ktfmt/pull/453))
–
[@&#8203;JavierSegoviaCordoba](https://togithub.com/JavierSegoviaCordoba),
[@&#8203;hick209](https://togithub.com/hick209)
- Emit parsing error for calls with multiple trailing lambdas
([https://github.com/facebook/ktfmt/pull/457](https://togithub.com/facebook/ktfmt/pull/457))
– [@&#8203;nreid260](https://togithub.com/nreid260)
- Removed duplicated line in editorconfig file
([https://github.com/facebook/ktfmt/pull/456](https://togithub.com/facebook/ktfmt/pull/456))
– [@&#8203;sabufung30](https://togithub.com/sabufung30)

Big thanks to all the contributors!

**Full Changelog**:
facebook/ktfmt@v0.47...v0.48

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Enabled.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Renovate
Bot](https://togithub.com/renovatebot/renovate).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4zMjYuMCIsInVwZGF0ZWRJblZlciI6IjM3LjMyNi4wIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119-->

---------

Co-authored-by: Zac Sweers <pandanomic@gmail.com>
ZacSweers referenced this pull request in ZacSweers/CatchUp Apr 29, 2024
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [com.facebook:ktfmt](https://togithub.com/facebook/ktfmt) | `0.47` ->
`0.49` |
[![age](https://developer.mend.io/api/mc/badges/age/maven/com.facebook:ktfmt/0.49?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/maven/com.facebook:ktfmt/0.49?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/maven/com.facebook:ktfmt/0.47/0.49?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/maven/com.facebook:ktfmt/0.47/0.49?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Release Notes

<details>
<summary>facebook/ktfmt (com.facebook:ktfmt)</summary>

### [`v0.49`](https://togithub.com/facebook/ktfmt/releases/tag/v0.49)

#### Changelog

- Stop emitting multiple trailing commas in enum entry lists with
multiline items
([https://github.com/facebook/ktfmt/pull/458](https://togithub.com/facebook/ktfmt/pull/458))
– [@&#8203;nreid260](https://togithub.com/nreid260)

**Full Changelog**:
facebook/ktfmt@v0.48...v0.49

### [`v0.48`](https://togithub.com/facebook/ktfmt/releases/tag/v0.48):
0.48

Changelog:

- Migrated to Google Java Format 1.22.0
([https://github.com/facebook/ktfmt/pull/440](https://togithub.com/facebook/ktfmt/pull/440),
[https://github.com/facebook/ktfmt/pull/452](https://togithub.com/facebook/ktfmt/pull/452))
– [@&#8203;j-bahr](https://togithub.com/j-bahr),
[@&#8203;nreid260](https://togithub.com/nreid260)
- Added support for RangUntil (`..<`) operator
([https://github.com/facebook/ktfmt/pull/433](https://togithub.com/facebook/ktfmt/pull/433))
– [@&#8203;ArchdukeTim](https://togithub.com/ArchdukeTim)
- Trailing space issue on lambda blocks
([https://github.com/facebook/ktfmt/pull/426](https://togithub.com/facebook/ktfmt/pull/426))
– [@&#8203;fredyw](https://togithub.com/fredyw),
[@&#8203;hick209](https://togithub.com/hick209)
- Fix empty enum parse error
([https://github.com/facebook/ktfmt/pull/425](https://togithub.com/facebook/ktfmt/pull/425))
– [@&#8203;fredyw](https://togithub.com/fredyw)
- Preserving empty enums semicolons
([https://github.com/facebook/ktfmt/pull/434](https://togithub.com/facebook/ktfmt/pull/434))
– [@&#8203;nreid260](https://togithub.com/nreid260)
- Always use UTF8
([https://github.com/facebook/ktfmt/pull/437](https://togithub.com/facebook/ktfmt/pull/437))
– [@&#8203;nreid260](https://togithub.com/nreid260)
- IntelliJI DEA plugin update
([https://github.com/facebook/ktfmt/pull/420](https://togithub.com/facebook/ktfmt/pull/420))
– [@&#8203;greyhairredbear](https://togithub.com/greyhairredbear)
- Managing trailing commas in enums
([https://github.com/facebook/ktfmt/pull/449](https://togithub.com/facebook/ktfmt/pull/449))
– [@&#8203;nreid260](https://togithub.com/nreid260)
- Badges on README
([https://github.com/facebook/ktfmt/pull/448](https://togithub.com/facebook/ktfmt/pull/448),
[https://github.com/facebook/ktfmt/pull/453](https://togithub.com/facebook/ktfmt/pull/453))
–
[@&#8203;JavierSegoviaCordoba](https://togithub.com/JavierSegoviaCordoba),
[@&#8203;hick209](https://togithub.com/hick209)
- Emit parsing error for calls with multiple trailing lambdas
([https://github.com/facebook/ktfmt/pull/457](https://togithub.com/facebook/ktfmt/pull/457))
– [@&#8203;nreid260](https://togithub.com/nreid260)
- Removed duplicated line in editorconfig file
([https://github.com/facebook/ktfmt/pull/456](https://togithub.com/facebook/ktfmt/pull/456))
– [@&#8203;sabufung30](https://togithub.com/sabufung30)

Big thanks to all the contributors!

**Full Changelog**:
facebook/ktfmt@v0.47...v0.48

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](https://developer.mend.io/github/ZacSweers/CatchUp).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4zMjEuMiIsInVwZGF0ZWRJblZlciI6IjM3LjMyMS4yIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119-->

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Zac Sweers <pandanomic@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. Merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

IDEA plugin is not published since 0.43
3 participants