Can't format my code?

Hello,
Using your VSCode extension, I can’t format my code:


Shouldn’t there have formatters I had installed?

Hi,

Yes, this is confusing. We will change the readme to cover it.

The “Glitch” formatter should just work, using the configured default formatter for non-Glitch documents.

Right now there is only one formatter for remote Glitch documents (the “Glitch” one in the screen shot). It delegates to the configured default formatter for the document language. You can set that by creating a new unsaved document (CMD/CTRL + N), running the “Change Language Mode” command, picking the relevant language, running “Format Document With…”, choosing “Configure Default Formatter…”, and picking the formatter you want to use.

Obviously this is an area for improvement.

What formatters do you have installed and which were you trying to use? Do the instructions above get it working for you?

1 Like

Hi,
Oh, now it’s working, it just took a lot of time to format… But it’s formatting line per line, which is very laggy and which crashes my window sometimes… I’m using Prettier extension.

Now it doesn’t format line per line anymore, tho I got this notification from VSCode: Your Code installation appears to be corrupt. Please reinstall. Is it normal?

That is not normal. Did you try doing that?

You could also download the Insiders build as a fresh install and see if it works there before replacing the default installation.