-
-
Notifications
You must be signed in to change notification settings - Fork 164
languages/formatters: allow multiple formatters #1103
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
base: v0.8
Are you sure you want to change the base?
Conversation
1fb7c25 to
61e7c8c
Compare
|
I think this will be easier if you cover all at once, because we will need to cover it before 0.8 anyway. |
|
aight bet |
906a500 to
6697e54
Compare
8b98f07 to
ba9ce8b
Compare
163eb0d to
2ca2b56
Compare
2ca2b56 to
d20abc1
Compare
d20abc1 to
393b777
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for the good work.
I'm afraid I'll have to nit this a little, because I think we're inadvertently introducing some technical debt that will end up biting us in the ass later down the line.
- The functions with "deprecated" in their names are bothering me a little. Are we doing to get rid of those? If so, why not do that now since 0.8 is the big bad breaking change.
- The removal of "format" sections is not really good practice imo. We should strive to provide predictable and consistent APIs for the users, and I think removing two options does the opposite of contributing to this goal
- I left a few comments about unpacked sets, statix warns you about those and I'd rather get rid of them while we're already working on it.
| (mkRemovedOptionModule ["vim" "language" "astro" "format"] '' | ||
| This option has been removed due to being broken for a long time. | ||
| '') | ||
| (mkRemovedOptionModule ["vim" "language" "svelte" "format"] '' | ||
| This option has been removed due to being broken for a long time. | ||
| '') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think removing format options introduces an annoying, backwards-incompatible breakage that the users will not appreciate.
We should instead find a way to minimize the surface, e.g., how much users are affected by the "broken for a long time" section. We could warn them, or we could provide a stub that doesn't format anything but simply warn the user.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm gonna add back biome but I don't consider removing prettier and prettierd a breaking change because that thing never worked, can't break user's workflow when the workflow never worked.
nevertheless, I'll look into packaging prettier-plugin-astro and -svelte, if it's not a pain in the neck I'll add them back in.
fuck all these frameworks holy fuck how hard is it to write your own fucking formatter you already have to parse the whole thing just print it back out nicely goddammit
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added back in biome and prettier, removed prettierd because trying to support it is pure insanity
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
for now trying to use prettierd falls back to prettier in astro and svelte
580746c to
fced08b
Compare
fced08b to
0c0fe24
Compare
314f578 to
2429336
Compare
2429336 to
06aa186
Compare
yea we're getting rid of them in the future, I just put up a little warning for now if you use the old syntax and convert it for you, just cuz I can and also cuz I hate breaking changes that don't say anything useful in logs/warning |
Allow multiple formatters in
vim.languages.<lang>.format.type, deprecates use of non list typeAlso deprecates non-list values in
vim.languages.*.lsp.serverSanity Checking
nix fmt).#nix(default package).#maximal.#docs-html(manual, must build).#docs-linkcheck(optional, please build if adding links)x86_64-linuxaarch64-linuxx86_64-darwinaarch64-darwinAdd a 👍 reaction to pull requests you find important.