diff options
Diffstat (limited to '.config/nvim/after')
| -rw-r--r-- | .config/nvim/after/plugin/mason.lua | 1 | ||||
| -rw-r--r-- | .config/nvim/after/plugin/nvim-dap-lldb.lua | 34 |
2 files changed, 35 insertions, 0 deletions
diff --git a/.config/nvim/after/plugin/mason.lua b/.config/nvim/after/plugin/mason.lua new file mode 100644 index 0000000..ac26661 --- /dev/null +++ b/.config/nvim/after/plugin/mason.lua @@ -0,0 +1 @@ +require("mason").setup() diff --git a/.config/nvim/after/plugin/nvim-dap-lldb.lua b/.config/nvim/after/plugin/nvim-dap-lldb.lua new file mode 100644 index 0000000..83425fa --- /dev/null +++ b/.config/nvim/after/plugin/nvim-dap-lldb.lua @@ -0,0 +1,34 @@ +local dap = require('dap') +dap.adapters.lldb = { + type = 'executable', + command = '/opt/homebrew/opt/llvm/bin/lldb-dap', -- adjust as needed, must be absolute path + 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, + }, +} |
