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

"There is no formatter for 'gradle' files installed." #90

Closed
NatoBoram opened this issue Oct 28, 2020 · 12 comments
Closed

"There is no formatter for 'gradle' files installed." #90

NatoBoram opened this issue Oct 28, 2020 · 12 comments

Comments

@NatoBoram
Copy link

Hi! I'm trying to format a gradle file, but I got this error.

There is no formatter for 'gradle' files installed.

image

Version: 1.51.0-insider
Commit: e5c0007ce0e9a3816679cba674d03376c03726e3
Date: 2020-10-27T05:37:14.199Z
Electron: 9.3.3
Chrome: 83.0.4103.122
Node.js: 12.14.1
V8: 8.3.110.13-electron.0
OS: Windows_NT x64 10.0.19042
@nvuillam
Copy link
Owner

Not reproducible with current version of VsCode & VsCode Groovy Lint

image

image

Please reopen if you still see the error :)

@bitevo
Copy link

bitevo commented Aug 18, 2021

This can happen if you installed "Gradle Language Support". Reproducible with

  • Gradle Language Support v0.2.3
  • Groovy Lint, Format and Fix v1.4.0

I guess it because installing Gradle Language Support make the build.gradle file recoginsed as gradle file (without that, it's detected as groovy file). Groovy Lint probably doesn't explicitly stated gradle file as one of its supported format.

@nvuillam
Copy link
Owner

Mmmm maybe Gradle Language Support extension "steals" the handle of .gradle files from VsCode Groovy Lint :/

Or VsCode remove Gradle from extensions associated to Groovy :/

Of VsCode simply changed their way to detect a formatter (according to the doc, registerDocumentFormattingEditProvider must be used and it not present on VsCode GroovyLint sources)

I'll try to have a look in my spare time, but if you have tume i'll be happy to validate a PR :)

@nvuillam nvuillam reopened this Aug 18, 2021
@abcfy2
Copy link

abcfy2 commented Sep 17, 2021

I have the same issue. How is this issue going now ? Thanks.

@dyno
Copy link

dyno commented Nov 2, 2021

it's like associate *.gradle to groovy make the format working again.
Screen Shot 2021-11-01 at 19 30 32

Copy link

This issue has been automatically marked as stale because it has not had recent activity.
It will be closed in 14 days if no further activity occurs.
Thank you for your contributions.

If you think this issue should stay open, please remove the O: stale 🤖 label or comment on the issue.

@nvuillam
Copy link
Owner

@NatoBoram @bitevo @abcfy2 @dyno is the issue still happening with latest version ?

@abcfy2
Copy link

abcfy2 commented Dec 22, 2023

@NatoBoram @bitevo @abcfy2 @dyno is the issue still happening with latest version ?

Still exists. I've set gradle to use your plugin to format in setting.json:

  "[gradle]": {
    "editor.defaultFormatter": "NicolasVuillamy.vscode-groovy-lint"
  }

But I still got this issue.

@abcfy2
Copy link

abcfy2 commented Dec 22, 2023

But lucky after set file associations *.gradle --> groovy your plugin could work. I hope you plugin could support lint & format *.gradle files, thanks. @nvuillam

Copy link

This issue has been automatically marked as stale because it has not had recent activity.
It will be closed in 14 days if no further activity occurs.
Thank you for your contributions.

If you think this issue should stay open, please remove the O: stale 🤖 label or comment on the issue.

@nvuillam
Copy link
Owner

nvuillam commented Jan 22, 2024

VsCode Groovy Lint does not use VsCode formatting APIs (but it should ! )

https://code.visualstudio.com/blogs/2016/11/15/formatters-best-practices

Maybe u'd like to try a PR ? :)

Copy link

This issue has been automatically marked as stale because it has not had recent activity.
It will be closed in 14 days if no further activity occurs.
Thank you for your contributions.

If you think this issue should stay open, please remove the O: stale 🤖 label or comment on the issue.

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Mar 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants