sveltejs / language-tools

The Svelte Language Server, and official extensions which use it
MIT License
1.2k stars 194 forks source link

support svelte5 #2338

Closed 6643 closed 4 months ago

6643 commented 4 months ago

Description

{@render children()} Causes inability to format code

Proposed solution

{@render children()} Causes inability to format code

Alternatives

No response

Additional Information, eg. Screenshots

No response

6643 commented 4 months ago

{#snippet abc()} ..... {/snippet}

It can also result in an inability to format the code

dummdidumm commented 4 months ago

We're shipping with an earlier built-in Svelte version to support the most number of people out of the box. If you want prettier working correctly, install the latest version of prettier and prettier-plugin-svelte inside your project, then it will format correctly because the Svelte 5 parser will then be used which understand this syntax.

jrmoynihan commented 2 months ago

Make sure you have a .prettierrc file added as well! https://github.com/sveltejs/language-tools/issues/2383#issuecomment-2168396682