Skip to content

Commit

Permalink
Fixed some minor issues
Browse files Browse the repository at this point in the history
  • Loading branch information
Mc-GrowlR committed Dec 28, 2024
1 parent 6ac41ac commit 0703a80
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
6 changes: 3 additions & 3 deletions script/cli/doc/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -193,8 +193,8 @@ function doc.runCLI()

print('root uri = ' .. rootUri)

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

client:initialize {
rootUri = rootUri,
luarcParentUri = luarcParentUri
luarcParentUri = luarcParentUri,
}
io.write(lang.script('CLI_DOC_INITING'))

Expand Down
3 changes: 2 additions & 1 deletion script/provider/provider.lua
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,8 @@ m.register 'initialized'{
---@async
function (_params)
local _ <close> = progress.create(workspace.getFirstScope().uri, lang.script.WINDOW_INITIALIZING, 0.5)
m.updateConfig((_params or {}).luarcParentUri)
--- 传递`.luarc.doc.json`文件所在的文件夹路径
m.updateConfig(_params and _params.luarcParentUri)
local registrations = {}

if client.getAbility 'workspace.didChangeConfiguration.dynamicRegistration' then
Expand Down

0 comments on commit 0703a80

Please sign in to comment.