Skip to content

Commit 3e48646

Browse files
committed
#1207 add sample for description for LuaDoc
1 parent 1af368f commit 3e48646

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

Diff for: locale/en-us/script.lua

+7
Original file line numberDiff line numberDiff line change
@@ -546,3 +546,10 @@ CLI_CHECK_SUCCESS =
546546
'Diagnosis completed, no problems found'
547547
CLI_CHECK_RESULTS =
548548
'Diagnosis complete, {} problems found, see {}'
549+
550+
LUADOC_DESC_CLASS =
551+
[=[
552+
```lua
553+
---@class <name> [: <parent>[, <parent2>, ...]]
554+
```
555+
]=]

Diff for: script/core/completion/completion.lua

+1
Original file line numberDiff line numberDiff line change
@@ -1546,6 +1546,7 @@ local function tryluaDocCate(word, results)
15461546
results[#results+1] = {
15471547
label = docType,
15481548
kind = define.CompletionItemKind.Event,
1549+
description = lang.script('LUADOC_DESC_' .. docType:upper())
15491550
}
15501551
end
15511552
end

0 commit comments

Comments
 (0)