enc: auto install cpp dap

This commit is contained in:
asep.komarudin 2024-06-22 20:51:09 +07:00
parent a7933afc34
commit d352202bcf
3 changed files with 16 additions and 16 deletions

View file

@ -78,7 +78,6 @@ pcode.null_ls_ensure_installed = {
-- atau gunakan :MasonInstall -- atau gunakan :MasonInstall
pcode.dap_ensure_installed = { pcode.dap_ensure_installed = {
-- "python", -- "python",
"codelldb",
} }
-- https://github.com/folke/which-key.nvim -- https://github.com/folke/which-key.nvim

View file

@ -3,21 +3,21 @@ local M = {}
-- local file_name_no_ext = vim.fn.expand("%:t:r") -- local file_name_no_ext = vim.fn.expand("%:t:r")
if pcode.active_cpp_config then if pcode.active_cpp_config then
M = { M = {
{ -- {
"jay-babu/mason-nvim-dap.nvim", -- "jay-babu/mason-nvim-dap.nvim",
dependencies = { -- dependencies = {
"mfussenegger/nvim-dap", -- "mfussenegger/nvim-dap",
}, -- },
ft = "cpp", -- ft = "cpp",
config = function() -- config = function()
require("mason-nvim-dap").setup({ -- require("mason-nvim-dap").setup({
automatic_installation = true, -- automatic_installation = true,
automatic_setup = true, -- automatic_setup = true,
handlers = {}, -- handlers = {},
ensure_installed = { "codelldb" }, -- ensure_installed = { "codelldb" },
}) -- })
end, -- end,
}, -- },
{ {
"nvim-neotest/neotest", "nvim-neotest/neotest",
event = "VeryLazy", event = "VeryLazy",

View file

@ -79,6 +79,7 @@ if pcode.active_cpp_config then
table.insert(pcode.treesitter_ensure_installed, "cpp") table.insert(pcode.treesitter_ensure_installed, "cpp")
table.insert(pcode.mason_ensure_installed, "clangd") table.insert(pcode.mason_ensure_installed, "clangd")
table.insert(pcode.null_ls_ensure_installed, "clang_format") table.insert(pcode.null_ls_ensure_installed, "clang_format")
table.insert(pcode.dap_ensure_installed, "codelldb")
pcode.nvim_dap = true pcode.nvim_dap = true
end end
return {} return {}