I’m hoping for .svelte files (from Svelte framework) to be better supported in the editor via syntax highlighting, potentially formatting and other error handling.
You can see a setup I’m starting to build out here, which supports live-reloading:
Glitch is using CodeMirror for syntax highlighting and Prettier for code formatting. So for it to work, you’ll have to make sure that both CodeMirror and Prettier supports Svelte.
Yup, this is possible — Svelte’s own REPL uses CodeMirror, and you can find how it is set up here:
And Prettier formatter plugin:
Hehe, but Glitch needs to install it as well. @glitch_support???
+1 for Svelte syntax highlighting and formatting. Is there a way to enable codemirror by setting a project config?
Adding another vote to this. I’d like to get syntax highlight too.
hi everyone! we have enabled syntax highlighting for svelte. it isn’t great yet, but we’re looking to improve it. thanks for the feedback!
@chance, are you @glitch_support?
@khalby786 not glitch support, but i work on the code editor here at glitch
Sorry, I didn’t know that!
Thats really cool! Thanks for the update!
thank you so much for this
Hello, can somebody write what to do to enable svelte formatting step by step? Simple installing prettier-plugin-svelte is not enough