From 556f8f0e160ecb5bb42fe70ecbb7978575b311a0 Mon Sep 17 00:00:00 2001 From: Felipe Contreras Salinas Date: Sun, 5 Mar 2023 17:15:12 -0300 Subject: [PATCH] nvim-dap-ui --- .gitmodules | 3 +++ init.lua | 14 +++++++++++++- pack/general/start/nvim-dap-ui | 1 + 3 files changed, 17 insertions(+), 1 deletion(-) create mode 160000 pack/general/start/nvim-dap-ui diff --git a/.gitmodules b/.gitmodules index a2dd185..46486f6 100644 --- a/.gitmodules +++ b/.gitmodules @@ -79,3 +79,6 @@ [submodule "pack/general/start/nvim-dap-go"] path = pack/general/start/nvim-dap-go url = https://github.com/leoluz/nvim-dap-go +[submodule "pack/general/start/nvim-dap-ui"] + path = pack/general/start/nvim-dap-ui + url = https://github.com/rcarriga/nvim-dap-ui diff --git a/init.lua b/init.lua index 129fac2..9f58aa7 100644 --- a/init.lua +++ b/init.lua @@ -269,8 +269,9 @@ map('n', '/', ':Telescope current_buffer_fuzzy_find') map('n', 'g', ':Telescope live_grep') map('n', 'cg', ':Telescope grep_string') ---- nvim-dap --- nvim-dap-go local dap = require('dap') +vim.fn.sign_define('DapBreakpoint',{ text ='🟥', texthl ='', linehl ='', numhl =''}) +vim.fn.sign_define('DapStopped',{ text ='▶️', texthl ='', linehl ='', numhl =''}) -- Set keymaps to control the debugger vim.keymap.set('n', 'dc', require 'dap'.continue) vim.keymap.set('n', 'do', require 'dap'.step_over) @@ -280,4 +281,15 @@ vim.keymap.set('n', 'db', require 'dap'.toggle_breakpoint) vim.keymap.set('n', 'dB', function() require 'dap'.set_breakpoint(vim.fn.input('Breakpoint condition: ')) end) +local dapui = require('dapui') +dap.listeners.after.event_initialized["dapui_config"]=function() + dapui.open() +end +dap.listeners.before.event_terminated["dapui_config"]=function() + dapui.close() +end +dap.listeners.before.event_exited["dapui_config"]=function() + dapui.close() +end +-- nvim-dap-go require('dap-go').setup() diff --git a/pack/general/start/nvim-dap-ui b/pack/general/start/nvim-dap-ui new file mode 160000 index 0000000..bdb94e3 --- /dev/null +++ b/pack/general/start/nvim-dap-ui @@ -0,0 +1 @@ +Subproject commit bdb94e3853d11b5ce98ec182e5a3719d5c0ef6fd