-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.local.vimrc
78 lines (67 loc) · 2.08 KB
/
.local.vimrc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
lua << EOF
local dap = require('dap')
require('dap.ext.vscode').load_launchjs(nil, { codelldb = {'c', 'cpp'} })
-- Delete the following configuration to launch json configurations in .vscode/launch.json
dap.configurations.cpp = {
{
-- Change it to "cppdbg" if you have vscode-cpptools
type = "codelldb",
name = "Select executable",
request = "launch",
program = function ()
return vim.fn.input('Path to executable: ', vim.fn.getcwd() .. '/build/debug/', 'file')
end,
args = function ()
local argv = {}
arg = vim.fn.input(string.format("argv: "))
for a in string.gmatch(arg, "%S+") do
table.insert(argv, a)
end
vim.cmd('echo ""')
return argv
end,
cwd = "${workspaceFolder}/build/debug",
-- Uncomment if you want to stop at main
stopAtEntry = true,
MIMode = "gdb",
miDebuggerPath = "/usr/bin/gdb",
setupCommands = {
{
text = "-enable-pretty-printing",
description = "enable pretty printing",
ignoreFailures = false,
},
},
},
{
-- Change it to "cppdbg" if you have vscode-cpptools
type = "codelldb",
name = "PAR",
request = "launch",
program = function ()
return 'build/debug/PAR'
end,
args = function ()
local argv = {}
arg = vim.fn.input(string.format("argv: "))
for a in string.gmatch(arg, "%S+") do
table.insert(argv, a)
end
vim.cmd('echo ""')
return argv
end,
cwd = "${workspaceFolder}/build/debug",
-- Uncomment if you want to stop at main
stopAtEntry = true,
MIMode = "gdb",
miDebuggerPath = "/usr/bin/gdb",
setupCommands = {
{
text = "-enable-pretty-printing",
description = "enable pretty printing",
ignoreFailures = false,
},
},
}
}
EOF