Skip to content

Commit ae21d03

Browse files
docs: Update svelte 5 preview faqs to include lsp formatting (#11906)
* update svelte 5 preview faqs to include lsp formatting * prettier * typo * tweak wording * use `/// file:` pragma --------- Co-authored-by: Rich Harris <[email protected]>
1 parent c0c1a56 commit ae21d03

File tree

1 file changed

+21
-0
lines changed
  • sites/svelte-5-preview/src/routes/docs/content/03-appendix

1 file changed

+21
-0
lines changed

sites/svelte-5-preview/src/routes/docs/content/03-appendix/01-faq.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,27 @@ All other features, including stores, are still fully supported in runes mode.
9191

9292
`beforeUpdate` and `afterUpdate` are deprecated — use `$effect.pre` and `$effect` instead, as these are more conservative about when they run code. Everything else will remain.
9393

94+
### Prettier formatting is broken, what gives?
95+
96+
`svelte-lsp` ships with a stable version of Svelte to support the largest number of people out of the box. To make the language server compatible with Svelte 5 you will need to install the latest versions of `prettier` and `prettier-plugin-svelte` in your project and create (or update) a `.prettierrc` file:
97+
98+
```sh
99+
npm i --save-dev prettier-plugin-svelte prettier
100+
```
101+
102+
```json
103+
/// file: .prettierrc
104+
{
105+
"plugins": ["prettier-plugin-svelte"],
106+
"overrides": [
107+
{
108+
"files": "*.svelte",
109+
"options": { "parser": "svelte" }
110+
}
111+
]
112+
}
113+
```
114+
94115
## Schedule and future plans
95116

96117
### When is it coming out?

0 commit comments

Comments
 (0)