Skip to content

Commit 9b936fc

Browse files
authored
(feat) prettier .editorconfig support (#256)
#225
1 parent 4039eff commit 9b936fc

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

packages/language-server/src/plugins/svelte/SveltePlugin.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,8 @@ export class SveltePlugin
7474
const filePath = document.getFilePath()!;
7575
const prettier = importPrettier(filePath);
7676
// Try resolving the config through prettier and fall back to possible editor config
77-
const config = (await prettier.resolveConfig(filePath)) || this.prettierConfig;
77+
const config =
78+
(await prettier.resolveConfig(filePath, { editorconfig: true })) || this.prettierConfig;
7879
const formattedCode = prettier.format(document.getText(), {
7980
...config,
8081
plugins: [require.resolve('prettier-plugin-svelte')],

0 commit comments

Comments
 (0)