-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.nvim-dap.lua.example
More file actions
61 lines (56 loc) · 1.6 KB
/
.nvim-dap.lua.example
File metadata and controls
61 lines (56 loc) · 1.6 KB
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
local dap = require('dap')
local mason_registry = require("mason-registry")
local codelldb_root = mason_registry.get_package("codelldb"):get_install_path() .. "/extension/"
local codelldb_path = codelldb_root .. "adapter/codelldb"
local liblldb_path = codelldb_root .. "lldb/lib/liblldb.so"
dap.adapters.lldb = {
type = "executable",
name = "lldb",
command = "~/.local/share/nvim/mason/packages/codelldb/extension/adapter/codelldb"
}
dap.adapters.codelldb = {
type = "server",
port = "${port}",
host = "127.0.0.1",
executable = {
command = codelldb_path,
args = { "--liblldb", liblldb_path, "--port", "${port}" },
},
}
dap.configurations.rust = {
{
name = "yad-tui2",
type = "lldb",
request = "launch",
console = "integratedTerminal",
terminal = "integratedTerminal",
program = function()
return vim.fn.getcwd() .. "/target/debug/yad-tui"
end,
cwd = "${workspaceFolder}",
justMyCode = false,
env = {
RUST_BACKTRACE = 1
},
options = {
env = {
RUST_BACKTRACE = 1
}
}
},
{
name = "hello-dap",
type = "codelldb",
request = "launch",
program = function()
return vim.fn.getcwd() .. "/target/debug/yad-tui"
end,
cwd = "${workspaceFolder}",
stopOnEntry = false,
-- consoleMode = "evaluate",
-- console = "externalTerminal",
-- terminal = "integrated",
-- terminal = "external",
sourceLanguages = { 'rust' }
},
}