✨ feat(nvim): add bookmarks extra
This commit is contained in:
parent
85e6e43d93
commit
eda9664420
2 changed files with 44 additions and 0 deletions
1
.config/nvim/.github/README.md
vendored
1
.config/nvim/.github/README.md
vendored
|
@ -297,6 +297,7 @@
|
|||
<summary><b>🔖 Marks</b></summary>
|
||||
|
||||
- [ThePrimeagen/harpoon](https://dotfyle.com/plugins/ThePrimeagen/harpoon)
|
||||
- [tomasky/bookmarks.nvim](https://dotfyle.com/plugins/tomasky/bookmarks.nvim)
|
||||
|
||||
</details>
|
||||
|
||||
|
|
43
.config/nvim/lua/plugins/extras/editor/bookmarks.lua
Normal file
43
.config/nvim/lua/plugins/extras/editor/bookmarks.lua
Normal file
|
@ -0,0 +1,43 @@
|
|||
return {
|
||||
"tomasky/bookmarks.nvim",
|
||||
config = function()
|
||||
require("bookmarks").setup({
|
||||
save_file = vim.fn.stdpath("state") .. "/bookmarks",
|
||||
keywords = {
|
||||
["@t"] = " ",
|
||||
["@w"] = " ",
|
||||
["@f"] = " ",
|
||||
["@n"] = " ",
|
||||
},
|
||||
})
|
||||
require("lazyvim.util").on_load("telescope.nvim", function()
|
||||
require("telescope").setup({
|
||||
extensions = {
|
||||
repo = {
|
||||
list = {
|
||||
fd_opts = {
|
||||
"--no-ignore-vcs",
|
||||
},
|
||||
search_dirs = {
|
||||
"~/Repos/",
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
})
|
||||
require("telescope").load_extension("bookmarks")
|
||||
end)
|
||||
end,
|
||||
-- stylua: ignore
|
||||
keys = {
|
||||
{ "<leader>fB", "<cmd>Telescope bookmarks list<cr>", desc = "Bookmarks" },
|
||||
{ "mm", function() require("bookmarks").bookmark_toggle() end, desc = "Toggle Bookmark" },
|
||||
{ "ml", function() require("bookmarks").bookmark_ann() end, desc = "Add/Edit Current Line" },
|
||||
{ "mc", function() require("bookmarks").bookmark_clean() end, desc = "Clear All Bookmarks" },
|
||||
{ "mn", function() require("bookmarks").bookmark_next() end, desc = "Next Bookmark" },
|
||||
{ "mp", function() require("bookmarks").bookmark_prev() end, desc = "Previous Bookmark" },
|
||||
{ "]k", function() require("bookmarks").bookmark_next() end, desc = "Next Bookmark" },
|
||||
{ "[k", function() require("bookmarks").bookmark_prev() end, desc = "Previous Bookmark" },
|
||||
{ "mL", function() require("bookmarks").bookmark_list() end, desc = "List Bookmarks" },
|
||||
},
|
||||
}
|
Loading…
Add table
Reference in a new issue