diff --git a/changelog.md b/changelog.md index 83265b5b1..e1206d89f 100644 --- a/changelog.md +++ b/changelog.md @@ -2,9 +2,9 @@ ## Unreleased -`2025-3-13` * `NEW` `unnecessary-assert` diagnostic warns when asserting values that are always truthy * `NEW` locale `es-419`, thanks [Felipe Lema](https://codeberg.org/FelipeLema) +* `FIX` prevent unnecessary edits by LSP formatting when content did not change ## 3.13.9 `2025-3-13` diff --git a/script/core/formatting.lua b/script/core/formatting.lua index de7f30ed9..d9fcf4444 100644 --- a/script/core/formatting.lua +++ b/script/core/formatting.lua @@ -21,6 +21,10 @@ return function(uri, options) return end + if text == formattedText then + return + end + return { { start = state.ast.start,