Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a new option dap.repl.show_tree: whether to show the tree in REPL #1001

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion lua/dap/repl.lua
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ local history = {
}

local autoscroll = vim.fn.has('nvim-0.7') == 1
M.show_tree = true

local function get_session()
return require('dap').session()
Expand Down Expand Up @@ -157,7 +158,7 @@ local function evaluate_handler(err, resp)
end
local layer = ui.layer(repl.buf)
local attributes = (resp.presentationHint or {}).attributes or {}
if resp.variablesReference > 0 or vim.tbl_contains(attributes, 'rawString') then
if M.show_tree and (resp.variablesReference > 0 or vim.tbl_contains(attributes, 'rawString')) then
local spec = require('dap.entity').variable.tree_spec
local tree = ui.new_tree(spec)
-- tree.render would "append" twice, once for the top element and once for the children
Expand Down
Loading