[feature] Added silent parameter to the dap.repl.execute function to not repeat the command after execution.
needs votes
**Example for Python**
```lua
local repl = require('dap.repl')
repl.commands = vim.tbl_extend('force', repl.commands, {
custom_commands = {
["."] = function(expr)
if not expr or expr:match("^%s*$") then
repl.append('Usage: . <expression>')
return
end
local wrapped = 'repr(' .. expr .. ')'
repl.execute(wrapped, {context='repl', silent=true})
end,
}
})
```
Execution in the repl:
```
. <variable>
```
to show a variable without meta information.
I have tested this in python for the nvim-dap commit 6782b09.
This is related to these issues:
- https://github.com/mfussenegger/nvim-dap/issues/737
- https://github.com/mfussenegger/nvim-dap/issues/1062
合并状态:未合并 3 条评论