This commit is contained in:
dedal.qq 2025-01-18 19:48:56 +03:00
parent 720c645a8c
commit a9c266ca45
5 changed files with 67 additions and 0 deletions

View File

@ -41,6 +41,7 @@ map("n", "<S-tab>", "<Cmd>BufferPrevious<CR>", { desc = "Previous tab" })
map("n", "<leader>bb", dap.toggle_breakpoint, { desc = "Toggle breakpoint" })
map("n", "<F5>", dap.step_over, { desc = "Step over" })
map("n", "<F6>", dap.step_into, { desc = "Step into" })
map("n", "<F7>", dap.step_out, { desc = "Step out" })
map("n", "<F8>", dap.continue, { desc = "Continue" })
-- nvterm

View File

@ -30,6 +30,15 @@ return {
end,
},
{
name = " Breakpoints",
cmd = function()
-- require("dapui").float_element("breakpoints")
-- require("dap.ui.widgets").hover()
require("dapui").float_element("breakpoints")
end,
},
{ name = "separator" },
{
@ -44,6 +53,12 @@ return {
rtxt = "<F6>",
},
{
name = " Step out",
cmd = dap.step_out,
rtxt = "<F7>",
},
{
name = " Continue",
cmd = dap.continue,
@ -52,6 +67,13 @@ return {
{ name = "separator" },
{
name = " Stop",
cmd = dap.terminate,
},
{ name = "separator" },
{
name = "󰮂 Toggle UI",
cmd = require("dapui").toggle,

View File

@ -23,6 +23,7 @@ return {
-- dapui.close()
-- end
fn.sign_define("DapBreakpoint", { text = "", texthl = "ErrorMsg", linehl = "", numhl = "" })
fn.sign_define("DapStopped", { text = "", texthl = "Changed", linehl = "debugPC", numhl = "" })
require("dapui").setup()
require("dap-go").setup()

34
lua/plugins/neodev.lua Normal file
View File

@ -0,0 +1,34 @@
return {
"folke/lazydev.nvim",
ft = "lua", -- only load on lua files
opts = {
library = {
-- Library paths can be absolute
"~/projects/my-awesome-lib",
-- Or relative, which means they will be resolved from the plugin dir.
"lazy.nvim",
-- It can also be a table with trigger words / mods
-- Only load luvit types when the `vim.uv` word is found
{ path = "${3rd}/luv/library", words = { "vim%.uv" } },
-- always load the LazyVim library
"LazyVim",
-- Only load the lazyvim library when the `LazyVim` global is found
{ path = "LazyVim", words = { "LazyVim" } },
-- Load the wezterm types when the `wezterm` module is required
-- Needs `justinsgithub/wezterm-types` to be installed
{ path = "wezterm-types", mods = { "wezterm" } },
-- Load the xmake types when opening file named `xmake.lua`
-- Needs `LelouchHe/xmake-luals-addon` to be installed
{ path = "xmake-luals-addon/library", files = { "xmake.lua" } },
},
-- always enable unless `vim.g.lazydev_enabled = false`
-- This is the default
enabled = function(root_dir)
return vim.g.lazydev_enabled == nil and true or vim.g.lazydev_enabled
end,
-- disable when a .luarc.json file is found
enabled = function(root_dir)
return not vim.uv.fs_stat(root_dir .. "/.luarc.json")
end,
},
}

9
lua/plugins/notify.lua Normal file
View File

@ -0,0 +1,9 @@
return {
"rcarriga/nvim-notify",
config = function()
require("notify").setup({
background_colour = "#000000",
})
vim.notify = require("notify")
end,
}