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

Support multiple dprint.json configuration files #93

Open
paulovieira opened this issue Sep 27, 2024 · 1 comment
Open

Support multiple dprint.json configuration files #93

paulovieira opened this issue Sep 27, 2024 · 1 comment

Comments

@paulovieira
Copy link

I'm using this plugin with success in WebStorm. Thank you for creating it!

I'd like to make a suggestion for some future release: it's not uncommon to work in a mono-repo, where multiple typescript application (or whatever it might be) are present. Currently it seems this plugin works only in this scenario:

dprint.json # configuration file at the root
packages/app-1/main.ts
packages/app-2/main.ts

So we can have only 1 configuration file both apps.

Ideally it would be possible to have the following:

packages/app-1/main.ts
packages/app-1/dprint.json
packages/app-2/main.ts
packages/app-2/dprint.json

I don't know kotlin, but it seems the plugin will start looking for dprint.json at the root directory of the project, and then travel to the parent directory: https://github.com/dprint/dprint-intellij/blob/main/src/main/kotlin/com/dprint/utils/FileUtils.kt#L64-L68

Ideally this search would start at the directory associated with the file being formatted.

Thanks.

@ryan-rushton
Copy link
Collaborator

You would need a different process instance for each config file from my understanding of how dprint works. Let me talk to the main library author on what his opinions are.

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

2 participants