add mograte from dev

This commit is contained in:
asep.komarudin 2024-06-29 08:56:13 +07:00
parent f5f74f80e0
commit d2749f48eb
12 changed files with 440 additions and 120 deletions

View file

@ -1,5 +1,5 @@
local M = {}
if vim.fn.has("win32") == 0 and pcode.nvim_dap then
if pcode.nvim_dap or pcode.active_cpp_config then
M = {
{
"rcarriga/nvim-dap-ui",
@ -15,7 +15,7 @@ if vim.fn.has("win32") == 0 and pcode.nvim_dap then
},
},
},
enabled = vim.fn.has("win32") == 0,
-- enabled = vim.fn.has("win32") == 0,
config = function()
require("user.dapui")
end,
@ -42,9 +42,25 @@ if vim.fn.has("win32") == 0 and pcode.nvim_dap then
lazy = true,
event = "BufRead",
dependencies = { "williamboman/mason.nvim", "mfussenegger/nvim-dap" },
enabled = vim.fn.has("win32") == 0,
config = function()
require("user.mason_dap")
opts = function(_, opts)
local dap_data = pcode.dap_ensure_installed or {}
opts.ensure_installed = opts.ensure_installed or {}
vim.list_extend(opts.ensure_installed, dap_data)
opts.automatic_setup = true
opts.handlers = {
function(config)
-- all sources with no handler get passed here
-- Keep original functionality
require("mason-nvim-dap").default_setup(config)
end,
}
return opts
end,
-- enabled = vim.fn.has("win32") == 0,
config = function(_, opts)
require("mason").setup()
require("mason-nvim-dap").setup(opts)
end,
},
}