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
Where are .JuliaFormatter.toml
files searched for?
#3560
Comments
See domluna/JuliaFormatter.jl#771 for a pain point |
In any workspace. Basically, if you can open the file from the file explorer in VS Code, we should be able to pick find it. |
I'm not sure I understand the rationale for the current design. AFAIU Is it just that it's expected that people only have one folder (repo) open per workspace? I generally have many open. |
IIUC workspace is the top level in the VSCode explorer. If I have multiple folders open, does the extension look for the TOML in the same folder first? |
It doesn't matter how many workspace folders you have open. We're following the same behaviour as JuliaFormatter, except for never looking at the global config and not veering outside the bounds of the directory you have opened in VS Code (so the theoretically obvious way for adding a global config by creating a The main motivation for that is that all format options need to be inside of your repo for reproducibility (otherwise formatting ends up flipflopping between N different configs). That's a decision we (I?) made a couple years back, but certainly nothing we couldn't revisit. |
What if you have multiple directories open? To be concrete, say I have these folders open in a single workspace:
where Currently the system doesn't accommodate this, as far as I know? |
To clarify, what I mean is that say |
We're always searching up from the current file's path, IIRC. So in both cases you should get the appropriate config. If not, then that's a bug |
I confirm the bug then. Saving
then saving say |
I'm not sure I exactly confirm this, but since this issue was opened yesterday, I think it's the right place/time to report that julia formatter seems to have stopped respecting the |
The docs are slightly unclear about this. They say in the workspace but what if there are several folders? I do have a repo with a toml file in one of my workspaces but the style is not respected --- formatting instead is done with the default very light setting.
The text was updated successfully, but these errors were encountered: