summaryrefslogtreecommitdiff
path: root/script/core
diff options
context:
space:
mode:
authorCppCXY <812125110@qq.com>2022-08-17 20:04:37 +0800
committerCppCXY <812125110@qq.com>2022-08-17 20:04:37 +0800
commitc3d602a11de758f14e46a2b49539e5fe9c76dd8c (patch)
tree0660df12b41dafd8bd28d2de949caeb46483e771 /script/core
parente5ebce3d90da8cb59eee373fa119ad6eb8472546 (diff)
downloadlua-language-server-c3d602a11de758f14e46a2b49539e5fe9c76dd8c.zip
提交typeformat选项相关
Diffstat (limited to 'script/core')
-rw-r--r--script/core/type-formatting.lua4
1 files changed, 3 insertions, 1 deletions
diff --git a/script/core/type-formatting.lua b/script/core/type-formatting.lua
index c6316d80..90892604 100644
--- a/script/core/type-formatting.lua
+++ b/script/core/type-formatting.lua
@@ -2,6 +2,7 @@ local files = require 'files'
local lookBackward = require 'core.look-backward'
local guide = require "parser.guide"
local codeFormat = require "code_format"
+local config = require "config"
local function insertIndentation(uri, position, edits)
local text = files.getText(uri)
@@ -98,7 +99,8 @@ local function typeFormat(results, uri, position, ch, options)
end
local converter = require("proto.converter")
local pos = converter.packPosition(uri, position)
- local success, result = codeFormat.type_format(uri, text, pos.line, pos.character, options)
+ local typeFormatOptions = config.get(uri, 'Lua.typeFormat.config')
+ local success, result = codeFormat.type_format(uri, text, pos.line, pos.character, options, typeFormatOptions)
if success then
local range = result.range
results[#results+1] = {