From b8aaad70c5a966f41e2fd0acc8230ed4cdf2db56 Mon Sep 17 00:00:00 2001 From: zymon Date: Fri, 20 Dec 2024 23:26:16 +0100 Subject: [PATCH] julia debugging --- lua/znvim/plugins/init.lua | 46 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) diff --git a/lua/znvim/plugins/init.lua b/lua/znvim/plugins/init.lua index c563ca2..db2a43d 100644 --- a/lua/znvim/plugins/init.lua +++ b/lua/znvim/plugins/init.lua @@ -158,4 +158,50 @@ return { }, }, }, + + { + { + "mfussenegger/nvim-dap", + dependencies = { + "rcarriga/nvim-dap-ui", + "theHamsta/nvim-dap-virtual-text", + "nvim-neotest/nvim-nio", + "kdheepak/nvim-dap-julia", + }, + config = function() + local dap = require("dap") + local ui = require("dapui") + + require("dapui").setup() + require("nvim-dap-julia").setup() + + vim.keymap.set("n", "db", dap.toggle_breakpoint) + vim.keymap.set("n", "dB", dap.run_to_cursor) + + vim.keymap.set("n", "", dap.continue) + vim.keymap.set("n", "", dap.step_into) + vim.keymap.set("n", "", dap.step_over) + vim.keymap.set("n", "", dap.step_out) + vim.keymap.set("n", "", dap.step_back) + vim.keymap.set("n", "", dap.restart) + + dap.listeners.before.attach.dapui_config = function() + ui.open() + end + dap.listeners.before.launch.dapui_config = function() + ui.open() + end + dap.listeners.before.event_terminated.dapui_config = function() + ui.close() + end + dap.listeners.before.event_exited.dapui_config = function() + ui.close() + end + end, + }, + } + + + + }