Next.js Discord

Discord Forum

Biome isn't appearing in vs code as a format option therefore can't format files

Answered
Palomino posted this in #help-forum
Open in Discord
PalominoOP
.
Answered by B33fb0n3
yea, the extension can’t, but biome itself can. So add a biome json config now and you are good to go. It does all for you then. And I would suggest to “formatOnSave” so it does that for every file and it’s just great
View full answer

48 Replies

PalominoOP
@B33fb0n3
Biome is already installed globally and extension is installed.
@Palomino Biome is already installed globally and extension is installed.
Alr, switch to pre release version and update your vscode settings with the following:

// .vscode/settings.json
{
“biome.enabled”: true,
"editor.formatOnSave": true,
"editor.codeActionsOnSave": {
"source.organizeImports.biome": "explicit",
"source.fixAll.biome": "explicit"
},
"[html]": {
"editor.defaultFormatter": "biomejs.biome"
},
"[typescript]": {
"editor.defaultFormatter": "biomejs.biome"
}
}
:this_is_fine: it’s expected. Biome does not support it. See: https://github.com/biomejs/biome-vscode/issues/533

they marked it as “closed, not planned”. But it still works tho. We just need to remove it from ts and the cli will still pick up. Biome is also installed in your repo, right?
And I thought biome did support typescript? it says they do on their website interesting
So does this mean my biome is working now? but how do i format my files like prettier :hmmge: i
I am a bit confused. why people say biome is better then prettier but then it doesnt even work :this_is_fine:
so this is normal? :KEKL: weird way. bc prettier doesnt do this shit
how am i susspod tof ormat
yea, the extension can’t, but biome itself can. So add a biome json config now and you are good to go. It does all for you then. And I would suggest to “formatOnSave” so it does that for every file and it’s just great
Answer
PalominoOP
Okay sounds good. thank you for the help
happy to help
@Palomino u have a good biome.json or you need one?
@B33fb0n3 <@173557815326015488> u have a good biome.json or you need one?
PalominoOP
I might honestly need one haha. I don’t know if mine is the greatest. You could always look mine over
@Palomino I might honestly need one haha. I don’t know if mine is the greatest. You could always look mine over
I like to use this one
you might need to change a few things, so it matches your setup
@B33fb0n3 I like to use this one
PalominoOP
I am pretty sure the difference between ours is yours is strict type safety and modern defaults. mine is standard 2-space formatting and a more permissive linting setup. but I think I'll give it a try esp since I am tryna to update my codebase.
this is mine if your curious
@Palomino this is mine if your curious
yea, seems like yours is still on v1 and mine is alr on v2
@B33fb0n3 yea, seems like yours is still on v1 and mine is alr on v2
PalominoOP
I am on v2 to?
i used their migrate thingy
whatever its called i ran the command that they said
so usure, but will try yours as well
that’s weird. It forces me to have at least the schema thing in there…
PalominoOP
mine hasn’t complained yet which is surprising and everything says biome v2
wild
PalominoOP
@B33fb0n3 going back to eslint and prettier. biome was yeah..
its like there was a memory leak or something
PalominoOP
oh that explains a lot
@Palomino oh that explains a lot
oh lol... havent had any issues with memory leaks with biome. How did you find out, so I can check it here too?
@B33fb0n3 oh lol... havent had any issues with memory leaks with biome. How did you find out, so I can check it here too?
PalominoOP
this happened
then when i uninstalled it went back to
i was using biome for a while like activity coding, etc then i noticed my pc started to freeze and checked task manager and saw this. it only went back down to normal once i uninstalled the biome extension
ok how long did you activly coded? Like 1h or ?
@B33fb0n3 ok how long did you activly coded? Like 1h or ?
PalominoOP
yeah i would say about 1h and 24 mins
@Palomino yeah i would say about 1h and 24 mins
alr, I'll test it as well ^^
PalominoOP
sounds good
dream said there was a memory leak when I asked
so he might have bad expierence as well
@Palomino dream said there was a memory leak when I asked
yea, in the beginning biome sucked pretty hard for me as well. But now, with a good config, its great. One dep, one for all. Great ^^
When did you chatted about that with dream?