diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2022-04-19 15:45:55 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2022-04-19 15:45:55 +0800 |
commit | 22f29e50a340c6f8ab8bcafe983d2af07d123429 (patch) | |
tree | 202f20524e2241fa8929a38de98231789a826e69 /script | |
parent | e36ca2b3e0629a8f67b4b2af34e938f66661e788 (diff) | |
download | lua-language-server-22f29e50a340c6f8ab8bcafe983d2af07d123429.zip |
fix #1072
Diffstat (limited to 'script')
-rw-r--r-- | script/core/formatting.lua | 2 | ||||
-rw-r--r-- | script/core/rangeformatting.lua | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/script/core/formatting.lua b/script/core/formatting.lua index 49da6861..b52854a4 100644 --- a/script/core/formatting.lua +++ b/script/core/formatting.lua @@ -3,7 +3,7 @@ local files = require("files") local log = require("log") return function(uri, options) - local text = files.getText(uri) + local text = files.getOriginText(uri) local ast = files.getState(uri) local status, formattedText = codeFormat.format(uri, text, options) diff --git a/script/core/rangeformatting.lua b/script/core/rangeformatting.lua index ccf2d21f..f64e9cda 100644 --- a/script/core/rangeformatting.lua +++ b/script/core/rangeformatting.lua @@ -4,7 +4,7 @@ local log = require("log") local converter = require("proto.converter") return function(uri, range, options) - local text = files.getText(uri) + local text = files.getOriginText(uri) local status, formattedText, startLine, endLine = codeFormat.range_format( uri, text, range.start.line, range["end"].line, options) |