add debugging config
This commit is contained in:
parent
7419bd147e
commit
dd144abebf
2
init.lua
2
init.lua
|
@ -213,7 +213,7 @@ require('lazy').setup({
|
||||||
-- These are some example plugins that I've included in the kickstart repository.
|
-- These are some example plugins that I've included in the kickstart repository.
|
||||||
-- Uncomment any of the lines below to enable them.
|
-- Uncomment any of the lines below to enable them.
|
||||||
-- require 'kickstart.plugins.autoformat',
|
-- require 'kickstart.plugins.autoformat',
|
||||||
-- require 'kickstart.plugins.debug',
|
require 'kickstart.plugins.debug',
|
||||||
|
|
||||||
-- NOTE: The import below can automatically add your own plugins, configuration, etc from `lua/custom/plugins/*.lua`
|
-- NOTE: The import below can automatically add your own plugins, configuration, etc from `lua/custom/plugins/*.lua`
|
||||||
-- You can use this folder to prevent any conflicts with this init.lua if you're interested in keeping
|
-- You can use this folder to prevent any conflicts with this init.lua if you're interested in keeping
|
||||||
|
|
|
@ -0,0 +1,10 @@
|
||||||
|
local dap = require('dap')
|
||||||
|
|
||||||
|
dap.adapters.codelldb = {
|
||||||
|
type = 'server',
|
||||||
|
port = "${port}",
|
||||||
|
executable = {
|
||||||
|
command = vim.fn.stdpath('data') .. '/mason/bin/codelldb',
|
||||||
|
args = { "--port", "${port}" },
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,7 @@
|
||||||
|
local dap = require('dap')
|
||||||
|
|
||||||
|
dap.adapters.cppdbg = {
|
||||||
|
id = 'cppdbg',
|
||||||
|
type = 'executable',
|
||||||
|
command = vim.fn.stdpath('data') .. '/mason/bin/OpenDebugAD7'
|
||||||
|
}
|
|
@ -0,0 +1 @@
|
||||||
|
require('custom.dap.adapters.cpptools')
|
|
@ -0,0 +1,6 @@
|
||||||
|
local dap = require('dap')
|
||||||
|
|
||||||
|
dap.adapters.lldb = {
|
||||||
|
type = 'executable',
|
||||||
|
command = 'lldb-vscode'
|
||||||
|
}
|
|
@ -0,0 +1,7 @@
|
||||||
|
local dap_vscode = require('dap.ext.vscode')
|
||||||
|
|
||||||
|
dap_vscode.load_launchjs(nil, {
|
||||||
|
cppdbg = { 'c', 'cpp', 'rust' },
|
||||||
|
lldb = { 'c', 'cpp', 'rust' },
|
||||||
|
codelldb = { 'c', 'cpp', 'rust' },
|
||||||
|
})
|
|
@ -0,0 +1,2 @@
|
||||||
|
require('custom.dap.adapters')
|
||||||
|
require('custom.dap.config')
|
|
@ -13,6 +13,7 @@ return {
|
||||||
dependencies = {
|
dependencies = {
|
||||||
-- Creates a beautiful debugger UI
|
-- Creates a beautiful debugger UI
|
||||||
'rcarriga/nvim-dap-ui',
|
'rcarriga/nvim-dap-ui',
|
||||||
|
'theHamsta/nvim-dap-virtual-text',
|
||||||
|
|
||||||
-- Installs the debug adapters for you
|
-- Installs the debug adapters for you
|
||||||
'williamboman/mason.nvim',
|
'williamboman/mason.nvim',
|
||||||
|
@ -20,6 +21,7 @@ return {
|
||||||
|
|
||||||
-- Add your own debuggers here
|
-- Add your own debuggers here
|
||||||
'leoluz/nvim-dap-go',
|
'leoluz/nvim-dap-go',
|
||||||
|
'mfussenegger/nvim-dap-python',
|
||||||
},
|
},
|
||||||
config = function()
|
config = function()
|
||||||
local dap = require 'dap'
|
local dap = require 'dap'
|
||||||
|
@ -83,5 +85,9 @@ return {
|
||||||
|
|
||||||
-- Install golang specific config
|
-- Install golang specific config
|
||||||
require('dap-go').setup()
|
require('dap-go').setup()
|
||||||
|
-- Install python specific config
|
||||||
|
require('dap-python').setup()
|
||||||
|
-- Setup additional adapter/configuration definitions
|
||||||
|
require('custom.dap')
|
||||||
end,
|
end,
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue