debug rust with codelldb; manual call required

This commit is contained in:
Andy Teijelo 2022-10-20 01:57:40 -04:00
parent e347c1f5c7
commit dcc9122da9
4 changed files with 51 additions and 49 deletions

View file

@ -21,8 +21,8 @@ require "user.impatient"
require "user.illuminate"
require "user.indentline"
require "user.lsp"
--require "user.dap"
require "user.dap"
require "user.exrc"
require "user.vimspector"
--require "user.vimspector"
require "user.fidget"

View file

@ -16,24 +16,26 @@ end
dap_install.setup {}
dap_install.config("python", {})
dap_install.config("codelldb", {})
-- add other configs here
dapui.setup {
sidebar = {
elements = {
{
id = "scopes",
size = 0.25, -- Can be float or integer > 1
},
{ id = "breakpoints", size = 0.25 },
},
size = 40,
position = "right", -- Can be "left", "right", "top", "bottom"
},
tray = {
elements = {},
},
}
dapui.setup()
--dapui.setup {
-- sidebar = {
-- elements = {
-- {
-- id = "scopes",
-- size = 0.25, -- Can be float or integer > 1
-- },
-- { id = "breakpoints", size = 0.25 },
-- },
-- size = 40,
-- position = "right", -- Can be "left", "right", "top", "bottom"
-- },
-- tray = {
-- elements = {},
-- },
--}
vim.fn.sign_define("DapBreakpoint", { text = "", texthl = "DiagnosticSignError", linehl = "", numhl = "" })
@ -58,6 +60,6 @@ dap.adapters.codelldb = {
port = "13000",
executable = {
command = codelldb_path,
args = {"--liblldb", liblldb_path, "--port", "13000"},
args = {"--liblldb", liblldb_path, "--port", "13000", "--params", "{\"showDisassembly\": \"never\"}"},
}
}

View file

@ -77,23 +77,23 @@ keymap("n", "<leader>fb", ":Telescope buffers<CR>", opts)
keymap("n", "<leader>/", "<cmd>lua require('Comment.api').toggle_current_linewise()<CR>", opts)
keymap("x", "<leader>/", '<ESC><CMD>lua require("Comment.api").toggle_linewise_op(vim.fn.visualmode())<CR>')
---- DAP
--keymap("n", "<F9>", "<cmd>lua require'dap'.toggle_breakpoint()<cr>", opts)
--keymap("n", "<F5>", "<cmd>lua require'dap'.continue()<cr>", opts)
--keymap("n", "<F10>", "<cmd>lua require'dap'.step_over()<cr>", opts)
--keymap("n", "<F11>", "<cmd>lua require'dap'.step_into()<cr>", opts)
--keymap("n", "<F23>", "<cmd>lua require'dap'.step_out()<cr>", opts)
--keymap("n", "<leader>dr", "<cmd>lua require'dap'.repl.toggle()<cr>", opts)
--keymap("n", "<leader>dl", "<cmd>lua require'dap'.run_last()<cr>", opts)
--keymap("n", "<leader>du", "<cmd>lua require'dapui'.toggle()<cr>", opts)
--keymap("n", "<F17>", "<cmd>lua require'dap'.terminate()<cr>", opts)
-- DAP
keymap("n", "<F9>", "<cmd>lua require'dap'.toggle_breakpoint()<cr>", opts)
keymap("n", "<F5>", "<cmd>lua require'dap'.continue()<cr>", opts)
keymap("n", "<F10>", "<cmd>lua require'dap'.step_over()<cr>", opts)
keymap("n", "<F11>", "<cmd>lua require'dap'.step_into()<cr>", opts)
keymap("n", "<F23>", "<cmd>lua require'dap'.step_out()<cr>", opts)
keymap("n", "<leader>dr", "<cmd>lua require'dap'.repl.toggle()<cr>", opts)
keymap("n", "<leader>dl", "<cmd>lua require'dap'.run_last()<cr>", opts)
keymap("n", "<leader>du", "<cmd>lua require'dapui'.toggle()<cr>", opts)
keymap("n", "<F17>", "<cmd>lua require'dap'.terminate()<cr>", opts) -- Shift+F5
-- Vimspector
keymap("n", "<F9>", "<Plug>VimspectorToggleBreakpoint", opts)
keymap("n", "<F5>", "<plug>VimspectorContinue", opts)
keymap("n", "<F10>", "<Plug>VimspectorStepOver", opts)
keymap("n", "<F11>", "<Plug>VimspectorStepInto", opts)
keymap("n", "<F23>", "<Plug>VimspectorStepOut", opts)
keymap("n", "<F17>", "<cmd>VimspectorReset<cr>", opts) -- Shift+F5
keymap("n", "<F41>", "<Plug>VimspectorRestart", opts) -- Ctrl+Shift+F5
keymap("n", "<leader>di", "<Plug>VimspectorBalloonEval", opts)
---- Vimspector
--keymap("n", "<F9>", "<Plug>VimspectorToggleBreakpoint", opts)
--keymap("n", "<F5>", "<plug>VimspectorContinue", opts)
--keymap("n", "<F10>", "<Plug>VimspectorStepOver", opts)
--keymap("n", "<F11>", "<Plug>VimspectorStepInto", opts)
--keymap("n", "<F23>", "<Plug>VimspectorStepOut", opts)
--keymap("n", "<F17>", "<cmd>VimspectorReset<cr>", opts) -- Shift+F5
--keymap("n", "<F41>", "<Plug>VimspectorRestart", opts) -- Ctrl+Shift+F5
--keymap("n", "<leader>di", "<Plug>VimspectorBalloonEval", opts)

View file

@ -101,16 +101,16 @@ return packer.startup(function(use)
-- Git
use { "lewis6991/gitsigns.nvim", commit = "f98c85e7c3d65a51f45863a34feb4849c82f240f" }
---- DAP
--use { "mfussenegger/nvim-dap", commit = "014ebd53612cfd42ac8c131e6cec7c194572f21d" }
--use { "rcarriga/nvim-dap-ui", commit = "d76d6594374fb54abf2d94d6a320f3fd6e9bb2f7" }
--use { "ravenxrz/DAPInstall.nvim", commit = "8798b4c36d33723e7bba6ed6e2c202f84bb300de" }
-- DAP
use { "mfussenegger/nvim-dap", commit = "014ebd53612cfd42ac8c131e6cec7c194572f21d" }
use { "rcarriga/nvim-dap-ui", commit = "d76d6594374fb54abf2d94d6a320f3fd6e9bb2f7" }
use { "ravenxrz/DAPInstall.nvim", commit = "8798b4c36d33723e7bba6ed6e2c202f84bb300de" }
use { "MunifTanjim/exrc.nvim" }
use { "simrat39/rust-tools.nvim" }
-- VimSpector
use { "puremourning/vimspector" }
--use { "puremourning/vimspector" }
use { "j-hui/fidget.nvim", commit = "1097a86db8ba38e390850dc4035a03ed234a4673" }