diff options
author | Filip Dutescu | 2023-03-29 03:52:19 +0000 |
---|---|---|
committer | GitHub | 2023-03-29 03:52:19 +0000 |
commit | d59b80514e15d26f280a9b0dbd18afac08578638 (patch) | |
tree | e660c1c765404925f29465e4fb303e7b6fea2165 /helix-dap/src | |
parent | bbcdcd04a5f6c02c14d73d6bd0f53099b1fcb765 (diff) |
feat(debug): highlight current line (#5957)
Add new theme highlight keys, for setting the colour of the breakpoint
character and the current line at which execution has been paused at.
The two new keys are `ui.highlight.frameline` and `ui.debug.breakpoint`.
Highlight according to those keys, both the line at which debugging
is paused at and the breakpoint indicator.
Add an indicator for the current line at which execution is paused
at, themed by the `ui.debug.active` theme scope. Update various themes
to showcase how the new functionality works.
Better icons are dependent on #2869, and as such will be handled in the
future, once it lands.
Closes: #5952
Signed-off-by: Filip Dutescu <filip.dutescu@gmail.com>
Diffstat (limited to 'helix-dap/src')
-rw-r--r-- | helix-dap/src/client.rs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/helix-dap/src/client.rs b/helix-dap/src/client.rs index ff727d00..7efb72d8 100644 --- a/helix-dap/src/client.rs +++ b/helix-dap/src/client.rs @@ -512,4 +512,10 @@ impl Client { self.call::<requests::SetExceptionBreakpoints>(args) } + + pub fn current_stack_frame(&self) -> Option<&StackFrame> { + self.stack_frames + .get(&self.thread_id?)? + .get(self.active_frame?) + } } |