diff --git a/lua/plugins/dap.lua b/lua/plugins/dap.lua index 25ae133..e6873fb 100644 --- a/lua/plugins/dap.lua +++ b/lua/plugins/dap.lua @@ -1,3 +1,33 @@ return { - 'mfussenegger/nvim-dap' + { + 'mfussenegger/nvim-dap', + init = function() + local dap = require("dap") + -- dap.adapters.lldb = { + -- type = "executable", + -- command = "/nix/store/ydcx96xw2wi2bndiaanql1wb8dqmy60r-vscode-extension-vadimcn-vscode-lldb-1.10.0/share/vscode/extensions/vadimcn.vscode-lldb/adapter/codelldb --port 13000", + -- name = "lldb", + -- port = "13000", + -- } + dap.adapters.lldb = { + type = "server", + port = "${port}", + executable = { + command = + "/nix/store/ydcx96xw2wi2bndiaanql1wb8dqmy60r-vscode-extension-vadimcn-vscode-lldb-1.10.0/share/vscode/extensions/vadimcn.vscode-lldb/adapter/codelldb", + args = { "--port", "${port}" }, + }, + name = "lldb", + } + dap.configurations.rust = { + { + type = "lldb", + request = "launch", + program = function() + return vim.fn.input('Path to executable: ', vim.fn.getcwd() .. '/', 'file') + end, + } + } + end + } }