Skip to content

Commit 897c433

Browse files
committed
Add type annotation for step_into opts; correct docs
1 parent 1c63f37 commit 897c433

File tree

3 files changed

+8
-4
lines changed

3 files changed

+8
-4
lines changed

doc/dap.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -791,12 +791,12 @@ step_into([{opts}]) *dap.step_into()*
791791
If it cannot step into a function or method it behaves like
792792
|dap.step_over()|.
793793

794-
If the debug adapter has the `supportsStepInTargetsRequest` and
795-
{ask_for_targets} is true, the user can choose into which function they
796-
want to step into if there are multiple.
794+
If the debug adapter has the `supportsStepInTargetsRequest` capability and
795+
{askForTargets} is true, the user can choose into which function they
796+
want to step into if there are multiple choices.
797797

798798
Some debug adapters allow a more fine-grained control over the
799-
behavior of this command using the {opts} parameter:
799+
behavior of this command using the `steppingGranularity` {opts} parameter:
800800

801801
steppingGranularity:
802802
Can be 'statement' | 'line' | 'instruction'

lua/dap.lua

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -563,6 +563,7 @@ function M.restart_frame()
563563
end
564564

565565

566+
---@param opts? {askForTargets?: boolean, steppingGranularity?: dap.SteppingGranularity}
566567
function M.step_into(opts)
567568
session = first_stopped_session()
568569
if not session then

lua/dap/protocol.lua

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -246,3 +246,6 @@
246246
---@class dap.StartDebuggingRequestArguments
247247
---@field configuration table<string, any>
248248
---@field request 'launch'|'attach'
249+
250+
251+
---@alias dap.SteppingGranularity 'statement'|'line'|'instruction'

0 commit comments

Comments
 (0)