Skip to content

Commit 0703a80

Browse files
committed
Fixed some minor issues
1 parent 6ac41ac commit 0703a80

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

script/cli/doc/init.lua

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -193,8 +193,8 @@ function doc.runCLI()
193193

194194
print('root uri = ' .. rootUri)
195195

196-
--- If '--configpath' is specified, get the folder path of the '.luarc.doc.josn' configuration file (without the file name)
197-
--- 如果指定了'--configpath',则获取`.luarc.doc.josn` 配置文件的文件夹路径(不包含文件名)
196+
--- If '--configpath' is specified, get the folder path of the '.luarc.doc.json' configuration file (without the file name)
197+
--- 如果指定了'--configpath',则获取`.luarc.doc.json` 配置文件的文件夹路径(不包含文件名)
198198
--- This option is passed into the callback function of the initialized method in provide.
199199
--- 该选项会被传入到`provide`中的`initialized`方法的回调函数中
200200
local luarcParentUri
@@ -212,7 +212,7 @@ function doc.runCLI()
212212

213213
client:initialize {
214214
rootUri = rootUri,
215-
luarcParentUri = luarcParentUri
215+
luarcParentUri = luarcParentUri,
216216
}
217217
io.write(lang.script('CLI_DOC_INITING'))
218218

script/provider/provider.lua

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,8 @@ m.register 'initialized'{
141141
---@async
142142
function (_params)
143143
local _ <close> = progress.create(workspace.getFirstScope().uri, lang.script.WINDOW_INITIALIZING, 0.5)
144-
m.updateConfig((_params or {}).luarcParentUri)
144+
--- 传递`.luarc.doc.json`文件所在的文件夹路径
145+
m.updateConfig(_params and _params.luarcParentUri)
145146
local registrations = {}
146147

147148
if client.getAbility 'workspace.didChangeConfiguration.dynamicRegistration' then

0 commit comments

Comments
 (0)