summaryrefslogtreecommitdiff
path: root/.config/nvim/lua
diff options
context:
space:
mode:
Diffstat (limited to '.config/nvim/lua')
-rw-r--r--.config/nvim/lua/dap_lldb.lua52
1 files changed, 20 insertions, 32 deletions
diff --git a/.config/nvim/lua/dap_lldb.lua b/.config/nvim/lua/dap_lldb.lua
index 495fb72..40861d0 100644
--- a/.config/nvim/lua/dap_lldb.lua
+++ b/.config/nvim/lua/dap_lldb.lua
@@ -1,37 +1,25 @@
-local dap = require('dap')
+local dap = require'dap'
+
+require("dapui").setup()
+
dap.adapters.lldb = {
- type = 'executable',
- command = '/usr/bin/lldb-vscode', -- adjust as needed, must be absolute path
- name = 'lldb'
+ type = 'executable',
+ -- absolute path is important here, otherwise the argument in the `runInTerminal` request will default to $CWD/lldb-vscode
+ command = '/usr/bin/lldb-vscode',
+ name = "lldb"
}
-
-local dap = require('dap')
dap.configurations.c = {
- {
- name = 'Launch',
- type = 'lldb',
- request = 'launch',
- program = function()
- return vim.fn.input('Path to executable: ', vim.fn.getcwd() .. '/', 'file')
- end,
- cwd = '${workspaceFolder}',
- stopOnEntry = false,
- args = {},
-
- -- 💀
- -- if you change `runInTerminal` to true, you might need to change the yama/ptrace_scope setting:
- --
- -- echo 0 | sudo tee /proc/sys/kernel/yama/ptrace_scope
- --
- -- Otherwise you might get the following error:
- --
- -- Error on launch: Failed to attach to the target process
- --
- -- But you should be aware of the implications:
- -- https://www.kernel.org/doc/html/latest/admin-guide/LSM/Yama.html
- -- runInTerminal = false,
- },
+ {
+ name = "Launch",
+ type = "lldb",
+ request = "launch",
+ program = function()
+ return vim.fn.input('Path to executable: ', vim.fn.getcwd() .. '/', 'file')
+ end,
+ cwd = '${workspaceFolder}',
+ stopOnEntry = false,
+ args = {},
+ runInTerminal = true,
+ },
}
-dap.configurations.cpp = dap.configurations.c
-require("nvim-dap-virtual-text").setup()