mirror of
https://github.com/pojokcodeid/nvim-lazy.git
synced 2025-06-27 19:28:52 +02:00
DAP Not Support
This commit is contained in:
parent
b691155539
commit
4fbc9cf758
4 changed files with 25 additions and 8 deletions
|
@ -6,12 +6,14 @@ return {
|
|||
event = "BufWinEnter",
|
||||
module = "plenary",
|
||||
},
|
||||
-- color scheme
|
||||
{
|
||||
"folke/tokyonight.nvim",
|
||||
commit = "66bfc2e8f754869c7b651f3f47a2ee56ae557764",
|
||||
lazy = false, -- make sure we load this during startup if it is your main colorscheme
|
||||
priority = 1000, -- make sure to load this before all the other start plugins
|
||||
},
|
||||
-- dashboard
|
||||
{
|
||||
"goolord/alpha-nvim",
|
||||
commit = "0bb6fc0646bcd1cdb4639737a1cee8d6e08bcc31",
|
||||
|
@ -369,10 +371,12 @@ return {
|
|||
-- debuging
|
||||
{
|
||||
"mfussenegger/nvim-dap",
|
||||
enabled = vim.fn.has("win32") == 0,
|
||||
},
|
||||
{
|
||||
"rcarriga/nvim-dap-ui",
|
||||
dependencies = "mfussenegger/nvim-dap",
|
||||
enabled = vim.fn.has("win32") == 0,
|
||||
init = function()
|
||||
require("user.dapui")
|
||||
end,
|
||||
|
@ -380,6 +384,7 @@ return {
|
|||
{
|
||||
"jayp0521/mason-nvim-dap.nvim",
|
||||
dependencies = { "williamboman/mason.nvim", "mfussenegger/nvim-dap" },
|
||||
enabled = vim.fn.has("win32") == 0,
|
||||
init = function()
|
||||
require("user.mason_dap")
|
||||
end,
|
||||
|
|
|
@ -1,4 +1,7 @@
|
|||
local dap, dapui = require("dap"), require("dapui")
|
||||
local status_ok, dap, dapui = require("dap"), require("dapui")
|
||||
if not status_ok then
|
||||
return
|
||||
end
|
||||
dap.listeners.after.event_initialized["dapui_config"] = function()
|
||||
dapui.open()
|
||||
end
|
||||
|
|
|
@ -91,7 +91,7 @@ local trn = ""
|
|||
if vim.fn.has("win32") then
|
||||
trn = "pwsh<cr>"
|
||||
end
|
||||
|
||||
local is_dap = pcall(require, "nvim-dap")
|
||||
local mappings2 = {
|
||||
["/"] = { "<esc><cmd>lua require('Comment.api').toggle.linewise(vim.fn.visualmode())<cr>", "Commet Block" },
|
||||
}
|
||||
|
@ -230,19 +230,31 @@ local mappings = {
|
|||
name = "Debug",
|
||||
b = {
|
||||
function()
|
||||
require("dap").toggle_breakpoint()
|
||||
if is_dap then
|
||||
require("dap").toggle_breakpoint()
|
||||
else
|
||||
vim.notify("DAP Not Support", "error")
|
||||
end
|
||||
end,
|
||||
"Toggle Breakpoint",
|
||||
},
|
||||
B = {
|
||||
function()
|
||||
require("dap").clear_breakpoints()
|
||||
if is_dap then
|
||||
require("dap").clear_breakpoints()
|
||||
else
|
||||
vim.notify("DAP Not Support", "error")
|
||||
end
|
||||
end,
|
||||
"Clear Breakpoints",
|
||||
},
|
||||
c = {
|
||||
function()
|
||||
require("dap").continue()
|
||||
if is_dap then
|
||||
require("dap").continue()
|
||||
else
|
||||
vim.notify("DAP Not Support", "error")
|
||||
end
|
||||
end,
|
||||
"Start/Continue",
|
||||
},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue