Next.js Discord

Discord Forum

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

Answered
GravityExploitz posted this in #help-forum
Open in Discord
.
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

18 Replies

@B33fb0n3
Biome is already installed globally and extension is installed.
@GravityExploitz 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
Okay sounds good. thank you for the help
happy to help