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

Add JuliaFormatter toml generator (maybe consistent with "code style") #328

Closed
jlperla opened this issue Nov 8, 2021 · 4 comments
Closed
Labels
Plugin Idea A proposal for a feature that can be accomplished with a plugin

Comments

@jlperla
Copy link

jlperla commented Nov 8, 2021

Now that the VS Code has moved to JuliaFormatter.jl, I would be great for a template plugin to generate files to support it (including your beloved style = "blue"!)

It seems the architecture is to remove all formatting in the vscode extension itself, and do all formatting configuration in a
.JuliaFormatter.toml file (cc @pfitzseb). Which I fully agree with! That means it is especially helpful to generate these files for new users.

The minimum configuration of a plugin to the PkgTemplates is to generate a file with style = "blue", ="default" or ="yas". Personally that is enough for my purposes since I think that users can then modify it directly since it would be created in the correct place. But to get fancy you could add in https://github.com/domluna/JuliaFormatter.jl/#formatting-options as well.

BTW, my hope is to add this into the https://julia.quantecon.org/software_engineering/testing.html#project-setup docs so that introductory users get in the habit of always using code formatting/code styles.

@nickrobinson251 nickrobinson251 added the Plugin Idea A proposal for a feature that can be accomplished with a plugin label Nov 8, 2021
@nickrobinson251
Copy link
Collaborator

Sure, I think a JuliaFormatter <: Plugin would be a great addition!

@gdalle
Copy link
Collaborator

gdalle commented Jul 31, 2023

Duplicate of #324

@gdalle
Copy link
Collaborator

gdalle commented Jul 31, 2023

BTW, my hope is to add this into the https://julia.quantecon.org/software_engineering/testing.html#project-setup docs so that introductory users get in the habit of always using code formatting/code styles.

I'm currently on a rampage of PkgTemplates PRs to help people get started with good coding practices. See #415 about my dreams for the runtests.jl file. If you have other similar ideas @jlperla, I'll take 'em!

@nickrobinson251
Copy link
Collaborator

closed by #412

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Plugin Idea A proposal for a feature that can be accomplished with a plugin
Projects
None yet
Development

No branches or pull requests

3 participants