local home=os.getenv( "HOME" )
local gdb_path = home .. "/.config/nvim/gdb/extension/debugAdapters/bin/OpenDebugAD7"
local dap = require('dap')
dap.adapters.cppdbg = {
id = 'cppdbg',
type = 'executable',
command = gdb_path,
}
dap.configurations.cpp = {
{
name = "Launch file",
type = "cppdbg",
request = "launch",
program = function()
return vim.fn.input('Path to executable: ', vim.fn.getcwd() .. '/', 'file')
end,
cwd = '${workspaceFolder}',
stopAtEntry = true,
setupCommands = {
{
text = '-enable-pretty-printing',
description = 'enable pretty printing',
ignoreFailures = false
},
{
text = 'set follow-fork-mode parent',
description = 'follow parent process',
ignoreFailures = false
},
{
text = 'set detach-on-fork off',
description = 'disable detach on fork',
ignoreFailures = false
},
},
},
}
Debug adapter version
vscode-cpptools v1.17.5
Steps to Reproduce
1) Create a functions called some_function().
2) Open the REPL window, switch to it and enter insert mode.
3) Type -exec b some:
4) Press <C-x><C-o> to trigger autocompletion:
Expected Result
The completed suggestion should overwrite the entire line:
-exec b some_function()
Actual Result
The completed suggestion is appended to what was typed before triggering the completion:
-exec b -exec b some_function()
Debug adapter definition and debug configuration
Debug adapter version
vscode-cpptools v1.17.5
Steps to Reproduce
1) Create a functions called
4) Press ![completion](https://github.com/mfussenegger/nvim-dap/assets/38672094/048b1f43-a3e1-4c5f-8981-ea014438fe91)
some_function()
. 2) Open the REPL window, switch to it and enter insert mode. 3) Type-exec b some
:<C-x><C-o>
to trigger autocompletion:Expected Result
The completed suggestion should overwrite the entire line:
-exec b some_function()
Actual Result
The completed suggestion is appended to what was typed before triggering the completion:
-exec b -exec b some_function()