|
@@ -2,7 +2,7 @@ local M = {}
|
|
|
|
|
|
M.config = function()
|
|
M.config = function()
|
|
lvim.builtin.dap = {
|
|
lvim.builtin.dap = {
|
|
- active = false,
|
|
|
|
|
|
+ active = true,
|
|
on_config_done = nil,
|
|
on_config_done = nil,
|
|
breakpoint = {
|
|
breakpoint = {
|
|
text = lvim.icons.ui.Bug,
|
|
text = lvim.icons.ui.Bug,
|
|
@@ -29,7 +29,10 @@ M.config = function()
|
|
end
|
|
end
|
|
|
|
|
|
M.setup = function()
|
|
M.setup = function()
|
|
- local dap = require "dap"
|
|
|
|
|
|
+ local status_ok, dap = pcall(require, "dap")
|
|
|
|
+ if not status_ok then
|
|
|
|
+ return
|
|
|
|
+ end
|
|
|
|
|
|
if lvim.use_icons then
|
|
if lvim.use_icons then
|
|
vim.fn.sign_define("DapBreakpoint", lvim.builtin.dap.breakpoint)
|
|
vim.fn.sign_define("DapBreakpoint", lvim.builtin.dap.breakpoint)
|
|
@@ -61,7 +64,10 @@ M.setup = function()
|
|
end
|
|
end
|
|
|
|
|
|
M.setup_ui = function()
|
|
M.setup_ui = function()
|
|
- local dap = require "dap"
|
|
|
|
|
|
+ local status_ok, dap = pcall(require, "dap")
|
|
|
|
+ if not status_ok then
|
|
|
|
+ return
|
|
|
|
+ end
|
|
local dapui = require "dapui"
|
|
local dapui = require "dapui"
|
|
dapui.setup {
|
|
dapui.setup {
|
|
expand_lines = true,
|
|
expand_lines = true,
|