debug
This commit is contained in:
parent
478f0b20a0
commit
989cbecead
|
@ -5,7 +5,7 @@ local M = {}
|
||||||
local highlights = require "custom.highlights"
|
local highlights = require "custom.highlights"
|
||||||
|
|
||||||
M.ui = {
|
M.ui = {
|
||||||
theme = "kanagawa",
|
theme = "chadracula",
|
||||||
theme_toggle = { "kanagawa", "chadracula" },
|
theme_toggle = { "kanagawa", "chadracula" },
|
||||||
|
|
||||||
hl_override = highlights.override,
|
hl_override = highlights.override,
|
||||||
|
|
|
@ -67,7 +67,7 @@ opt.foldlevel = 10 -- start with all folds open
|
||||||
-- Editor UI
|
-- Editor UI
|
||||||
-- ===
|
-- ===
|
||||||
|
|
||||||
vim.o.guifont = "FiraCode Nerd Font:h27"
|
vim.o.guifont = "FiraCode Nerd Font:h22"
|
||||||
opt.termguicolors = true
|
opt.termguicolors = true
|
||||||
opt.shortmess = "xsTOInfFitloCaAs"
|
opt.shortmess = "xsTOInfFitloCaAs"
|
||||||
opt.showmode = true -- Show mode in cmd window
|
opt.showmode = true -- Show mode in cmd window
|
||||||
|
|
|
@ -226,89 +226,89 @@ M.toggleterm = {
|
||||||
plugin = true,
|
plugin = true,
|
||||||
n = {
|
n = {
|
||||||
["<F12>"] = {
|
["<F12>"] = {
|
||||||
"<cmd>exe v:count1 \"ToggleTerm direction=float\"<cr>",
|
'<cmd>exe v:count1 "ToggleTerm direction=float"<cr>',
|
||||||
"toggle terminal",
|
"toggle terminal",
|
||||||
},
|
},
|
||||||
["<A-i>"] = {
|
["<A-i>"] = {
|
||||||
"<cmd>exe v:count1 \"ToggleTerm direction=float\"<cr>",
|
'<cmd>exe v:count1 "ToggleTerm direction=float"<cr>',
|
||||||
"toggle terminal",
|
"toggle terminal",
|
||||||
},
|
},
|
||||||
["<A-t>"] = {
|
["<A-t>"] = {
|
||||||
"<cmd>exe v:count1 \"ToggleTerm direction=tab\"<cr>",
|
'<cmd>exe v:count1 "ToggleTerm direction=tab"<cr>',
|
||||||
"toggle terminal",
|
"toggle terminal",
|
||||||
},
|
},
|
||||||
["<A-h>"] = {
|
["<A-h>"] = {
|
||||||
"<cmd>exe v:count1 \"ToggleTerm direction=horizontal\"<cr>",
|
'<cmd>exe v:count1 "ToggleTerm direction=horizontal"<cr>',
|
||||||
"toggle terminal",
|
"toggle terminal",
|
||||||
},
|
},
|
||||||
["<A-v>"] = {
|
["<A-v>"] = {
|
||||||
"<cmd>exe v:count1 \"ToggleTerm direction=vertical\"<cr>",
|
'<cmd>exe v:count1 "ToggleTerm direction=vertical"<cr>',
|
||||||
"toggle terminal",
|
"toggle terminal",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
i = {
|
i = {
|
||||||
["<F12>"] = {
|
["<F12>"] = {
|
||||||
"<cmd>exe v:count1 \"ToggleTerm direction=float\"<cr>",
|
'<cmd>exe v:count1 "ToggleTerm direction=float"<cr>',
|
||||||
"toggle terminal",
|
"toggle terminal",
|
||||||
},
|
},
|
||||||
["<A-i>"] = {
|
["<A-i>"] = {
|
||||||
"<cmd>exe v:count1 \"ToggleTerm direction=float\"<cr>",
|
'<cmd>exe v:count1 "ToggleTerm direction=float"<cr>',
|
||||||
"toggle terminal",
|
"toggle terminal",
|
||||||
},
|
},
|
||||||
["<A-t>"] = {
|
["<A-t>"] = {
|
||||||
"<cmd>exe v:count1 \"ToggleTerm direction=tab\"<cr>",
|
'<cmd>exe v:count1 "ToggleTerm direction=tab"<cr>',
|
||||||
"toggle terminal",
|
"toggle terminal",
|
||||||
},
|
},
|
||||||
["<A-h>"] = {
|
["<A-h>"] = {
|
||||||
"<cmd>exe v:count1 \"ToggleTerm direction=horizontal\"<cr>",
|
'<cmd>exe v:count1 "ToggleTerm direction=horizontal"<cr>',
|
||||||
"toggle terminal",
|
"toggle terminal",
|
||||||
},
|
},
|
||||||
["<A-v>"] = {
|
["<A-v>"] = {
|
||||||
"<cmd>exe v:count1 \"ToggleTerm direction=vertical\"<cr>",
|
'<cmd>exe v:count1 "ToggleTerm direction=vertical"<cr>',
|
||||||
"toggle terminal",
|
"toggle terminal",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
t = {
|
t = {
|
||||||
["<F12>"] = {
|
["<F12>"] = {
|
||||||
"<cmd>exe v:count1 \"ToggleTerm direction=float\"<cr>",
|
'<cmd>exe v:count1 "ToggleTerm direction=float"<cr>',
|
||||||
"toggle terminal",
|
"toggle terminal",
|
||||||
},
|
},
|
||||||
["<A-i>"] = {
|
["<A-i>"] = {
|
||||||
"<cmd>exe v:count1 \"ToggleTerm direction=float\"<cr>",
|
'<cmd>exe v:count1 "ToggleTerm direction=float"<cr>',
|
||||||
"toggle terminal",
|
"toggle terminal",
|
||||||
},
|
},
|
||||||
["<A-t>"] = {
|
["<A-t>"] = {
|
||||||
"<cmd>exe v:count1 \"ToggleTerm direction=tab\"<cr>",
|
'<cmd>exe v:count1 "ToggleTerm direction=tab"<cr>',
|
||||||
"toggle terminal",
|
"toggle terminal",
|
||||||
},
|
},
|
||||||
["<A-h>"] = {
|
["<A-h>"] = {
|
||||||
"<cmd>exe v:count1 \"ToggleTerm direction=horizontal\"<cr>",
|
'<cmd>exe v:count1 "ToggleTerm direction=horizontal"<cr>',
|
||||||
"toggle terminal",
|
"toggle terminal",
|
||||||
},
|
},
|
||||||
["<A-v>"] = {
|
["<A-v>"] = {
|
||||||
"<cmd>exe v:count1 \"ToggleTerm direction=vertical\"<cr>",
|
'<cmd>exe v:count1 "ToggleTerm direction=vertical"<cr>',
|
||||||
"toggle terminal",
|
"toggle terminal",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
x = {
|
x = {
|
||||||
["<F12>"] = {
|
["<F12>"] = {
|
||||||
"<cmd>exe v:count1 \"ToggleTerm direction=float\"<cr>",
|
'<cmd>exe v:count1 "ToggleTerm direction=float"<cr>',
|
||||||
"toggle terminal",
|
"toggle terminal",
|
||||||
},
|
},
|
||||||
["<A-i>"] = {
|
["<A-i>"] = {
|
||||||
"<cmd>exe v:count1 \"ToggleTerm direction=float\"<cr>",
|
'<cmd>exe v:count1 "ToggleTerm direction=float"<cr>',
|
||||||
"toggle terminal",
|
"toggle terminal",
|
||||||
},
|
},
|
||||||
["<A-t>"] = {
|
["<A-t>"] = {
|
||||||
"<cmd>exe v:count1 \"ToggleTerm direction=tab\"<cr>",
|
'<cmd>exe v:count1 "ToggleTerm direction=tab"<cr>',
|
||||||
"toggle terminal",
|
"toggle terminal",
|
||||||
},
|
},
|
||||||
["<A-h>"] = {
|
["<A-h>"] = {
|
||||||
"<cmd>exe v:count1 \"ToggleTerm direction=horizontal\"<cr>",
|
'<cmd>exe v:count1 "ToggleTerm direction=horizontal"<cr>',
|
||||||
"toggle terminal",
|
"toggle terminal",
|
||||||
},
|
},
|
||||||
["<A-v>"] = {
|
["<A-v>"] = {
|
||||||
"<cmd>exe v:count1 \"ToggleTerm direction=vertical\"<cr>",
|
'<cmd>exe v:count1 "ToggleTerm direction=vertical"<cr>',
|
||||||
"toggle terminal",
|
"toggle terminal",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
@ -545,4 +545,45 @@ M.goto_preview = {
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
M.debug = {
|
||||||
|
plugin = true,
|
||||||
|
n = {
|
||||||
|
["<leader>db"] = {
|
||||||
|
function()
|
||||||
|
require("dap").toggle_breakpoint()
|
||||||
|
end,
|
||||||
|
"toggle breakpoint",
|
||||||
|
noremap = true,
|
||||||
|
},
|
||||||
|
["<leader>dc"] = {
|
||||||
|
function()
|
||||||
|
require("dap").continue()
|
||||||
|
end,
|
||||||
|
"debug continue",
|
||||||
|
noremap = true,
|
||||||
|
},
|
||||||
|
["<leader>ds"] = {
|
||||||
|
function()
|
||||||
|
require("dap").step_over()
|
||||||
|
end,
|
||||||
|
"debug step over",
|
||||||
|
noremap = true,
|
||||||
|
},
|
||||||
|
["<leader>di"] = {
|
||||||
|
function()
|
||||||
|
require("dap").step_into()
|
||||||
|
end,
|
||||||
|
"debug step into",
|
||||||
|
noremap = true,
|
||||||
|
},
|
||||||
|
["<leader>dr"] = {
|
||||||
|
function()
|
||||||
|
require("dap").repl.open()
|
||||||
|
end,
|
||||||
|
"debug open repl",
|
||||||
|
noremap = true,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
return M
|
return M
|
||||||
|
|
|
@ -716,6 +716,26 @@ local plugins = {
|
||||||
require("icon-picker").setup { disable_legacy_commands = true }
|
require("icon-picker").setup { disable_legacy_commands = true }
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"mfussenegger/nvim-dap",
|
||||||
|
init = function()
|
||||||
|
require("core.utils").load_mappings "debug"
|
||||||
|
end,
|
||||||
|
config = function()
|
||||||
|
local dap = require "dap"
|
||||||
|
dap.configurations.c = {
|
||||||
|
{
|
||||||
|
name = "Launch",
|
||||||
|
type = "gdb",
|
||||||
|
request = "launch",
|
||||||
|
program = function()
|
||||||
|
return vim.fn.input("Path to executable: ", vim.fn.getcwd() .. "/", "file")
|
||||||
|
end,
|
||||||
|
cwd = "${workspaceFolder}",
|
||||||
|
},
|
||||||
|
}
|
||||||
|
end,
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
return plugins
|
return plugins
|
||||||
|
|
Loading…
Reference in New Issue