Closed Bryaneven closed 1 year ago
im having that, happens at 3953824
experiencing the same problem
Same here
If someone can provide a minimal init.lua to reproduce, I can figure out the issue as right now unfortunately I cannot reproduce.
Here's a starter one you can run with nvim --clean -u minimal.lua
-- ignore default config and plugins
vim.opt.runtimepath:remove(vim.fn.stdpath("config"))
vim.opt.packpath:remove(vim.fn.stdpath("data") .. "/site")
vim.opt.termguicolors = true
vim.opt.laststatus = 0
-- append test directory
local test_dir = "/tmp/nvim-config"
vim.opt.runtimepath:append(vim.fn.expand(test_dir))
vim.opt.packpath:append(vim.fn.expand(test_dir))
-- install packer
local install_path = test_dir .. "/pack/packer/start/packer.nvim"
local install_plugins = false
if vim.fn.empty(vim.fn.glob(install_path)) > 0 then
vim.cmd("!git clone https://github.com/wbthomason/packer.nvim " .. install_path)
vim.cmd("packadd packer.nvim")
install_plugins = true
end
local packer = require("packer")
packer.init({
package_root = test_dir .. "/pack",
compile_path = test_dir .. "/plugin/packer_compiled.lua",
})
packer.startup(function(use)
-- Packer can manage itself
use("wbthomason/packer.nvim")
use({ "mfussenegger/nvim-dap" })
use({
"rcarriga/nvim-dap-ui",
requires = "mfussenegger/nvim-dap",
config = function()
require("dapui").setup({})
end,
})
if install_plugins then
packer.sync()
end
end)
vim.cmd([[
command! DapUIToggle lua require("dapui").toggle()
]])
If someone can provide a minimal init.lua to reproduce, I can figure out the issue as right now unfortunately I cannot reproduce. Here's a starter one you can run with
nvim --clean -u minimal.lua
I met similar problem when using the following settings:
config = function() -- dapui config
local dap, dapui = require("dap"), require("dapui")
dapui.setup(opts) -- my dap-ui settings, not important
local debug_open = function()
dapui.open()
end
local debug_close = function()
dap.repl.close() -- key point
dapui.close()
end
dap.listeners.after.event_initialized["dapui_config"] = debug_open
dap.listeners.before.event_terminated["dapui_config"] = debug_close
dap.listeners.before.event_exited["dapui_config"] = debug_close
dap.listeners.before.disconnect["dapui_config"] = debug_close
end,
this config result in very strange insert behaviour, for example, after dap debug finished, I press any key, it will go into insert mode.
This is caused by dap.repl.close()
, I removed this line, and all bugs gone!
dap.repl.close()
will be called in dapui.close()
, there's no need to call it manully, if add it in user config, it will cause strange behaviour!
In dapui
old versions, repl
will not be closed automatically, so I need to add dap.repl.close()
,
But in dapui
recent versions, repl
closed behaviour is controlled by dapui.close()
, that't the difference :)
I'm also having issues with insert mode after calling dapui.close(). The only thing that fixes it is calling dapui.open() again, then I can type normally but whenever I call close again it's screwed :/
Unfortunately don't have the time to dive deeper right now but in my case the dap.repl.close() workaround doesn't do it.
I'm also having issues with insert mode after calling dapui.close(). The only thing that fixes it is calling dapui.open() again, then I can type normally but whenever I call close again it's screwed :/
I am having the same problem.
same problem as well
Closing as the fix is in neovim, not nvim-dap-ui
I updated the plugin from 2.6.0 to 3.2.5 this morning , after using the REPL and closing it , i now have a strange behaviour where every keys i press put me in insert mode and a new line pop under my lualine.
Downgrading the version to 3.2.2 did the trick so it seems that the issue is caused by the v3.2.3 changes .