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
Prettier not honoring plugins #8841
Comments
affanshahid
added
admin read
Pending admin review
defect
[core label]
triage
Maintainer needs to classify the issue
labels
Mar 4, 2024
Moshyfawn
added
prettier
Prettier tooling support
and removed
triage
Maintainer needs to classify the issue
labels
Mar 5, 2024
JosephTLyons
added
tooling
An umbrella label for language tools, linters, formatters, etc
and removed
admin read
Pending admin review
labels
Mar 5, 2024
Hey @mrnugget, I'm on Zed Preview 0.126.1 and
|
@timcole I have created a pull request to fix this issue, so sit tight😀. |
mrnugget
pushed a commit
that referenced
this issue
Mar 12, 2024
This fixed the issue that prettier plugins were not picked up. The old code would always send an empty array to the prettier plugin that happens inside the `prettier_server.js`. **Before** The `options.plugins` key is an empty array, which is not correct. ```log stderr: Resolved config: {"singleQuote":true,"trailingComma":"all","plugins":["prettier-plugin-organize-imports"]}, will format file '/Users/remcosmits/Documents/code/prettier-test/src/app/page.tsx' with options: {"singleQuote":true,"trailingComma":"all","plugins":[],"parser":"typescript","path":"/Users/remcosmits/Documents/code/prettier-test/src/app/page.tsx"} ``` https://github.com/zed-industries/zed/assets/62463826/52f2aad0-2f96-43a9-81ec-9d4630c495b2 **After** The `options.plugins` contains the `prettier-plugin-organize-imports` plugin as expected. ```log stderr: Resolved config: {"singleQuote":true,"trailingComma":"all","plugins":["prettier-plugin-organize-imports"]}, will format file '/Users/remcosmits/Documents/code/prettier-test/src/app/page.tsx' with options: {"singleQuote":true,"trailingComma":"all","plugins":["prettier-plugin-organize-imports"],"parser":"typescript","path":"/Users/remcosmits/Documents/code/prettier-test/src/app/page.tsx"} ``` https://github.com/zed-industries/zed/assets/62463826/9045028d-aeca-4df1-819c-01905d83216c Release Notes: - Fixed send plugins correctly to the prettier plugin ([#8841](#8841)).
This was fixed by #9193 which will go out in the next preview. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Check for existing issues
Describe the bug / provide steps to reproduce it
Using Zed with a project that uses Prettier with some plugins. It seems to ignore the plugins when formatting files.
The prettier config:
Prettier LSP logs:
Environment
Zed: v0.125.1 (Zed Preview)
OS: macOS 14.2.1
Memory: 16 GiB
Architecture: aarch64
If applicable, add mockups / screenshots to help explain present your vision of the feature
No response
If applicable, attach your
~/Library/Logs/Zed/Zed.log
file to this issue.If you only need the most recent lines, you can run the
zed: open log
command palette action to see the last 1000.Zed.log
The text was updated successfully, but these errors were encountered: