From: Lukas Krickl Date: Fri, 28 Jul 2023 03:14:40 +0000 (+0200) Subject: Updated dap to use mason X-Git-Url: https://git.krickl.dev/?a=commitdiff_plain;h=ee637b2920f0afd99fd1dd4d363d91be0cb41e07;p=dotfiles%2F.git Updated dap to use mason --- diff --git a/nvim/lua/plugin/nvim-dap.lua b/nvim/lua/plugin/nvim-dap.lua index e25a24c..7167370 100644 --- a/nvim/lua/plugin/nvim-dap.lua +++ b/nvim/lua/plugin/nvim-dap.lua @@ -1,5 +1,7 @@ require("dapui").setup() +local path = vim.fn.stdpath('data') + local dap = require('dap') dap.adapters.lldb = { @@ -8,10 +10,23 @@ dap.adapters.lldb = { name = 'lldb' } +dap.adapters.codelldb = { + type = 'server', + port = "${port}", + executable = { + -- CHANGE THIS to your path! + command = path .. '/mason/bin/codelldb', + args = { "--port", "${port}" }, + + -- On windows you may have to uncomment this: + -- detached = false, + } +} + dap.configurations.cpp = { { name = 'Launch', - type = 'lldb', + type = 'codelldb', request = 'launch', program = function() return vim.fn.input('Path to executable: ', vim.fn.getcwd() .. '/', 'file')