Skip to content

Commit

Permalink
(feat) prettier .editorconfig support (#256)
Browse files Browse the repository at this point in the history
  • Loading branch information
dummdidumm committed Jul 1, 2020
1 parent 4039eff commit 9b936fc
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/language-server/src/plugins/svelte/SveltePlugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,8 @@ export class SveltePlugin
const filePath = document.getFilePath()!;
const prettier = importPrettier(filePath);
// Try resolving the config through prettier and fall back to possible editor config
const config = (await prettier.resolveConfig(filePath)) || this.prettierConfig;
const config =
(await prettier.resolveConfig(filePath, { editorconfig: true })) || this.prettierConfig;
const formattedCode = prettier.format(document.getText(), {
...config,
plugins: [require.resolve('prettier-plugin-svelte')],
Expand Down

0 comments on commit 9b936fc

Please sign in to comment.