-
-
Notifications
You must be signed in to change notification settings - Fork 2
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
Ranking Biome vs. ESLint #5
Comments
There is currently no way to disable eslint in zed, I think. It is baked into the typescript extension which is builtin. So if both is configured, they may be conflicting. One limitation is currently, that the biome.json needs to sit in the root of the zed project to be seen by the biome language server. You can also try to set Can you provide a repo for reproduction? |
Thanks for the quick feedback! |
I'm currently working on a fix for this (tracked by zed-industries/zed#10906). I just landed zed-industries/zed#10911 to {
"languages": {
"TypeScript": {
"language_servers": ["biome", "!typescript-language-server", "!eslint", "..."]
}
}
} Will be shipping to Preview tomorrow. |
Thats great! Though the biome lsp server should be used together with the ts-server, not instead. But we can finally disable eslint! ^^ |
Oh, for some reason I thought Biome had its own TS language server 😄 But yes, it can be used to disable ESLint! |
Oh wow, that looks really promising, @maxdeviant and would probably solve the ranking issue with clashes of eslint vs. Biome! |
Hi @maxdeviant and @luckydye, I create this repository to demonstrate my use-case and errors: https://github.com/frytg/biome-zed-repro-temp I hope this makes sense. I hope I didn't do any super dumb mistakes, which prevents this whole setup, but so far it seems quite hard and complicated to get Biome working in Zed. |
@frytg awsome! I agree it should be very easy. |
So the problem is, zed thinks the biome language server doesn't have the capability to run "textDocument/formatting", which is odd, cause it does. I have a fix here: https://github.com/luckydye/zed/tree/biome-formatting-fix, but I think this would ignore any other language server that could format but is not the first priority. Thats as far as I got for now... Update: TLDR, formatting doesn't work because zed does not support dynamic register for formatting capabilities. |
Is there an upstream issue for dynamic register of formatting caps? |
We removed dynamic registration of formatting capabilities because not all clients support it. Also, you can't have static and dynamic registration of the same capabilities, some clients like VSCode break. |
Is there any configuration needed to make sure Zed is prefering Biome over native ESLint?
When I install the extension (
v0.0.2
) in Zed Preview (v0.131.4
), it creates a different formatting output in JS files vs. the Biome CLI. It seems like it is doing something when saving (adjusting spaces or so), but that seems to be more the output from ESLint or some other language server.Actually running
bunx biome format index.js --write
however reformats the whole file (replaces spaces with tabs, which also seems to be the default) - which would be the intended way.Is there any other way to debug or improve this?
This is in
settings.json
:Adding a
biome.json
with some arbitrary values likeformatter.indentWidth: 16
also shows that it doesn't get picked up, while the CLI replaces that.The text was updated successfully, but these errors were encountered: