We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6517f09 commit 75b9f3eCopy full SHA for 75b9f3e
packages/language-server/src/plugins/svelte/SveltePlugin.ts
@@ -115,12 +115,17 @@ export class SveltePlugin
115
parser: 'svelte' as any
116
});
117
118
- return [
119
- TextEdit.replace(
120
- Range.create(document.positionAt(0), document.positionAt(document.getTextLength())),
121
- formattedCode
122
- )
123
- ];
+ return document.getText() === formattedCode
+ ? []
+ : [
+ TextEdit.replace(
+ Range.create(
+ document.positionAt(0),
124
+ document.positionAt(document.getTextLength())
125
+ ),
126
+ formattedCode
127
+ )
128
+ ];
129
130
function getSveltePlugin() {
131
// Only provide our version of the svelte plugin if the user doesn't have one in
0 commit comments