diff options
author | CppCXY <812125110@qq.com> | 2022-02-22 14:06:47 +0800 |
---|---|---|
committer | CppCXY <812125110@qq.com> | 2022-02-22 14:06:47 +0800 |
commit | aa13abab66752f42081f8d61d7fb415d03953364 (patch) | |
tree | 55830fba4b6ed0bcff27670a1bb5fdaf8504e244 /script/core | |
parent | e518eed9efd99c46b79c9413c5f34a0f675ab9e6 (diff) | |
download | lua-language-server-aa13abab66752f42081f8d61d7fb415d03953364.zip |
编辑器设置优先
Diffstat (limited to 'script/core')
-rw-r--r-- | script/core/formatting.lua | 8 | ||||
-rw-r--r-- | script/core/rangeformatting.lua | 4 |
2 files changed, 6 insertions, 6 deletions
diff --git a/script/core/formatting.lua b/script/core/formatting.lua index 6c57b8c2..49da6861 100644 --- a/script/core/formatting.lua +++ b/script/core/formatting.lua @@ -1,11 +1,11 @@ local codeFormat = require("code_format") -local files = require("files") -local log = require("log") +local files = require("files") +local log = require("log") -return function(uri) +return function(uri, options) local text = files.getText(uri) local ast = files.getState(uri) - local status, formattedText = codeFormat.format(uri, text) + local status, formattedText = codeFormat.format(uri, text, options) if not status then if formattedText ~= nil then diff --git a/script/core/rangeformatting.lua b/script/core/rangeformatting.lua index de9516c1..ccf2d21f 100644 --- a/script/core/rangeformatting.lua +++ b/script/core/rangeformatting.lua @@ -3,10 +3,10 @@ local files = require("files") local log = require("log") local converter = require("proto.converter") -return function(uri, range) +return function(uri, range, options) local text = files.getText(uri) local status, formattedText, startLine, endLine = codeFormat.range_format( - uri, text, range.start.line, range["end"].line) + uri, text, range.start.line, range["end"].line, options) if not status then if formattedText ~= nil then |