diff --git a/lua/config/keymaping.lua b/lua/config/keymaping.lua index 3a2d99a..cb1cadb 100644 --- a/lua/config/keymaping.lua +++ b/lua/config/keymaping.lua @@ -41,6 +41,7 @@ map("n", "", "BufferPrevious", { desc = "Previous tab" }) map("n", "bb", dap.toggle_breakpoint, { desc = "Toggle breakpoint" }) map("n", "", dap.step_over, { desc = "Step over" }) map("n", "", dap.step_into, { desc = "Step into" }) +map("n", "", dap.step_out, { desc = "Step out" }) map("n", "", dap.continue, { desc = "Continue" }) -- nvterm diff --git a/lua/config/menu.lua b/lua/config/menu.lua index 5c7ffba..f680d22 100644 --- a/lua/config/menu.lua +++ b/lua/config/menu.lua @@ -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 = "", }, + { + name = " Step out", + cmd = dap.step_out, + rtxt = "", + }, + { 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, diff --git a/lua/plugins/dap.lua b/lua/plugins/dap.lua index a895696..0912a66 100644 --- a/lua/plugins/dap.lua +++ b/lua/plugins/dap.lua @@ -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() diff --git a/lua/plugins/neodev.lua b/lua/plugins/neodev.lua new file mode 100644 index 0000000..9bab8ba --- /dev/null +++ b/lua/plugins/neodev.lua @@ -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, + }, +} diff --git a/lua/plugins/notify.lua b/lua/plugins/notify.lua new file mode 100644 index 0000000..33b9ad3 --- /dev/null +++ b/lua/plugins/notify.lua @@ -0,0 +1,9 @@ +return { + "rcarriga/nvim-notify", + config = function() + require("notify").setup({ + background_colour = "#000000", + }) + vim.notify = require("notify") + end, +}