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

Make it a VS Code Extension #501

Open
brunoborges opened this issue Aug 30, 2021 · 8 comments
Open

Make it a VS Code Extension #501

brunoborges opened this issue Aug 30, 2021 · 8 comments

Comments

@brunoborges
Copy link

Title says it all. :-P

@jdubois
Copy link
Member

jdubois commented Aug 31, 2021

I haven’t tried it (I’m using it as a Git pre-hook), but there should already be a Prettier extension, so this should already work.
At least, we shouldn’t build our own extension, the idea is that we benefit from the Prettier ecosystem (or contribute to it). Less work for us, and our users benefit from all the other Prettier plugins.

@brunoborges
Copy link
Author

The Prettier extension for VS Code does not come with Java support by default. It requires non-trivial settings to enable JHipster's plugin.

@jdubois
Copy link
Member

jdubois commented Aug 31, 2021

Oh, let’s have a look at improving it.

@linco95
Copy link

linco95 commented Sep 28, 2021

I'm using java prettier formatter plugin and it seems to work for me at least.

@mwpb
Copy link

mwpb commented Oct 30, 2022

Hi all, I'm the 'author' of mwpb.java-prettier-formatter. Thanks for all the hard work on prettier-plugin-java. Did the above discussion lead anywhere? Right now haven't used Java for quite a while and there am probably not right person to maintain a VS Code extension. For the short term, I'm happy to do a small amount of work updating the prettier-plugin-java dependency of mwpb.java-prettier-formatter when required. (C.f. mwpb/java-prettier-formatter#5) But for the long-term, maybe it might make more sense to have the plugin under the auspices ofjhipster? Feel free to copy the mwpb.java-prettier-formatter code or ask questions as you see fit. Thanks,

@chrassig
Copy link

Bad news: The VS Code extension by mwpb is not available any more.

Good news: The official VS Code extension for prettier supports plugins for other programming languages, see:
https://github.com/prettier/prettier-vscode?tab=readme-ov-file#plugins

We are using this VS Code extension together with the jhipster Java plugin for prettier in my team to format Java source code files.

@DanielFran
Copy link
Member

Thanks @chrassig for the info!
@clementdessoude @jtkiesel, we can probably close this issue and add a note in the documentation https://github.com/jhipster/prettier-java/blob/main/docs/advanced_usage.md#vscode

@jameshearttech
Copy link

We are using vs code with the prettier extension. We have the java plugin configured in prettier and vs code is formatting java files as expected afaict.

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

7 participants