From 13b8601d800e24645bf9abe31a912eb401c4fb6f Mon Sep 17 00:00:00 2001 From: aliaksandrkotau Date: Sun, 24 Dec 2023 19:12:11 +0100 Subject: [PATCH] debugger for python --- lua/custom/plugins/dap.lua | 20 ++++++++++++++++++++ lua/custom/plugins/dapui.lua | 24 ++++++++++++------------ 2 files changed, 32 insertions(+), 12 deletions(-) diff --git a/lua/custom/plugins/dap.lua b/lua/custom/plugins/dap.lua index 9cfaee2e..828c71b3 100644 --- a/lua/custom/plugins/dap.lua +++ b/lua/custom/plugins/dap.lua @@ -1,3 +1,23 @@ +-- vim.api.nvim_create_autocmd("ColorScheme", { +-- pattern = "*", +-- group = "UserDefLoadOnce", +-- desc = "prevent colorscheme clears self-defined DAP icon colors.", +-- callback = function() +-- vim.api.nvim_set_hl(0, 'DapBreakpoint', { ctermbg = 0, fg = '#993939' }) +-- vim.api.nvim_set_hl(0, 'DapLogPoint', { ctermbg = 0, fg = '#61afef' }) +-- vim.api.nvim_set_hl(0, 'DapStopped', { ctermbg = 0, fg = '#98c379' }) +-- end +-- }) + +vim.fn.sign_define('DapBreakpoint', { text='🔴', texthl='DapBreakpoint' }) +vim.fn.sign_define('DapBreakpointCondition', { text='🟨', texthl='DapBreakpoint' }) +vim.fn.sign_define('DapBreakpointRejected', { text='🟥', texthl='DapBreakpoint' }) +vim.fn.sign_define('DapLogPoint', { text='🪵', texthl='DapLogPoint' }) + +vim.cmd('highlight MyRedBackground ctermbg=black guibg=black') +vim.fn.sign_define('DapStopped', { text='▶️', texthl='', linehl='MyRedBackground', numhl='' }) + + return { 'mfussenegger/nvim-dap-python', dependencies = { diff --git a/lua/custom/plugins/dapui.lua b/lua/custom/plugins/dapui.lua index 86c5cf2c..fdae24d2 100644 --- a/lua/custom/plugins/dapui.lua +++ b/lua/custom/plugins/dapui.lua @@ -37,6 +37,14 @@ return { layouts = { { elements = { + { + id = "stacks", + size = 0.1 + }, + { + id = "breakpoints", + size = 0.1 + }, { id = "console", size = 0.5 @@ -47,26 +55,18 @@ return { }, { elements = { - { - id = "repl", - size = 0.2 - }, { id = "scopes", size = 0.2 }, - { - id = "breakpoints", - size = 0.2 - }, - { - id = "stacks", - size = 0.2 - }, { id = "watches", size = 0.2 }, + { + id = "repl", + size = 0.2 + }, }, position = "right", size = 40