cocalc
cocalc copied to clipboard
add prettier support for toml files
I was just learning about toml files from python pep 518.
We have syntax highlighting, but not prettier formatting support. There is such support though, so maybe we should support it: https://prettier.io/
Related question -- why do we run prettier in the project on the backend rather than in the browser in the frontend? We could easily do things much more simply and quickly on the frontend...?
ad running in the frontend: the possibility of supporting config files is lost when run on the frontend. for that, the directory has to change, though. that's similar to #5922
the possibility of supporting config files is lost when run on the frontend.
Presumably it just makes it a little more complicated, since we have to run code periodically to check for such config files, read and parse them, and use them on the frontend. I don't see why the possibility of supporting them entirely is gone.
Also, wouldn't running formatting on the frontend make it feel significantly faster -- nearly instantaneous in many cases? I format constantly when I'm working, and sometimes there is a noticeable delay, and it would be very nice if there was basically zero delay.