debug
This commit is contained in:
parent
478f0b20a0
commit
989cbecead
|
@ -5,7 +5,7 @@ local M = {}
|
|||
local highlights = require "custom.highlights"
|
||||
|
||||
M.ui = {
|
||||
theme = "kanagawa",
|
||||
theme = "chadracula",
|
||||
theme_toggle = { "kanagawa", "chadracula" },
|
||||
|
||||
hl_override = highlights.override,
|
||||
|
|
|
@ -67,7 +67,7 @@ opt.foldlevel = 10 -- start with all folds open
|
|||
-- Editor UI
|
||||
-- ===
|
||||
|
||||
vim.o.guifont = "FiraCode Nerd Font:h27"
|
||||
vim.o.guifont = "FiraCode Nerd Font:h22"
|
||||
opt.termguicolors = true
|
||||
opt.shortmess = "xsTOInfFitloCaAs"
|
||||
opt.showmode = true -- Show mode in cmd window
|
||||
|
|
|
@ -226,89 +226,89 @@ M.toggleterm = {
|
|||
plugin = true,
|
||||
n = {
|
||||
["<F12>"] = {
|
||||
"<cmd>exe v:count1 \"ToggleTerm direction=float\"<cr>",
|
||||
'<cmd>exe v:count1 "ToggleTerm direction=float"<cr>',
|
||||
"toggle terminal",
|
||||
},
|
||||
["<A-i>"] = {
|
||||
"<cmd>exe v:count1 \"ToggleTerm direction=float\"<cr>",
|
||||
'<cmd>exe v:count1 "ToggleTerm direction=float"<cr>',
|
||||
"toggle terminal",
|
||||
},
|
||||
["<A-t>"] = {
|
||||
"<cmd>exe v:count1 \"ToggleTerm direction=tab\"<cr>",
|
||||
'<cmd>exe v:count1 "ToggleTerm direction=tab"<cr>',
|
||||
"toggle terminal",
|
||||
},
|
||||
["<A-h>"] = {
|
||||
"<cmd>exe v:count1 \"ToggleTerm direction=horizontal\"<cr>",
|
||||
'<cmd>exe v:count1 "ToggleTerm direction=horizontal"<cr>',
|
||||
"toggle terminal",
|
||||
},
|
||||
["<A-v>"] = {
|
||||
"<cmd>exe v:count1 \"ToggleTerm direction=vertical\"<cr>",
|
||||
'<cmd>exe v:count1 "ToggleTerm direction=vertical"<cr>',
|
||||
"toggle terminal",
|
||||
},
|
||||
},
|
||||
i = {
|
||||
["<F12>"] = {
|
||||
"<cmd>exe v:count1 \"ToggleTerm direction=float\"<cr>",
|
||||
'<cmd>exe v:count1 "ToggleTerm direction=float"<cr>',
|
||||
"toggle terminal",
|
||||
},
|
||||
["<A-i>"] = {
|
||||
"<cmd>exe v:count1 \"ToggleTerm direction=float\"<cr>",
|
||||
'<cmd>exe v:count1 "ToggleTerm direction=float"<cr>',
|
||||
"toggle terminal",
|
||||
},
|
||||
["<A-t>"] = {
|
||||
"<cmd>exe v:count1 \"ToggleTerm direction=tab\"<cr>",
|
||||
'<cmd>exe v:count1 "ToggleTerm direction=tab"<cr>',
|
||||
"toggle terminal",
|
||||
},
|
||||
["<A-h>"] = {
|
||||
"<cmd>exe v:count1 \"ToggleTerm direction=horizontal\"<cr>",
|
||||
'<cmd>exe v:count1 "ToggleTerm direction=horizontal"<cr>',
|
||||
"toggle terminal",
|
||||
},
|
||||
["<A-v>"] = {
|
||||
"<cmd>exe v:count1 \"ToggleTerm direction=vertical\"<cr>",
|
||||
'<cmd>exe v:count1 "ToggleTerm direction=vertical"<cr>',
|
||||
"toggle terminal",
|
||||
},
|
||||
},
|
||||
t = {
|
||||
["<F12>"] = {
|
||||
"<cmd>exe v:count1 \"ToggleTerm direction=float\"<cr>",
|
||||
'<cmd>exe v:count1 "ToggleTerm direction=float"<cr>',
|
||||
"toggle terminal",
|
||||
},
|
||||
["<A-i>"] = {
|
||||
"<cmd>exe v:count1 \"ToggleTerm direction=float\"<cr>",
|
||||
'<cmd>exe v:count1 "ToggleTerm direction=float"<cr>',
|
||||
"toggle terminal",
|
||||
},
|
||||
["<A-t>"] = {
|
||||
"<cmd>exe v:count1 \"ToggleTerm direction=tab\"<cr>",
|
||||
'<cmd>exe v:count1 "ToggleTerm direction=tab"<cr>',
|
||||
"toggle terminal",
|
||||
},
|
||||
["<A-h>"] = {
|
||||
"<cmd>exe v:count1 \"ToggleTerm direction=horizontal\"<cr>",
|
||||
'<cmd>exe v:count1 "ToggleTerm direction=horizontal"<cr>',
|
||||
"toggle terminal",
|
||||
},
|
||||
["<A-v>"] = {
|
||||
"<cmd>exe v:count1 \"ToggleTerm direction=vertical\"<cr>",
|
||||
'<cmd>exe v:count1 "ToggleTerm direction=vertical"<cr>',
|
||||
"toggle terminal",
|
||||
},
|
||||
},
|
||||
x = {
|
||||
["<F12>"] = {
|
||||
"<cmd>exe v:count1 \"ToggleTerm direction=float\"<cr>",
|
||||
'<cmd>exe v:count1 "ToggleTerm direction=float"<cr>',
|
||||
"toggle terminal",
|
||||
},
|
||||
["<A-i>"] = {
|
||||
"<cmd>exe v:count1 \"ToggleTerm direction=float\"<cr>",
|
||||
'<cmd>exe v:count1 "ToggleTerm direction=float"<cr>',
|
||||
"toggle terminal",
|
||||
},
|
||||
["<A-t>"] = {
|
||||
"<cmd>exe v:count1 \"ToggleTerm direction=tab\"<cr>",
|
||||
'<cmd>exe v:count1 "ToggleTerm direction=tab"<cr>',
|
||||
"toggle terminal",
|
||||
},
|
||||
["<A-h>"] = {
|
||||
"<cmd>exe v:count1 \"ToggleTerm direction=horizontal\"<cr>",
|
||||
'<cmd>exe v:count1 "ToggleTerm direction=horizontal"<cr>',
|
||||
"toggle terminal",
|
||||
},
|
||||
["<A-v>"] = {
|
||||
"<cmd>exe v:count1 \"ToggleTerm direction=vertical\"<cr>",
|
||||
'<cmd>exe v:count1 "ToggleTerm direction=vertical"<cr>',
|
||||
"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
|
||||
|
|
|
@ -716,6 +716,26 @@ local plugins = {
|
|||
require("icon-picker").setup { disable_legacy_commands = true }
|
||||
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
|
||||
|
|
Loading…
Reference in New Issue