diff options
| author | srdusr <trevorgray@srdusr.com> | 2025-09-24 04:19:28 +0200 |
|---|---|---|
| committer | srdusr <trevorgray@srdusr.com> | 2025-09-24 04:19:28 +0200 |
| commit | e95332b121672abaf9fd02692d81869b1e46c02d (patch) | |
| tree | 9dc0def690d7941b18783733045ba091112e9452 /common/config/nvim/lua/plugins/dap.lua | |
| parent | 0f6cee92221dc517bd756083e260dd9373851b82 (diff) | |
| parent | 7ed2303648bf83bb081d9bd863660ebf2344ce47 (diff) | |
| download | dotfiles-e95332b121672abaf9fd02692d81869b1e46c02d.tar.gz dotfiles-e95332b121672abaf9fd02692d81869b1e46c02d.zip | |
Merge commit '7ed2303648bf83bb081d9bd863660ebf2344ce47'
Diffstat (limited to 'common/config/nvim/lua/plugins/dap.lua')
| -rwxr-xr-x[-rw-r--r--] | common/config/nvim/lua/plugins/dap.lua | 46 |
1 files changed, 29 insertions, 17 deletions
diff --git a/common/config/nvim/lua/plugins/dap.lua b/common/config/nvim/lua/plugins/dap.lua index 98ae3fd..7de032c 100644..100755 --- a/common/config/nvim/lua/plugins/dap.lua +++ b/common/config/nvim/lua/plugins/dap.lua @@ -1,4 +1,10 @@ -local dap = require("dap") +local M = {} + +function M.setup() + local ok, dap = pcall(require, "dap") + if not ok or not dap then + return false + end -- options dap.defaults.fallback.switchbuf = "uselast" @@ -155,11 +161,12 @@ local dapui = require("dapui") --}) -- Load dapui configuration only if it hasn't been loaded before -if not vim.g.loaded_dapui then - require("dapui").setup({ - mappings = { - expand = "<CR>", - open = "o", + local dapui_ok, dapui = pcall(require, "dapui") + if dapui_ok and dapui then + dapui.setup({ + mappings = { + expand = "<CR>", + open = "o", remove = "D", edit = "e", repl = "r", @@ -240,14 +247,19 @@ end require("nvim-dap-virtual-text").setup({ enabled = true, enabled_commands = true, - highlight_changed_variables = true, - highlight_new_as_changed = false, - show_stop_reason = true, - commented = true, - only_first_definition = true, - all_references = false, - filter_references_pattern = "<module", - virt_text_pos = "eol", - all_frames = false, - virt_text_win_col = nil, -}) + highlight_changed_variables = true, + highlight_new_as_changed = false, + show_stop_reason = true, + commented = true, + only_first_definition = true, + all_references = false, + filter_references_pattern = "<module", + virt_text_pos = "eol", + all_frames = false, + virt_text_win_col = nil, + }) + + return true +end + +return M |
