diff --git a/lua/config/keymaping.lua b/lua/config/keymaping.lua index cb1cadb..e53e2b2 100644 --- a/lua/config/keymaping.lua +++ b/lua/config/keymaping.lua @@ -1,5 +1,4 @@ local map = vim.keymap.set -local dap = require("dap") local term = require("nvterm.terminal") map("n", "", "", { desc = "LSP Back" }) @@ -38,12 +37,19 @@ map("n", "", "BufferNext", { desc = "Next tab" }) map("n", "", "BufferPrevious", { desc = "Previous tab" }) -- dap +local dap = require("dap") + 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" }) +-- bookmarks +local bm = require("bookmarks") + +map("n", "m", bm.bookmark_toggle) + -- nvterm map("n", "t", function() term.toggle("horizontal") diff --git a/lua/config/menu.lua b/lua/config/menu.lua index f680d22..3aa4f21 100644 --- a/lua/config/menu.lua +++ b/lua/config/menu.lua @@ -1,6 +1,7 @@ local gitsigns = require("gitsigns") local dap = require("dap") local dapui = require("dapui") +local bm = require("bookmarks") return { { @@ -83,6 +84,25 @@ return { { name = "separator" }, + { + name = "󰸖 Bookmarks", + hl = "Exblue", + items = { + { + name = "󰸖 List", + cmd = require("telescope").extensions.bookmarks.list, + }, + + { + name = "󱍻 Toggle", + cmd = bm.bookmark_toggle, + rtxt = "m", + }, + }, + }, + + { name = "separator" }, + { name = " Preview change", cmd = gitsigns.preview_hunk, diff --git a/lua/plugins/bookmarks.lua b/lua/plugins/bookmarks.lua new file mode 100644 index 0000000..8011464 --- /dev/null +++ b/lua/plugins/bookmarks.lua @@ -0,0 +1,8 @@ +return { + "tomasky/bookmarks.nvim", + -- after = "telescope.nvim", + event = "VimEnter", + config = function() + require("bookmarks").setup() + end, +}