Open dohmjan opened 1 year ago
By not closed do you mean it is still listed (i.e. appears in :ls
)?
There's nothing in cmp-dap that would be do that, but perhaps nvim-cmp is doing something? I don't experience any issue with it however
Yes. It doesn't exist until I select something from autocompletion in repl, then:
Finished the session and it's still there.
I encountered the same behavior and could not find a quick fix. The temporary workaround I am using at the moment is to disable cmp-dap
for [dap-repl]
buffers (comment out "dap-repl"
when setting up require("cmp").setup.filetype(...)
) and rely on nvim-dap
's completion suggestion via <C-x><C-o>
(built-in omnifunc implementation).
@dohmjan @oshevtsov @jaghaimo Hi, I have got a solution to hide dap-repl buffer, not close. Because this buffer shoud be reuse by the next dap session. It can be checked at my config files MozyVim.
local dap = require("dap")
local function clear_dap_ui()
local bufs = utils.find_buffers_by_filetype("dap-repl")
for _, buf in ipairs(bufs) do
vim.bo[buf].buflisted = false
end
end
dap.listeners.before.event_terminated["dapui_config"] = function()
clear_dap_ui()
end
dap.listeners.after.disconnect["dapui_config"] = function()
clear_dap_ui()
end
Hello! I am using
nvim-dap
with yournvim-dap-ui
and lately also triedcmp-dap
. I really like it, thank you!Without
cmp-dap
, the repl buffer automatically closes when toggling/closing the dap-ui. The corresponding issue was raised here. Your workaround in this comment and your PR in nvim-dap both worked. Now, after I includedcmp-dap
, the issue reappears. Could you imagine whether this is due tocmp-dap
?