commit
This commit is contained in:
parent
d69725c9b2
commit
64e2ce7eff
@ -1,4 +1,5 @@
|
|||||||
local map = vim.keymap.set
|
local map = vim.keymap.set
|
||||||
|
local dap = require("dap")
|
||||||
|
|
||||||
map("n", "<C-left>", "<C-o>", { desc = "LSP Back" })
|
map("n", "<C-left>", "<C-o>", { desc = "LSP Back" })
|
||||||
map("n", "<C-right>", "<C-i>", { desc = "LSP Forward" })
|
map("n", "<C-right>", "<C-i>", { desc = "LSP Forward" })
|
||||||
@ -15,6 +16,9 @@ map("n", "<leader>r", ":Telescope lsp_references<CR>", { desc = "telescope lsp r
|
|||||||
map("n", "<tab>", ":BufferNext<CR>", { desc = "Next tab" })
|
map("n", "<tab>", ":BufferNext<CR>", { desc = "Next tab" })
|
||||||
map("n", "<S-tab>", ":BufferPrevious<CR>", { desc = "Previous tab" })
|
map("n", "<S-tab>", ":BufferPrevious<CR>", { desc = "Previous tab" })
|
||||||
|
|
||||||
|
-- dap
|
||||||
|
map("n", "<leader>bb", dap.toggle_breakpoint, { desc = "Toggle breakpoint" })
|
||||||
|
|
||||||
-- menu
|
-- menu
|
||||||
local menu = require("menu")
|
local menu = require("menu")
|
||||||
|
|
||||||
|
@ -1,6 +1,20 @@
|
|||||||
local gitsigns = require("gitsigns")
|
local gitsigns = require("gitsigns")
|
||||||
|
local dap = require("dap")
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
{
|
||||||
|
name = " Toggle breakpoint",
|
||||||
|
cmd = dap.toggle_breakpoint,
|
||||||
|
rtext = "<leader>bb",
|
||||||
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
name = " Run debug",
|
||||||
|
cmd = dap.continue,
|
||||||
|
},
|
||||||
|
|
||||||
|
{ name = "separator" },
|
||||||
|
|
||||||
{
|
{
|
||||||
name = " Preview change",
|
name = " Preview change",
|
||||||
cmd = gitsigns.preview_hunk,
|
cmd = gitsigns.preview_hunk,
|
||||||
|
43
lua/plugins/dap.lua
Normal file
43
lua/plugins/dap.lua
Normal file
@ -0,0 +1,43 @@
|
|||||||
|
local fn = vim.fn
|
||||||
|
|
||||||
|
return {
|
||||||
|
"rcarriga/nvim-dap-ui",
|
||||||
|
dependencies = {
|
||||||
|
"mfussenegger/nvim-dap",
|
||||||
|
"nvim-neotest/nvim-nio",
|
||||||
|
"leoluz/nvim-dap-go",
|
||||||
|
},
|
||||||
|
config = function()
|
||||||
|
local dap, dapui = require("dap"), require("dapui")
|
||||||
|
|
||||||
|
dap.listeners.before.attach.dapui_config = function()
|
||||||
|
dapui.open()
|
||||||
|
end
|
||||||
|
dap.listeners.before.launch.dapui_config = function()
|
||||||
|
dapui.open()
|
||||||
|
end
|
||||||
|
dap.listeners.before.event_terminated.dapui_config = function()
|
||||||
|
dapui.close()
|
||||||
|
end
|
||||||
|
dap.listeners.before.event_exited.dapui_config = function()
|
||||||
|
dapui.close()
|
||||||
|
end
|
||||||
|
|
||||||
|
fn.sign_define("DapBreakpoint", { text = "", texthl = "red", linehl = "", numhl = "" })
|
||||||
|
|
||||||
|
require("dapui").setup()
|
||||||
|
require("dap-go").setup()
|
||||||
|
|
||||||
|
--require("dap-go").setup({
|
||||||
|
-- dap_configurations = {
|
||||||
|
-- {
|
||||||
|
-- type = "go",
|
||||||
|
-- name = "Debug (Build Flags)",
|
||||||
|
-- request = "launch",
|
||||||
|
-- program = "${file}",
|
||||||
|
-- buildFlags = require("dap-go").get_build_flags,
|
||||||
|
-- },
|
||||||
|
-- },
|
||||||
|
-- })
|
||||||
|
end,
|
||||||
|
}
|
10
lua/plugins/dashboard.lua
Normal file
10
lua/plugins/dashboard.lua
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
return {
|
||||||
|
"nvimdev/dashboard-nvim",
|
||||||
|
event = "VimEnter",
|
||||||
|
config = function()
|
||||||
|
require("dashboard").setup({
|
||||||
|
-- config
|
||||||
|
})
|
||||||
|
end,
|
||||||
|
dependencies = { { "nvim-tree/nvim-web-devicons" } },
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user