diff options
author | justanothercatgirl <sotov2070@gmail.com> | 2024-05-21 18:10:21 +0300 |
---|---|---|
committer | justanothercatgirl <sotov2070@gmail.com> | 2024-05-21 18:10:21 +0300 |
commit | b2b543355c03ec24281d05380f92e2e793e511f4 (patch) | |
tree | 26bf76b6da4a16aa9b5dbb9549eadf13144d2594 /.config/nvim/lua/user/debugger.lua | |
parent | 551cd0d2a7a599011393ba39b74e31f25425748c (diff) |
added some changes to neovim config
Diffstat (limited to '.config/nvim/lua/user/debugger.lua')
-rw-r--r-- | .config/nvim/lua/user/debugger.lua | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/.config/nvim/lua/user/debugger.lua b/.config/nvim/lua/user/debugger.lua new file mode 100644 index 0000000..98a2bb2 --- /dev/null +++ b/.config/nvim/lua/user/debugger.lua @@ -0,0 +1,36 @@ +local dap = require('dap') + +-- try getting arguments +-- function() +-- local string = vim.ui.input("arguments to program:") +-- local t = {} +-- for str in string.gmatch(string, "([^ ]+)") do +-- table.insert(str) +-- end +-- return t +-- end, + + +lldb = { + name = "LLDB", + type = "lldb", + request = "launch", + program = function() + return vim.fn.input("Path to executable: ", vim.fn.getcwd() .. "/", "file") + end, + cwd = "${workspaceFolder}", + stopOnEntry = false, + args = {}, + runInTerminal = false +} + +dap.adapters.lldb = { + type = "executable", + command = "/usr/bin/lldb-vscode", + name = "lldb" +} + +dap.configurations = { + cpp = { lldb }, + rust = { lldb }, +} |