Skip to content

Commit 7d143b1

Browse files
committed
docs(tooling): correct two LuaDoc annotations from copilot review
- attach_endpoint: mark opts.default_port optional (`default_port?`); the python DAP caller omits it to mean "port required", which the previous `integer|nil` value type wrongly flagged as a missing field. - resolve_runtime_tools: add the `reason` field to the probe return type — info() reads result.reason (the conform probe's per-buffer unresolved case), but the annotation omitted it. Annotation-only; no runtime change.
1 parent 6a18bb3 commit 7d143b1

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

lua/modules/utils/dap.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ end
2727
---(tonumber-coerced). `opts.default_port` fills an absent port; nil means the
2828
---port is required. An absent host defaults to "127.0.0.1".
2929
---@param config table @The table carrying .host/.port (caller resolves any connect indirection).
30-
---@param opts { label: string, default_port: integer|nil }
30+
---@param opts { label: string, default_port?: integer } @default_port omitted = port required.
3131
---@return string host, integer port
3232
function M.attach_endpoint(config, opts)
3333
local port = opts.default_port

lua/modules/utils/tools.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1357,7 +1357,7 @@ end
13571357
---Mason is only the lazy install fallback, reverse-looked-up from the binary.
13581358
---@param title string @Notification title identifying the subsystem.
13591359
---@param deps string[] @Tool names as the subsystem knows them.
1360-
---@param probe fun(name: string): { binary: string|nil, broken: string|nil, unresolved: boolean|nil }|nil
1360+
---@param probe fun(name: string): { binary: string|nil, broken: string|nil, unresolved: boolean|nil, reason: string|nil }|nil
13611361
---@param configure? fun(name: string, late: boolean) @Optional: run for each available/local tool
13621362
--- (e.g. rewrite its command to an absolute path while Mason's bin dir is
13631363
--- still off $PATH).

0 commit comments

Comments
 (0)