init
This commit is contained in:
43
nvim/lua/plugins/extras/editor/marks/arena.lua
Normal file
43
nvim/lua/plugins/extras/editor/marks/arena.lua
Normal file
@@ -0,0 +1,43 @@
|
||||
return {
|
||||
{
|
||||
"dzfrias/arena.nvim",
|
||||
event = "BufWinEnter",
|
||||
opts = {
|
||||
per_project = true,
|
||||
devicons = true,
|
||||
},
|
||||
-- stylua: ignore
|
||||
keys = {
|
||||
{ "<leader>m", function() require("arena").toggle() end, desc = "Marks" },
|
||||
},
|
||||
},
|
||||
{
|
||||
"goolord/alpha-nvim",
|
||||
optional = true,
|
||||
opts = function(_, dashboard)
|
||||
-- stylua: ignore
|
||||
local button = dashboard.button("m", " " .. " Marks", function() require("arena").toggle() end)
|
||||
button.opts.hl = "AlphaButtons"
|
||||
button.opts.hl_shortcut = "AlphaShortcut"
|
||||
table.insert(dashboard.section.buttons.val, 5, button)
|
||||
end,
|
||||
},
|
||||
{
|
||||
"nvimdev/dashboard-nvim",
|
||||
optional = true,
|
||||
opts = function(_, opts)
|
||||
-- stylua: ignore
|
||||
local arrow = {
|
||||
action = function() require("arena").toggle() end,
|
||||
desc = " Marks",
|
||||
icon = " ",
|
||||
key = "m",
|
||||
}
|
||||
|
||||
arrow.desc = arrow.desc .. string.rep(" ", 43 - #arrow.desc)
|
||||
arrow.key_format = " %s"
|
||||
|
||||
table.insert(opts.config.center, 5, arrow)
|
||||
end,
|
||||
},
|
||||
}
|
||||
49
nvim/lua/plugins/extras/editor/marks/arrow.lua
Normal file
49
nvim/lua/plugins/extras/editor/marks/arrow.lua
Normal file
@@ -0,0 +1,49 @@
|
||||
return {
|
||||
{
|
||||
"otavioschwanck/arrow.nvim",
|
||||
event = "VeryLazy",
|
||||
opts = {
|
||||
show_icons = true,
|
||||
},
|
||||
-- stylua: ignore
|
||||
keys = {
|
||||
{ "<leader>m", function() require("arrow.ui").openMenu() end, desc = "Marks" },
|
||||
},
|
||||
},
|
||||
{
|
||||
"nvim-lualine/lualine.nvim",
|
||||
optional = true,
|
||||
opts = function(_, opts)
|
||||
table.insert(opts.sections.lualine_c, require("arrow.statusline").text_for_statusline_with_icons())
|
||||
end,
|
||||
},
|
||||
{
|
||||
"goolord/alpha-nvim",
|
||||
optional = true,
|
||||
opts = function(_, dashboard)
|
||||
-- stylua: ignore
|
||||
local button = dashboard.button("m", " " .. " Marks", function() require("arrow.ui").openMenu() end)
|
||||
button.opts.hl = "AlphaButtons"
|
||||
button.opts.hl_shortcut = "AlphaShortcut"
|
||||
table.insert(dashboard.section.buttons.val, 5, button)
|
||||
end,
|
||||
},
|
||||
{
|
||||
"nvimdev/dashboard-nvim",
|
||||
optional = true,
|
||||
opts = function(_, opts)
|
||||
-- stylua: ignore
|
||||
local arrow = {
|
||||
action = function() require("arrow.ui").openMenu() end,
|
||||
desc = " Marks",
|
||||
icon = " ",
|
||||
key = "m",
|
||||
}
|
||||
|
||||
arrow.desc = arrow.desc .. string.rep(" ", 43 - #arrow.desc)
|
||||
arrow.key_format = " %s"
|
||||
|
||||
table.insert(opts.config.center, 5, arrow)
|
||||
end,
|
||||
},
|
||||
}
|
||||
43
nvim/lua/plugins/extras/editor/marks/bookmarks.lua
Normal file
43
nvim/lua/plugins/extras/editor/marks/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"] = " ",
|
||||
},
|
||||
})
|
||||
LazyVim.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" },
|
||||
},
|
||||
}
|
||||
83
nvim/lua/plugins/extras/editor/marks/grapple.lua
Normal file
83
nvim/lua/plugins/extras/editor/marks/grapple.lua
Normal file
@@ -0,0 +1,83 @@
|
||||
local prefix = "<leader>m"
|
||||
|
||||
local keys = {}
|
||||
|
||||
-- stylua: ignore start
|
||||
for i = 1, 9 do
|
||||
table.insert(keys, { prefix .. i, "<cmd>Grapple select index=" .. i .. "<CR>", desc = "File " .. i })
|
||||
end
|
||||
|
||||
table.insert(keys, { prefix .. "a", "<cmd>Grapple tag<CR>", desc = "Add Mark" })
|
||||
table.insert(keys, { prefix .. "m", "<cmd>Grapple toggle_tags<CR>", desc = "Marks" })
|
||||
table.insert(keys, { prefix .. "t", "<cmd>Telescope grapple tags<CR>", desc = "Marks (Telescope)" })
|
||||
table.insert(keys, { prefix .. "C", "<cmd>Grapple reset<CR>", desc = "Clear all Marks" })
|
||||
table.insert(keys, { prefix .. "c", "<cmd>Grapple untag<CR>", desc = "Clear Current Mark" })
|
||||
table.insert(keys, { prefix .. "s", "<cmd>Grapple toggle_scopes<CR>", desc = "Scopes" })
|
||||
table.insert(keys, { prefix .. "S", "<cmd>Grapple toggle_loaded<CR>", desc = "Loaded Scopes" })
|
||||
|
||||
table.insert(keys, { "]k", "<cmd>Grapple cycle forward<CR>", desc = "Next Mark" })
|
||||
table.insert(keys, { "[k", "<cmd>Grapple cycle backward<CR>", desc = "Prev Mark" })
|
||||
|
||||
table.insert(keys, { "<C-A-l>", "<cmd>Grapple cycle forward<CR>", desc = "Next Mark" })
|
||||
table.insert(keys, { "<C-A-h>", "<cmd>Grapple cycle backward<CR>", desc = "Prev Mark" })
|
||||
-- stylua: ignore end
|
||||
|
||||
return {
|
||||
{
|
||||
"cbochs/grapple.nvim",
|
||||
cmd = { "Grapple" },
|
||||
keys = keys,
|
||||
config = function()
|
||||
require("grapple").setup({
|
||||
win_opts = {
|
||||
footer = "",
|
||||
},
|
||||
})
|
||||
LazyVim.on_load("telescope.nvim", function()
|
||||
require("telescope").load_extension("grapple")
|
||||
end)
|
||||
end,
|
||||
},
|
||||
{
|
||||
"goolord/alpha-nvim",
|
||||
optional = true,
|
||||
opts = function(_, dashboard)
|
||||
local button = dashboard.button("m", " " .. " Marks", "<cmd>Grapple toggle_tags<CR>")
|
||||
button.opts.hl = "AlphaButtons"
|
||||
button.opts.hl_shortcut = "AlphaShortcut"
|
||||
table.insert(dashboard.section.buttons.val, 5, button)
|
||||
end,
|
||||
},
|
||||
{
|
||||
"nvimdev/dashboard-nvim",
|
||||
optional = true,
|
||||
opts = function(_, opts)
|
||||
local grapple = {
|
||||
action = "Grapple toggle_tags",
|
||||
desc = " Marks",
|
||||
icon = " ",
|
||||
key = "m",
|
||||
}
|
||||
|
||||
grapple.desc = grapple.desc .. string.rep(" ", 43 - #grapple.desc)
|
||||
grapple.key_format = " %s"
|
||||
|
||||
table.insert(opts.config.center, 5, grapple)
|
||||
end,
|
||||
},
|
||||
{
|
||||
"nvim-lualine/lualine.nvim",
|
||||
optional = true,
|
||||
opts = function(_, opts)
|
||||
table.insert(opts.sections.lualine_c, { require("grapple").statusline, cond = require("grapple").exists })
|
||||
end,
|
||||
},
|
||||
{
|
||||
"folke/which-key.nvim",
|
||||
opts = {
|
||||
spec = {
|
||||
{ prefix, group = "marks", icon = " " },
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
110
nvim/lua/plugins/extras/editor/marks/harpoon-extended.lua
Normal file
110
nvim/lua/plugins/extras/editor/marks/harpoon-extended.lua
Normal file
@@ -0,0 +1,110 @@
|
||||
local prefix = "<leader>m"
|
||||
|
||||
local keys = {}
|
||||
|
||||
-- stylua: ignore start
|
||||
for i = 1, 9 do
|
||||
table.insert(keys, { prefix .. i, function() require("harpoon"):list():select(i) end, desc = "File " .. i })
|
||||
end
|
||||
|
||||
table.insert(keys, { prefix .. "a", function() require("harpoon"):list():add() end, desc = "Add Mark" })
|
||||
table.insert(keys, { prefix .. "m", function() require("harpoon").ui:toggle_quick_menu(require("harpoon"):list()) end, desc = "Marks" })
|
||||
table.insert(keys, { prefix .. "t", "<cmd>Telescope harpoon marks<CR>", desc = "Marks (Telescope)" })
|
||||
table.insert(keys, { prefix .. "c", function() require("harpoon"):list():clear() end, desc = "Clear all Marks" })
|
||||
|
||||
table.insert(keys, { "]k", function() require("harpoon"):list():next() end, desc = "Next Mark" })
|
||||
table.insert(keys, { "[k", function() require("harpoon"):list():prev() end, desc = "Prev Mark" })
|
||||
|
||||
table.insert(keys, { "<C-A-l>", function() require("harpoon"):list():next() end, desc = "Next Mark" })
|
||||
table.insert(keys, { "<C-A-h>", function() require("harpoon"):list():prev() end, desc = "Prev Mark" })
|
||||
-- stylua: ignore end
|
||||
|
||||
return {
|
||||
{
|
||||
"ThePrimeagen/harpoon",
|
||||
branch = "harpoon2",
|
||||
dependencies = {
|
||||
"nvim-lua/plenary.nvim",
|
||||
},
|
||||
keys = keys,
|
||||
config = function()
|
||||
local harpoon = require("harpoon")
|
||||
harpoon:setup({
|
||||
menu = {
|
||||
width = vim.api.nvim_win_get_width(0) - 4,
|
||||
},
|
||||
settings = {
|
||||
save_on_toggle = true,
|
||||
},
|
||||
})
|
||||
|
||||
harpoon:extend({
|
||||
UI_CREATE = function(cx)
|
||||
vim.keymap.set("n", "<C-v>", function()
|
||||
harpoon.ui:select_menu_item({ vsplit = true })
|
||||
end, { buffer = cx.bufnr })
|
||||
|
||||
vim.keymap.set("n", "<C-x>", function()
|
||||
harpoon.ui:select_menu_item({ split = true })
|
||||
end, { buffer = cx.bufnr })
|
||||
|
||||
vim.keymap.set("n", "<C-t>", function()
|
||||
harpoon.ui:select_menu_item({ tabedit = true })
|
||||
end, { buffer = cx.bufnr })
|
||||
end,
|
||||
})
|
||||
|
||||
LazyVim.on_load("telescope.nvim", function()
|
||||
require("telescope").load_extension("harpoon")
|
||||
end)
|
||||
end,
|
||||
},
|
||||
{
|
||||
"nvim-lualine/lualine.nvim",
|
||||
dependencies = {
|
||||
"abeldekat/harpoonline",
|
||||
opts = { formatter = "short", icon = "" },
|
||||
},
|
||||
optional = true,
|
||||
opts = function(_, opts)
|
||||
table.insert(opts.sections.lualine_c, require("harpoonline").format)
|
||||
end,
|
||||
},
|
||||
{
|
||||
"goolord/alpha-nvim",
|
||||
optional = true,
|
||||
opts = function(_, dashboard)
|
||||
-- stylua: ignore
|
||||
local button = dashboard.button("m", " " .. " Marks", function() require("harpoon").ui:toggle_quick_menu(require("harpoon"):list()) end)
|
||||
button.opts.hl = "AlphaButtons"
|
||||
button.opts.hl_shortcut = "AlphaShortcut"
|
||||
table.insert(dashboard.section.buttons.val, 5, button)
|
||||
end,
|
||||
},
|
||||
{
|
||||
"nvimdev/dashboard-nvim",
|
||||
optional = true,
|
||||
opts = function(_, opts)
|
||||
local harpoon = {
|
||||
-- stylua: ignore
|
||||
action = function() require("harpoon").ui:toggle_quick_menu(require("harpoon"):list()) end,
|
||||
desc = " Marks",
|
||||
icon = " ",
|
||||
key = "m",
|
||||
}
|
||||
|
||||
harpoon.desc = harpoon.desc .. string.rep(" ", 43 - #harpoon.desc)
|
||||
harpoon.key_format = " %s"
|
||||
|
||||
table.insert(opts.config.center, 5, harpoon)
|
||||
end,
|
||||
},
|
||||
{
|
||||
"folke/which-key.nvim",
|
||||
opts = {
|
||||
spec = {
|
||||
{ prefix, group = "marks", icon = " " },
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
26
nvim/lua/plugins/extras/editor/marks/mini-visits.lua
Normal file
26
nvim/lua/plugins/extras/editor/marks/mini-visits.lua
Normal file
@@ -0,0 +1,26 @@
|
||||
local prefix = "<leader>m"
|
||||
|
||||
return {
|
||||
{
|
||||
"echasnovski/mini.visits",
|
||||
event = "BufEnter",
|
||||
opts = {},
|
||||
-- stylua: ignore
|
||||
keys = {
|
||||
{ prefix .. "a", function() require("mini.visits").add_label() end, desc = "Add Label" },
|
||||
{ prefix .. "r", function() require("mini.visits").remove_label() end, desc = "Remove Label" },
|
||||
{ prefix .. "l", function() require("mini.visits").select_label("", nil) end, desc = "Select Label (cwd)", },
|
||||
{ prefix .. "L", function() require("mini.visits").select_label("", "") end, desc = "Select Label (all)", },
|
||||
{ prefix .. "p", function() require("mini.visits").select_path() end, desc = "Visited Path (cwd)", },
|
||||
{ prefix .. "P", function() require("mini.visits").select_path("") end, desc = "Visited Path (all)", },
|
||||
},
|
||||
},
|
||||
{
|
||||
"folke/which-key.nvim",
|
||||
opts = {
|
||||
spec = {
|
||||
{ prefix, group = "marks", icon = " " },
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
Reference in New Issue
Block a user