nvim: use keys to lazy load
This commit is contained in:
@@ -1,14 +1,18 @@
|
||||
vim.keymap.set({ "n", "v" }, "mm", "<cmd>BookmarksMark<cr>", { desc = "Mark current line into active BookmarkList." })
|
||||
vim.keymap.set({ "n", "v" }, "mo", "<cmd>BookmarksGoto<cr>", { desc = "Go to bookmark at current active BookmarkList" })
|
||||
vim.keymap.set({ "n", "v" }, "ma", "<cmd>BookmarksCommands<cr>", { desc = "Find and trigger a bookmark command." })
|
||||
vim.keymap.set({ "n", "v" }, "mg", "<cmd>BookmarksGotoRecent<cr>", { desc = "Go to latest visited/created Bookmark" })
|
||||
vim.keymap.set({ "n", "v" }, "ms", "<cmd>BookmarksSetActiveList<cr>", { desc = "Go to latest visited/created Bookmark" })
|
||||
|
||||
return {
|
||||
"LintaoAmons/bookmarks.nvim",
|
||||
tag = "v0.5.3", -- optional, pin the plugin at specific version for stability
|
||||
dependencies = {
|
||||
{ "nvim-telescope/telescope.nvim" },
|
||||
{ "stevearc/dressing.nvim" } -- optional: to have the same UI shown in the GIF
|
||||
}
|
||||
{
|
||||
"LintaoAmons/bookmarks.nvim",
|
||||
tag = "v0.5.3", -- optional, pin the plugin at specific version for stability
|
||||
dependencies = {
|
||||
{ "stevearc/dressing.nvim" } -- optional: to have the same UI shown in the GIF
|
||||
},
|
||||
event = 'VimEnter',
|
||||
keys = {
|
||||
{ "mm", "<cmd>BookmarksMark<cr>", mode = { "n", "v" }, desc = "Mark current line into active BookmarkList." },
|
||||
{ "mo", "<cmd>BookmarksGoto<cr>", mode = { "n", "v" }, desc = "Go to bookmark at current active BookmarkList" },
|
||||
{ "ma", "<cmd>BookmarksCommands<cr>", mode = { "n", "v" }, desc = "Find and trigger a bookmark command." },
|
||||
{ "mg", "<cmd>BookmarksGotoRecent<cr>", mode = { "n", "v" }, desc = "Go to latest visited/created Bookmark" },
|
||||
{ "ms", "<cmd>BookmarksSetActiveList<cr>", mode = { "n", "v" }, desc = "Go to latest visited/created Bookmark" },
|
||||
},
|
||||
},
|
||||
{ "nvim-telescope/telescope.nvim", lazy = true },
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user