From ad25404f6f06f143b13daae009e2dbc92ae1cc83 Mon Sep 17 00:00:00 2001 From: Igor Date: Wed, 6 Dec 2023 20:33:49 -0300 Subject: [PATCH] refactor(dap)!: split dap and dap_ui This Pull Request makes 3 changes to the nvim-dap integration: 1. Splits the dap and dap_ui integrations. Rationale: there's no need for both plugins to share a integration. In fact, that's the only integration that contains multiple plugins. 2. Adds a missing highlight group to the nvim-dap integration 3. Removes a misguided comment about enabling the nvim-dap integration --- README.md | 24 ++++++++---- lua/catppuccin/groups/integrations/dap.lua | 33 +---------------- lua/catppuccin/groups/integrations/dap_ui.lua | 37 +++++++++++++++++++ 3 files changed, 54 insertions(+), 40 deletions(-) create mode 100644 lua/catppuccin/groups/integrations/dap_ui.lua diff --git a/README.md b/README.md index 8bb95167..729ef568 100644 --- a/README.md +++ b/README.md @@ -938,22 +938,16 @@ cmp = true - nvim-dap & nvim-dap-ui + nvim-dap ```lua -dap = { - enabled = true, - enable_ui = true, -- enable nvim-dap-ui -} +dap = true ```
Special ```lua --- You NEED to override nvim-dap's default highlight groups, AFTER requiring nvim-dap -require("dap") - local sign = vim.fn.sign_define sign("DapBreakpoint", { text = "●", texthl = "DapBreakpoint", linehl = "", numhl = ""}) @@ -967,6 +961,20 @@ sign("DapLogPoint", { text = "◆", texthl = "DapLogPoint", linehl = "", numhl = + + + + nvim-dap-ui + + +```lua +dap_ui = true, +``` + + + + + diff --git a/lua/catppuccin/groups/integrations/dap.lua b/lua/catppuccin/groups/integrations/dap.lua index cd3bc9ba..94c5f297 100644 --- a/lua/catppuccin/groups/integrations/dap.lua +++ b/lua/catppuccin/groups/integrations/dap.lua @@ -2,42 +2,11 @@ local M = {} function M.get() return { - -- nvim-dap DapBreakpoint = { fg = C.red }, DapBreakpointCondition = { fg = C.yellow }, + DapBreakpointRejected = { fg = C.mauve }, DapLogPoint = { fg = C.sky }, DapStopped = { fg = C.maroon }, - - -- nvim-dap-ui - DAPUIScope = { fg = C.sky }, - DAPUIType = { fg = C.mauve }, - DAPUIValue = { fg = C.sky }, - DAPUIVariable = { fg = C.text }, - DapUIModifiedValue = { fg = C.peach }, - DapUIDecoration = { fg = C.sky }, - DapUIThread = { fg = C.green }, - DapUIStoppedThread = { fg = C.sky }, - DapUISource = { fg = C.lavender }, - DapUILineNumber = { fg = C.sky }, - DapUIFloatBorder = { fg = C.sky }, - - DapUIWatchesEmpty = { fg = C.maroon }, - DapUIWatchesValue = { fg = C.green }, - DapUIWatchesError = { fg = C.maroon }, - - DapUIBreakpointsPath = { fg = C.sky }, - DapUIBreakpointsInfo = { fg = C.green }, - DapUIBreakpointsCurrentLine = { fg = C.green, style = { "bold" } }, - DapUIBreakpointsDisabledLine = { fg = C.surface2 }, - - DapUIStepOver = { fg = C.blue }, - DapUIStepInto = { fg = C.blue }, - DapUIStepBack = { fg = C.blue }, - DapUIStepOut = { fg = C.blue }, - DapUIStop = { fg = C.red }, - DapUIPlayPause = { fg = C.green }, - DapUIRestart = { fg = C.green }, - DapUIUnavailable = { fg = C.surface1 }, } end diff --git a/lua/catppuccin/groups/integrations/dap_ui.lua b/lua/catppuccin/groups/integrations/dap_ui.lua new file mode 100644 index 00000000..55e45c9a --- /dev/null +++ b/lua/catppuccin/groups/integrations/dap_ui.lua @@ -0,0 +1,37 @@ +local M = {} + +function M.get() + return { + DAPUIScope = { fg = C.sky }, + DAPUIType = { fg = C.mauve }, + DAPUIValue = { fg = C.sky }, + DAPUIVariable = { fg = C.text }, + DapUIModifiedValue = { fg = C.peach }, + DapUIDecoration = { fg = C.sky }, + DapUIThread = { fg = C.green }, + DapUIStoppedThread = { fg = C.sky }, + DapUISource = { fg = C.lavender }, + DapUILineNumber = { fg = C.sky }, + DapUIFloatBorder = { fg = C.sky }, + + DapUIWatchesEmpty = { fg = C.maroon }, + DapUIWatchesValue = { fg = C.green }, + DapUIWatchesError = { fg = C.maroon }, + + DapUIBreakpointsPath = { fg = C.sky }, + DapUIBreakpointsInfo = { fg = C.green }, + DapUIBreakpointsCurrentLine = { fg = C.green, style = { "bold" } }, + DapUIBreakpointsDisabledLine = { fg = C.surface2 }, + + DapUIStepOver = { fg = C.blue }, + DapUIStepInto = { fg = C.blue }, + DapUIStepBack = { fg = C.blue }, + DapUIStepOut = { fg = C.blue }, + DapUIStop = { fg = C.red }, + DapUIPlayPause = { fg = C.green }, + DapUIRestart = { fg = C.green }, + DapUIUnavailable = { fg = C.surface1 }, + } +end + +return M