init
This commit is contained in:
5
nvim/lua/plugins/extras/editor/carbon-now.lua
Normal file
5
nvim/lua/plugins/extras/editor/carbon-now.lua
Normal file
@@ -0,0 +1,5 @@
|
||||
return {
|
||||
"kristijanhusak/vim-carbon-now-sh",
|
||||
cmd = "CarbonNowSh",
|
||||
vscode = true,
|
||||
}
|
||||
16
nvim/lua/plugins/extras/editor/ccc.lua
Normal file
16
nvim/lua/plugins/extras/editor/ccc.lua
Normal file
@@ -0,0 +1,16 @@
|
||||
return {
|
||||
"uga-rosa/ccc.nvim",
|
||||
ft = { "html", "javascript", "typescript", "javascriptreact", "typescriptreact", "css", "scss", "sh" },
|
||||
cmd = { "CccPick", "CccConvert", "CccHighlighterEnable", "CccHighlighterDisable", "CccHighlighterToggle" },
|
||||
keys = {
|
||||
{ "<leader>up", "<cmd>CccHighlighterToggle<cr>", desc = "Toggle Paint/Colorizer" },
|
||||
{ "<A-C>", "<cmd>CccConvert<cr>", desc = "Convert color" },
|
||||
{ "<S-c>", "<cmd>CccPick<cr>", desc = "Pick Color" },
|
||||
},
|
||||
opts = {
|
||||
highlighter = {
|
||||
auto_enable = true,
|
||||
lsp = true,
|
||||
},
|
||||
},
|
||||
}
|
||||
19
nvim/lua/plugins/extras/editor/codesnap.lua
Normal file
19
nvim/lua/plugins/extras/editor/codesnap.lua
Normal file
@@ -0,0 +1,19 @@
|
||||
return {
|
||||
"mistricky/codesnap.nvim",
|
||||
build = "make",
|
||||
cmd = { "CodeSnap", "CodeSnapSave" },
|
||||
vscode = false,
|
||||
keys = {
|
||||
{ "<leader>cs", mode = "v", "<cmd>'<,'>CodeSnap<cr>", desc = "Screenshot (Clipboard)" },
|
||||
{ "<leader>cS", mode = "v", "<cmd>'<,'>CodeSnapSave<cr>", desc = "Screenshot (Save)" },
|
||||
},
|
||||
cond = vim.env.KITTY_SCROLLBACK_NVIM == nil,
|
||||
opts = {
|
||||
save_path = (os.getenv("HOME") .. "/pictures/screenshots/code"),
|
||||
title = "CodeSnap.nvim",
|
||||
code_font_family = "JetBrainsMono Nerd Font",
|
||||
watermark_font_family = "JetBrainsMono Nerd Font",
|
||||
watermark = "",
|
||||
bg_theme = "summer",
|
||||
},
|
||||
}
|
||||
40
nvim/lua/plugins/extras/editor/compiler.lua
Normal file
40
nvim/lua/plugins/extras/editor/compiler.lua
Normal file
@@ -0,0 +1,40 @@
|
||||
return {
|
||||
{
|
||||
"Zeioth/compiler.nvim",
|
||||
cmd = { "CompilerOpen", "CompilerToggleResults", "CompilerRedo" },
|
||||
dependencies = { "stevearc/overseer.nvim" },
|
||||
opts = {},
|
||||
-- stylua: ignore
|
||||
keys = {
|
||||
{ "<F3>", "<cmd>CompilerOpen<cr>", desc = "Open Compiler" },
|
||||
{ "<S-F3>", function() vim.cmd("CompilerStop") vim.cmd("CompilerRedo") end, desc = "Redo Compiler" },
|
||||
{ "<F4>", "<cmd>CompilerToggleResults<cr>", desc = "Toggle Compiler Results" },
|
||||
},
|
||||
},
|
||||
{
|
||||
"stevearc/overseer.nvim",
|
||||
cmd = {
|
||||
"OverseerOpen",
|
||||
"OverseerClose",
|
||||
"OverseerToggle",
|
||||
"OverseerSaveBundle",
|
||||
"OverseerLoadBundle",
|
||||
"OverseerDeleteBundle",
|
||||
"OverseerRunCmd",
|
||||
"OverseerRun",
|
||||
"OverseerInfo",
|
||||
"OverseerBuild",
|
||||
"OverseerQuickAction",
|
||||
"OverseerTaskAction ",
|
||||
"OverseerClearCache",
|
||||
},
|
||||
opts = {
|
||||
task_list = {
|
||||
direction = "bottom",
|
||||
min_height = 15,
|
||||
max_height = 15,
|
||||
default_detail = 1,
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
34
nvim/lua/plugins/extras/editor/dev-container.lua
Normal file
34
nvim/lua/plugins/extras/editor/dev-container.lua
Normal file
@@ -0,0 +1,34 @@
|
||||
local prefix = "<leader>o"
|
||||
|
||||
return {
|
||||
{
|
||||
"https://codeberg.org/esensar/nvim-dev-container",
|
||||
cmd = {
|
||||
"DevcontainerStart",
|
||||
"DevcontainerStop",
|
||||
"DevcontainerLogs",
|
||||
"DevcontainerEditNearestConfig",
|
||||
"DevcontainerAttach",
|
||||
"DevcontainerExec",
|
||||
"DevcontainerStopAll",
|
||||
"DevcontainerRemoveAll",
|
||||
},
|
||||
dependencies = { "nvim-treesitter/nvim-treesitter" },
|
||||
opts = {},
|
||||
keys = {
|
||||
{ prefix .. "s", "<cmd>DevcontainerStart<cr>", desc = "Start" },
|
||||
{ prefix .. "S", "<cmd>DevcontainerStop<cr>", desc = "Stop" },
|
||||
{ prefix .. "l", "<cmd>DevcontainerLogs<cr>", desc = "Log" },
|
||||
{ prefix .. "c", "<cmd>DevcontainerEditNearestConfig<cr>", desc = "Config" },
|
||||
{ prefix .. "a", "<cmd>DevcontainerAttach<cr>", desc = "Attach" },
|
||||
},
|
||||
},
|
||||
{
|
||||
"folke/which-key.nvim",
|
||||
opts = {
|
||||
spec = {
|
||||
{ "<leader><S-Tab>", group = "containers", icon = " " },
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
45
nvim/lua/plugins/extras/editor/docs/devdocs.lua
Normal file
45
nvim/lua/plugins/extras/editor/docs/devdocs.lua
Normal file
@@ -0,0 +1,45 @@
|
||||
return {
|
||||
"luckasRanarison/nvim-devdocs",
|
||||
cmd = {
|
||||
"DevdocsFetch",
|
||||
"DevdocsInstall",
|
||||
"DevdocsUninstall",
|
||||
"DevdocsOpen",
|
||||
"DevdocsOpenFloat",
|
||||
"DevdocsOpenCurrent",
|
||||
"DevdocsOpenCurrentFloat",
|
||||
"DevdocsUpdate",
|
||||
"DevdocsUpdateAll",
|
||||
},
|
||||
keys = {
|
||||
{ "<leader>sE", "<cmd>DevdocsOpen<cr>", desc = "Devdocs" },
|
||||
{ "<leader>se", "<cmd>DevdocsOpenCurrent<cr>", desc = "Devdocs Current" },
|
||||
},
|
||||
opts = {
|
||||
dir_path = vim.fn.stdpath("data") .. "/devdocs", -- installation directory
|
||||
telescope = {}, -- passed to the telescope picker
|
||||
float_win = { -- passed to nvim_open_win(), see :h api-floatwin
|
||||
relative = "editor",
|
||||
height = 25,
|
||||
width = 100,
|
||||
border = "rounded",
|
||||
},
|
||||
wrap = false, -- text wrap, only applies to floating window
|
||||
previewer_cmd = nil, -- for example: "glow"
|
||||
cmd_args = {}, -- example using glow: { "-s", "dark", "-w", "80" }
|
||||
cmd_ignore = {}, -- ignore cmd rendering for the listed docs
|
||||
picker_cmd = false, -- use cmd previewer in picker preview
|
||||
picker_cmd_args = {}, -- example using glow: { "-s", "dark", "-w", "50" }
|
||||
after_open = function(bufnr)
|
||||
vim.api.nvim_buf_set_keymap(bufnr, "n", "q", ":close<CR>", {})
|
||||
end,
|
||||
ensure_installed = {
|
||||
"javascript",
|
||||
"lua-5.4",
|
||||
"fish-3.6",
|
||||
"git",
|
||||
"npm",
|
||||
"node",
|
||||
},
|
||||
},
|
||||
}
|
||||
26
nvim/lua/plugins/extras/editor/docs/neorg.lua
Normal file
26
nvim/lua/plugins/extras/editor/docs/neorg.lua
Normal file
@@ -0,0 +1,26 @@
|
||||
return {
|
||||
"nvim-neorg/neorg",
|
||||
build = ":Neorg sync-parsers",
|
||||
dependencies = { "nvim-lua/plenary.nvim" },
|
||||
ft = "norg",
|
||||
opts = {
|
||||
load = {
|
||||
["core.defaults"] = {}, -- Loads default behaviour
|
||||
["core.concealer"] = {}, -- Adds pretty icons to your documents
|
||||
["core.keybinds"] = {}, -- Adds default keybindings
|
||||
["core.completion"] = {
|
||||
config = {
|
||||
engine = "nvim-cmp",
|
||||
},
|
||||
}, -- Enables support for completion plugins
|
||||
["core.journal"] = {}, -- Enables support for the journal module
|
||||
["core.dirman"] = { -- Manages Neorg workspaces
|
||||
config = {
|
||||
workspaces = {
|
||||
notes = "~/projects/notes",
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
99
nvim/lua/plugins/extras/editor/docs/obsidian.lua
Normal file
99
nvim/lua/plugins/extras/editor/docs/obsidian.lua
Normal file
@@ -0,0 +1,99 @@
|
||||
local prefix = "<leader>o"
|
||||
|
||||
return {
|
||||
{ import = "plugins.extras.lang.markdown-extended" },
|
||||
{
|
||||
-- "epwalsh/obsidian.nvim",
|
||||
"obsidian-nvim/obsidian.nvim", -- NOTE: Using a fork from the community
|
||||
ft = "markdown",
|
||||
keys = {
|
||||
{ prefix .. "o", "<cmd>ObsidianOpen<CR>", desc = "Open on App" },
|
||||
{ prefix .. "g", "<cmd>ObsidianSearch<CR>", desc = "Grep" },
|
||||
{ "<leader>sO", "<cmd>ObsidianSearch<CR>", desc = "Obsidian Grep" },
|
||||
{ prefix .. "n", "<cmd>ObsidianNew<CR>", desc = "New Note" },
|
||||
{ prefix .. "<space>", "<cmd>ObsidianQuickSwitch<CR>", desc = "Find Files" },
|
||||
{ prefix .. "b", "<cmd>ObsidianBacklinks<CR>", desc = "Backlinks" },
|
||||
{ prefix .. "t", "<cmd>ObsidianTags<CR>", desc = "Tags" },
|
||||
{ prefix .. "t", "<cmd>ObsidianTemplate<CR>", desc = "Template" },
|
||||
{ prefix .. "l", "<cmd>ObsidianLink<CR>", mode = "v", desc = "Link" },
|
||||
{ prefix .. "L", "<cmd>ObsidianLinks<CR>", desc = "Links" },
|
||||
{ prefix .. "N", "<cmd>ObsidianLinkNew<CR>", mode = "v", desc = "New Link" },
|
||||
{ prefix .. "e", "<cmd>ObsidianExtractNote<CR>", mode = "v", desc = "Extract Note" },
|
||||
{ prefix .. "w", "<cmd>ObsidianWorkspace<CR>", desc = "Workspace" },
|
||||
{ prefix .. "r", "<cmd>ObsidianRename<CR>", desc = "Rename" },
|
||||
{ prefix .. "i", "<cmd>ObsidianPasteImg<CR>", desc = "Paste Image" },
|
||||
{ prefix .. "d", "<cmd>ObsidianDailies<CR>", desc = "Daily Notes" },
|
||||
},
|
||||
opts = {
|
||||
workspaces = {
|
||||
{
|
||||
name = "personal-brain",
|
||||
path = "~/documents/obsidian/personal-brain/vault",
|
||||
},
|
||||
},
|
||||
|
||||
notes_subdir = "01 - Bandeja Entrada",
|
||||
|
||||
daily_notes = {
|
||||
folder = "03 - Diario/Diariamente",
|
||||
date_format = "%Y-%m-%d",
|
||||
alias_format = "%B %-d, %Y",
|
||||
template = "00 - Data/Plantillas/Diariamente.md",
|
||||
},
|
||||
|
||||
completion = {
|
||||
nvim_cmp = false,
|
||||
blink = true,
|
||||
},
|
||||
|
||||
picker = {
|
||||
name = "snacks.pick",
|
||||
},
|
||||
|
||||
mappings = {
|
||||
["gf"] = {
|
||||
action = function()
|
||||
return require("obsidian").util.gf_passthrough()
|
||||
end,
|
||||
opts = { noremap = false, expr = true, buffer = true },
|
||||
},
|
||||
["<C-c>"] = {
|
||||
action = function()
|
||||
return require("obsidian").util.toggle_checkbox()
|
||||
end,
|
||||
opts = { buffer = true },
|
||||
},
|
||||
["<cr>"] = {
|
||||
action = function()
|
||||
return require("obsidian").util.smart_action()
|
||||
end,
|
||||
opts = { buffer = true, expr = true },
|
||||
},
|
||||
},
|
||||
|
||||
templates = {
|
||||
subdir = "00 - Data/Plantillas",
|
||||
date_format = "%Y-%m-%d-%a",
|
||||
time_format = "%H:%M",
|
||||
},
|
||||
|
||||
follow_url_func = function(url)
|
||||
vim.fn.jobstart({ "xdg-open", url })
|
||||
end,
|
||||
|
||||
attachments = {
|
||||
img_folder = "00 - Data/Documentos",
|
||||
},
|
||||
|
||||
ui = { enable = false },
|
||||
},
|
||||
},
|
||||
{
|
||||
"folke/which-key.nvim",
|
||||
opts = {
|
||||
spec = {
|
||||
{ prefix, group = "obsidian", icon = " ", mode = { "n", "v" } },
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
23
nvim/lua/plugins/extras/editor/docs/peek.lua
Normal file
23
nvim/lua/plugins/extras/editor/docs/peek.lua
Normal file
@@ -0,0 +1,23 @@
|
||||
return {
|
||||
{ "iamcco/markdown-preview.nvim", enabled = false },
|
||||
{
|
||||
"toppair/peek.nvim",
|
||||
build = "deno task --quiet build:fast",
|
||||
keys = {
|
||||
{
|
||||
"<leader>cp",
|
||||
ft = "markdown",
|
||||
function()
|
||||
local peek = require("peek")
|
||||
if peek.is_open() then
|
||||
peek.close()
|
||||
else
|
||||
peek.open()
|
||||
end
|
||||
end,
|
||||
desc = "Peek (Markdown Preview)",
|
||||
},
|
||||
},
|
||||
opts = {},
|
||||
},
|
||||
}
|
||||
16
nvim/lua/plugins/extras/editor/exercism.lua
Normal file
16
nvim/lua/plugins/extras/editor/exercism.lua
Normal file
@@ -0,0 +1,16 @@
|
||||
return {
|
||||
"2kabhishek/exercism.nvim",
|
||||
cmd = {
|
||||
"ExercismLanguages",
|
||||
"ExercismList",
|
||||
"ExercismSubmit",
|
||||
"ExercismTest",
|
||||
},
|
||||
dependencies = {
|
||||
"2kabhishek/utils.nvim", -- required, for utility functions
|
||||
},
|
||||
opts = {
|
||||
exercism_workspace = "~/dev/study/exercism",
|
||||
add_default_keybindings = false,
|
||||
},
|
||||
}
|
||||
8
nvim/lua/plugins/extras/editor/five-server.lua
Normal file
8
nvim/lua/plugins/extras/editor/five-server.lua
Normal file
@@ -0,0 +1,8 @@
|
||||
return {
|
||||
"Diogo-ss/five-server.nvim",
|
||||
cmd = { "FiveServer" },
|
||||
build = function()
|
||||
require("fs.utils.install")()
|
||||
end,
|
||||
opts = {},
|
||||
}
|
||||
28
nvim/lua/plugins/extras/editor/flash-extended.lua
Normal file
28
nvim/lua/plugins/extras/editor/flash-extended.lua
Normal file
@@ -0,0 +1,28 @@
|
||||
return {
|
||||
"folke/flash.nvim",
|
||||
opts = {},
|
||||
vscode = true,
|
||||
keys = {
|
||||
{
|
||||
"s",
|
||||
mode = { "n", "x", "o" },
|
||||
function()
|
||||
require("flash").jump({
|
||||
search = {
|
||||
mode = function(str)
|
||||
return "\\<" .. str
|
||||
end,
|
||||
},
|
||||
})
|
||||
end,
|
||||
desc = "Flash",
|
||||
},
|
||||
{
|
||||
"<leader>*",
|
||||
function()
|
||||
require("flash").jump({ pattern = vim.fn.expand("<cword>") })
|
||||
end,
|
||||
desc = "Jump With Current Word",
|
||||
},
|
||||
},
|
||||
}
|
||||
77
nvim/lua/plugins/extras/editor/fold.lua
Normal file
77
nvim/lua/plugins/extras/editor/fold.lua
Normal file
@@ -0,0 +1,77 @@
|
||||
return {
|
||||
{
|
||||
"kevinhwang91/nvim-ufo",
|
||||
event = { "LazyFile" },
|
||||
dependencies = { "kevinhwang91/promise-async" },
|
||||
init = function()
|
||||
vim.o.foldcolumn = "1"
|
||||
vim.o.foldlevel = 99
|
||||
vim.o.foldlevelstart = 99
|
||||
vim.o.foldenable = true
|
||||
vim.o.fillchars = [[eob: ,fold: ,foldopen:,foldsep: ,foldclose:]]
|
||||
end,
|
||||
opts = function()
|
||||
local handler = function(virtText, lnum, endLnum, width, truncate)
|
||||
local newVirtText = {}
|
||||
local suffix = (" ... %d "):format(endLnum - lnum)
|
||||
local sufWidth = vim.fn.strdisplaywidth(suffix)
|
||||
local targetWidth = width - sufWidth
|
||||
local curWidth = 0
|
||||
for _, chunk in ipairs(virtText) do
|
||||
local chunkText = chunk[1]
|
||||
local chunkWidth = vim.fn.strdisplaywidth(chunkText)
|
||||
if targetWidth > curWidth + chunkWidth then
|
||||
table.insert(newVirtText, chunk)
|
||||
else
|
||||
chunkText = truncate(chunkText, targetWidth - curWidth)
|
||||
local hlGroup = chunk[2]
|
||||
table.insert(newVirtText, { chunkText, hlGroup })
|
||||
chunkWidth = vim.fn.strdisplaywidth(chunkText)
|
||||
if curWidth + chunkWidth < targetWidth then
|
||||
suffix = suffix .. (" "):rep(targetWidth - curWidth - chunkWidth)
|
||||
end
|
||||
break
|
||||
end
|
||||
curWidth = curWidth + chunkWidth
|
||||
end
|
||||
table.insert(newVirtText, { suffix, "MoreMsg" })
|
||||
return newVirtText
|
||||
end
|
||||
|
||||
return {
|
||||
fold_virt_text_handler = handler,
|
||||
provider_selector = function()
|
||||
return { "treesitter", "indent" }
|
||||
end,
|
||||
open_fold_hl_timeout = 400,
|
||||
close_fold_kinds_for_ft = { "imports", "comment" },
|
||||
preview = {
|
||||
win_config = { border = { "", "─", "", "", "", "─", "", "" }, winblend = 0 },
|
||||
mappings = {
|
||||
scrollU = "<C-b>",
|
||||
scrollD = "<C-f>",
|
||||
jumpTop = "[",
|
||||
jumpBot = "]",
|
||||
},
|
||||
},
|
||||
}
|
||||
end,
|
||||
keys = {
|
||||
{
|
||||
"zp",
|
||||
function()
|
||||
local winid = require("ufo").peekFoldedLinesUnderCursor()
|
||||
if not winid then
|
||||
vim.lsp.buf.hover()
|
||||
end
|
||||
end,
|
||||
desc = "Peek Folded Line",
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
"chrisgrieser/nvim-origami",
|
||||
event = { "LazyFile" },
|
||||
opts = {},
|
||||
},
|
||||
}
|
||||
18
nvim/lua/plugins/extras/editor/fzf/fzf-extended.lua
Normal file
18
nvim/lua/plugins/extras/editor/fzf/fzf-extended.lua
Normal file
@@ -0,0 +1,18 @@
|
||||
return {
|
||||
{ import = "lazyvim.plugins.extras.editor.fzf" },
|
||||
{
|
||||
"ibhagwan/fzf-lua",
|
||||
opts = {
|
||||
previewers = {
|
||||
builtin = {
|
||||
syntax_limit_b = 1024 * 100, -- 100KB
|
||||
},
|
||||
},
|
||||
},
|
||||
keys = {
|
||||
{ "<leader>sA", "<cmd>FzfLua treesitter<cr>", desc = "Treesiter Symbols" },
|
||||
{ "<leader>gr", "<cmd>FzfLua git_branches<cr>", desc = "Branches" },
|
||||
{ "<leader>S", "<cmd>FzfLua spell_suggest<cr>", desc = "Spelling" },
|
||||
},
|
||||
},
|
||||
}
|
||||
75
nvim/lua/plugins/extras/editor/git/diffview.lua
Normal file
75
nvim/lua/plugins/extras/editor/git/diffview.lua
Normal file
@@ -0,0 +1,75 @@
|
||||
local prefix = "<leader>gC"
|
||||
local function toggle_diffview(cmd)
|
||||
if next(require("diffview.lib").views) == nil then
|
||||
vim.cmd(cmd)
|
||||
else
|
||||
vim.cmd("DiffviewClose")
|
||||
end
|
||||
end
|
||||
|
||||
return {
|
||||
{
|
||||
"sindrets/diffview.nvim",
|
||||
-- stylua: ignore
|
||||
keys = {
|
||||
{ "<leader>gD", function() toggle_diffview("DiffviewFileHistory") end, desc = "Diff Repo" },
|
||||
{ "<leader>gd", function() toggle_diffview("DiffviewOpen") end, desc = "Diff View" },
|
||||
{ "<leader>gF", function() toggle_diffview("DiffviewFileHistory %") end, desc = "Diff Current File" },
|
||||
},
|
||||
opts = function(_, opts)
|
||||
local actions = require("diffview.actions")
|
||||
|
||||
opts.enhanced_diff_hl = true
|
||||
opts.view = {
|
||||
default = { winbar_info = true },
|
||||
file_history = { winbar_info = true },
|
||||
}
|
||||
opts.hooks = {
|
||||
diff_buf_read = function(bufnr)
|
||||
vim.b[bufnr].view_activated = false
|
||||
end,
|
||||
}
|
||||
|
||||
opts.keymaps = {
|
||||
--stylua: ignore
|
||||
view = {
|
||||
{ "n", prefix .. "o", actions.conflict_choose("ours"), { desc = "Choose the OURS version of a conflict" } },
|
||||
{ "n", prefix .. "t", actions.conflict_choose("theirs"), { desc = "Choose the THEIRS version of a conflict" } },
|
||||
{ "n", prefix .. "b", actions.conflict_choose("base"), { desc = "Choose the BASE version of a conflict" } },
|
||||
{ "n", prefix .. "a", actions.conflict_choose("all"), { desc = "Choose all the versions of a conflict" } },
|
||||
{ "n", prefix .. "x", actions.conflict_choose("none"), { desc = "Delete the conflict region" } },
|
||||
{ "n", prefix .. "O", actions.conflict_choose_all("ours"), { desc = "Choose the OURS version of a conflict for the whole file" } },
|
||||
{ "n", prefix .. "T", actions.conflict_choose_all("theirs"), { desc = "Choose the THEIRS version of a conflict for the whole file" } },
|
||||
{ "n", prefix .. "B", actions.conflict_choose_all("base"), { desc = "Choose the BASE version of a conflict for the whole file" } },
|
||||
{ "n", prefix .. "A", actions.conflict_choose_all("all"), { desc = "Choose all the versions of a conflict for the whole file" } },
|
||||
{ "n", prefix .. "X", actions.conflict_choose_all("none"), { desc = "Delete the conflict region for the whole file" } },
|
||||
},
|
||||
--stylua: ignore
|
||||
file_panel = {
|
||||
{ "n", prefix .. "O", actions.conflict_choose_all("ours"), { desc = "Choose the OURS version of a conflict for the whole file" } },
|
||||
{ "n", prefix .. "T", actions.conflict_choose_all("theirs"), { desc = "Choose the THEIRS version of a conflict for the whole file" } },
|
||||
{ "n", prefix .. "B", actions.conflict_choose_all("base"), { desc = "Choose the BASE version of a conflict for the whole file" } },
|
||||
{ "n", prefix .. "A", actions.conflict_choose_all("all"), { desc = "Choose all the versions of a conflict for the whole file" } },
|
||||
{ "n", prefix .. "X", actions.conflict_choose_all("none"), { desc = "Delete the conflict region for the whole file" } },
|
||||
},
|
||||
}
|
||||
end,
|
||||
},
|
||||
{
|
||||
"NeogitOrg/neogit",
|
||||
optional = true,
|
||||
opts = {
|
||||
integrations = {
|
||||
diffview = true,
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
"folke/which-key.nvim",
|
||||
opts = {
|
||||
spec = {
|
||||
{ prefix, group = "conflicts", icon = " " },
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
45
nvim/lua/plugins/extras/editor/git/git-conflict.lua
Normal file
45
nvim/lua/plugins/extras/editor/git/git-conflict.lua
Normal file
@@ -0,0 +1,45 @@
|
||||
local prefix = "<leader>gC"
|
||||
|
||||
vim.api.nvim_create_autocmd("User", {
|
||||
pattern = "GitConflictDetected",
|
||||
callback = function()
|
||||
vim.notify("Conflict detected in " .. vim.fn.expand("<afile>"))
|
||||
end,
|
||||
})
|
||||
|
||||
return {
|
||||
{
|
||||
"akinsho/git-conflict.nvim",
|
||||
opts = {
|
||||
default_mappings = {
|
||||
ours = prefix .. "o",
|
||||
theirs = prefix .. "t",
|
||||
none = prefix .. "n",
|
||||
both = prefix .. "b",
|
||||
},
|
||||
},
|
||||
cmd = {
|
||||
"GitConflictChooseTheirs",
|
||||
"GitConflictChooseOurs",
|
||||
"GitConflictChooseBoth",
|
||||
"GitConflictListQf",
|
||||
"GitConflictRefresh",
|
||||
"GitConflictNextConflict",
|
||||
"GitConflictPrevConflict",
|
||||
},
|
||||
keys = {
|
||||
{ "]g", "<cmd>GitConflictNextConflict<cr>", desc = "Next Conflict" },
|
||||
{ "[g", "<cmd>GitConflictPrevConflict<cr>", desc = "Previous Conflict" },
|
||||
{ prefix .. "l", "<cmd>GitConflictListQf<cr>", desc = "List Conflicts" },
|
||||
{ prefix .. "r", "<cmd>GitConflictRefresh<cr>", desc = "Refresh Conflicts" },
|
||||
},
|
||||
},
|
||||
{
|
||||
"folke/which-key.nvim",
|
||||
opts = {
|
||||
spec = {
|
||||
{ prefix, group = "conflicts", icon = " " },
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
40
nvim/lua/plugins/extras/editor/git/gitgraph.lua
Normal file
40
nvim/lua/plugins/extras/editor/git/gitgraph.lua
Normal file
@@ -0,0 +1,40 @@
|
||||
return {
|
||||
"isakbm/gitgraph.nvim",
|
||||
opts = {
|
||||
symbols = {
|
||||
merge_commit = "",
|
||||
commit = "",
|
||||
},
|
||||
format = {
|
||||
timestamp = "%H:%M:%S %d-%m-%Y",
|
||||
fields = { "hash", "timestamp", "author", "branch_name", "tag" },
|
||||
},
|
||||
hooks = {
|
||||
on_select_commit = function(commit)
|
||||
if LazyVim.has("diffview.nvim") then
|
||||
vim.notify("DiffviewOpen " .. commit.hash .. "^!")
|
||||
vim.cmd(":DiffviewOpen " .. commit.hash .. "^!")
|
||||
else
|
||||
print("selected commit:", commit.hash)
|
||||
end
|
||||
end,
|
||||
on_select_range_commit = function(from, to)
|
||||
if LazyVim.has("diffview.nvim") then
|
||||
vim.notify("DiffviewOpen " .. from.hash .. "~1.." .. to.hash)
|
||||
vim.cmd(":DiffviewOpen " .. from.hash .. "~1.." .. to.hash)
|
||||
else
|
||||
print("selected range:", from.hash, to.hash)
|
||||
end
|
||||
end,
|
||||
},
|
||||
},
|
||||
keys = {
|
||||
{
|
||||
"<leader>gl",
|
||||
function()
|
||||
require("gitgraph").draw({}, { all = true, max_count = 5000 })
|
||||
end,
|
||||
desc = "Graph",
|
||||
},
|
||||
},
|
||||
}
|
||||
169
nvim/lua/plugins/extras/editor/git/github-extended.lua
Normal file
169
nvim/lua/plugins/extras/editor/git/github-extended.lua
Normal file
@@ -0,0 +1,169 @@
|
||||
local prefix = "<leader>G"
|
||||
|
||||
return {
|
||||
{ import = "lazyvim.plugins.extras.util.octo" },
|
||||
{ import = "plugins.extras.lang.git-extended" },
|
||||
{
|
||||
"williamboman/mason.nvim",
|
||||
opts = function(_, opts)
|
||||
opts.ensure_installed = opts.ensure_installed or {}
|
||||
vim.list_extend(opts.ensure_installed, { "gh" })
|
||||
end,
|
||||
},
|
||||
{
|
||||
"almo7aya/openingh.nvim",
|
||||
cmd = { "OpenInGHRepo", "OpenInGHFile", "OpenInGHFileLines" },
|
||||
keys = {
|
||||
{ prefix .. "ro", "<cmd>OpenInGHRepo<CR>", desc = "Open git repo in web", mode = { "n" } },
|
||||
{ prefix .. "rf", "<cmd>OpenInGHFile<CR>", desc = "Open git file in web", mode = { "n" } },
|
||||
{ prefix .. "rc", "<cmd>OpenInGHFileLines<CR>", desc = "Open current line in web", mode = { "n", "x", "v" } },
|
||||
},
|
||||
},
|
||||
{
|
||||
"folke/which-key.nvim",
|
||||
opts = {
|
||||
spec = {
|
||||
{ prefix, group = "github", icon = " " },
|
||||
{ prefix .. "c", group = "comments" },
|
||||
{ prefix .. "t", group = "threads" },
|
||||
{ prefix .. "i", group = "issues" },
|
||||
{ prefix .. "p", group = "pull requests" },
|
||||
{ prefix .. "pm", group = "merge current PR" },
|
||||
{ prefix .. "r", group = "repo" },
|
||||
{ prefix .. "a", group = "assignee/reviewer" },
|
||||
{ prefix .. "l", group = "label" },
|
||||
{ prefix .. "e", group = "reaction" },
|
||||
{ prefix .. "R", group = "review" },
|
||||
{ prefix .. "g", group = "gist" },
|
||||
{ prefix .. "s", group = "review" },
|
||||
{ prefix .. "P", group = "profile" },
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
"Rawnly/gist.nvim",
|
||||
cmd = { "GistCreate", "GistCreateFromFile", "GistsList" },
|
||||
dependencies = {
|
||||
"samjwill/nvim-unception",
|
||||
init = function()
|
||||
vim.g.unception_block_while_host_edits = true
|
||||
end,
|
||||
},
|
||||
opts = {},
|
||||
keys = {
|
||||
{ prefix .. "gc", "<cmd>GistCreate<CR>", desc = "Create a Gist" },
|
||||
{ prefix .. "gf", "<cmd>GistCreateFromFile<CR>", desc = "Create a Gist from File" },
|
||||
{ prefix .. "gl", "<cmd>GistsList<CR>", desc = "List Gists" },
|
||||
},
|
||||
},
|
||||
{
|
||||
"pwntester/octo.nvim",
|
||||
opts = {
|
||||
use_diagnostic_signs = true,
|
||||
mappings = {},
|
||||
},
|
||||
keys = {
|
||||
-- Disable default LazyVim keymaps
|
||||
{ "<leader>gi", false },
|
||||
{ "<leader>gI", false },
|
||||
{ "<leader>gp", false },
|
||||
{ "<leader>gP", false },
|
||||
{ "<leader>gr", false },
|
||||
{ "<leader>gS", false },
|
||||
|
||||
{ prefix .. "ca", "<cmd>Octo comment add<CR>", desc = "Add a New Comment" },
|
||||
{ prefix .. "cd", "<cmd>Octo comment delete<CR>", desc = "Delete a Comment" },
|
||||
|
||||
{ prefix .. "ta", "<cmd>Octo thread resolve<CR>", desc = "Mark Thread as Resolved" },
|
||||
{ prefix .. "td", "<cmd>Octo thread unresolve<CR>", desc = "Mark Thread as Unresolved" },
|
||||
|
||||
{ prefix .. "ic", "<cmd>Octo issue close<CR>", desc = "Close Current Issue" },
|
||||
{ prefix .. "ir", "<cmd>Octo issue reopen<CR>", desc = "Reopen Current Issue" },
|
||||
{ prefix .. "il", "<cmd>Octo issue list<CR>", desc = "List Open Issues" },
|
||||
{ prefix .. "is", "<cmd>Octo issue search<CR>", desc = "Search Issues" },
|
||||
{ prefix .. "iu", "<cmd>Octo issue url<CR>", desc = "Copies URL of Current Issue" },
|
||||
{ prefix .. "io", "<cmd>Octo issue browser<CR>", desc = "Open Current Issue in Browser" },
|
||||
|
||||
{ prefix .. "pp", "<cmd>Octo pr checkout<CR>", desc = "Checkout PR" },
|
||||
{ prefix .. "pmm", "<cmd>Octo pr merge commit<CR>", desc = "Merge Commit PR" },
|
||||
{ prefix .. "pms", "<cmd>Octo pr merge squash<CR>", desc = "Squash Merge PR" },
|
||||
{ prefix .. "pmd", "<cmd>Octo pr merge delete<CR>", desc = "Delete Merge PR" },
|
||||
{ prefix .. "pmr", "<cmd>Octo pr merge rebase<CR>", desc = "Rebase Merge PR" },
|
||||
{ prefix .. "pc", "<cmd>Octo pr close<CR>", desc = "Close Current PR" },
|
||||
{ prefix .. "pn", "<cmd>Octo pr create<CR>", desc = "Create PR for Current Branch" },
|
||||
{ prefix .. "pd", "<cmd>Octo pr diff<CR>", desc = "Show PR Diff" },
|
||||
{ prefix .. "ps", "<cmd>Octo pr search<CR>", desc = "Search PR" },
|
||||
{ prefix .. "ps", "<cmd>Octo pr list<CR>", desc = "List Open PRs" },
|
||||
{ prefix .. "pr", "<cmd>Octo pr ready<CR>", desc = "Mark Draft as Ready for Review" },
|
||||
{ prefix .. "po", "<cmd>Octo pr browser<CR>", desc = "Open Current PR in Browser" },
|
||||
{ prefix .. "pu", "<cmd>Octo pr url<CR>", desc = "Copies URL of Current PR" },
|
||||
{ prefix .. "pt", "<cmd>Octo pr commits<CR>", desc = "List PR Commits" },
|
||||
{ prefix .. "pl", "<cmd>Octo pr commits<CR>", desc = "List Changed Files in PR" },
|
||||
|
||||
{ prefix .. "rf", "<cmd>Octo repo fork<CR>", desc = "Fork Repo" },
|
||||
{ prefix .. "ru", "<cmd>Octo repo url<CR>", desc = "Copies URL of Current Repo" },
|
||||
|
||||
{ prefix .. "aa", "<cmd> Octo assignee add<CR>", desc = "Assign a User" },
|
||||
{ prefix .. "ar", "<cmd> Octo assignee remove<CR>", desc = "Remove a User" },
|
||||
{ prefix .. "ap", "<cmd> Octo reviewer add<CR>", desc = "Assign a PR Reviewer" },
|
||||
|
||||
{ prefix .. "la", "<cmd> Octo label add<CR>", desc = "Assign a Label" },
|
||||
{ prefix .. "lr", "<cmd> Octo label remove<CR>", desc = "Remove a Label" },
|
||||
{ prefix .. "lc", "<cmd> Octo label create<CR>", desc = "Create a Label" },
|
||||
|
||||
{ prefix .. "e1", "<cmd>Octo reaction thumbs_up<CR>", desc = "Add 👍 Reaction" },
|
||||
{ prefix .. "e2", "<cmd>Octo reaction thumbs_down<CR>", desc = "Add 👎 Reaction" },
|
||||
{ prefix .. "e3", "<cmd>Octo reaction eyes<CR>", desc = "Add 👀 Reaction" },
|
||||
{ prefix .. "e4", "<cmd>Octo reaction laugh<CR>", desc = "Add 😄 Reaction" },
|
||||
{ prefix .. "e5", "<cmd>Octo reaction confused<CR>", desc = "Add 😕 Reaction" },
|
||||
{ prefix .. "e6", "<cmd>Octo reaction rocket<CR>", desc = "Add 🚀 Reaction" },
|
||||
{ prefix .. "e7", "<cmd>Octo reaction heart<CR>", desc = "Add ❤️ Reaction" },
|
||||
{ prefix .. "e8", "<cmd>Octo reaction party<CR>", desc = "Add 🎉 Reaction" },
|
||||
|
||||
{ prefix .. "x", "<cmd>Octo actions<CR>", desc = "Run an Action" },
|
||||
|
||||
{ prefix .. "ss", "<cmd> Octo review start<CR>", desc = "Start Review" },
|
||||
{ prefix .. "sf", "<cmd> Octo review submit<CR>", desc = "Submit Review" },
|
||||
{ prefix .. "sr", "<cmd> Octo review resume<CR>", desc = "Submit Resume" },
|
||||
{ prefix .. "sd", "<cmd> Octo review discard<CR>", desc = "Delete Pending Review" },
|
||||
{ prefix .. "sc", "<cmd> Octo review comments<CR>", desc = "View Pending Comments" },
|
||||
{ prefix .. "sp", "<cmd> Octo review commit<CR>", desc = "Select Commit to Review" },
|
||||
{ prefix .. "sc", "<cmd> Octo review close<CR>", desc = "Return to PR" },
|
||||
},
|
||||
},
|
||||
{
|
||||
"2kabhishek/octohub.nvim",
|
||||
dependencies = {
|
||||
"2kabhishek/utils.nvim",
|
||||
},
|
||||
cmd = {
|
||||
"OctoRepos",
|
||||
"OctoRepo",
|
||||
"OctoStats",
|
||||
"OctoActivityStats",
|
||||
"OctoContributionStats",
|
||||
"OctoRepoStats",
|
||||
"OctoProfile",
|
||||
"OctoRepoWeb",
|
||||
},
|
||||
opts = {
|
||||
add_default_keybindings = false,
|
||||
projects_dir = "~/dev/",
|
||||
},
|
||||
keys = {
|
||||
{ prefix .. "rl", "<cmd>OctoRepos<CR>", desc = "List Repos" },
|
||||
{ prefix .. "rS", "<cmd>OctoRepos sort:stars<CR>", desc = "Top Starred Repos" },
|
||||
{ prefix .. "rI", "<cmd>OctoRepos sort:issues<CR>", desc = "Top Repos With Issues" },
|
||||
{ prefix .. "rU", "<cmd>OctoRepos sort:updated<CR>", desc = "Recently Updated Repos" },
|
||||
{ prefix .. "rP", "<cmd>OctoRepos type:private<CR>", desc = "Private Repos" },
|
||||
{ prefix .. "rF", "<cmd>OctoRepos type:fork<CR>", desc = "Forked Repos" },
|
||||
{ prefix .. "rc", "<cmd>OctoRepo<CR>", desc = "Clone/Open Repo" },
|
||||
{ prefix .. "rs", "<cmd>OctoRepoStats<CR>", desc = "Repo Stats" },
|
||||
|
||||
{ prefix .. "Ps", "<cmd>OctoStats<CR>", desc = "All Stats" },
|
||||
{ prefix .. "Pa", "<cmd>OctoActivityStats<CR>", desc = "Activity Stats" },
|
||||
{ prefix .. "Pc", "<cmd>OctoContributionStats<CR>", desc = "Contribution Stats" },
|
||||
{ prefix .. "Po", "<cmd>OctoProfile<CR>", desc = "Open Profile" },
|
||||
},
|
||||
},
|
||||
}
|
||||
24
nvim/lua/plugins/extras/editor/git/neogit.lua
Normal file
24
nvim/lua/plugins/extras/editor/git/neogit.lua
Normal file
@@ -0,0 +1,24 @@
|
||||
local prefix = "<leader>gn"
|
||||
|
||||
return {
|
||||
{
|
||||
"NeogitOrg/neogit",
|
||||
cmd = "Neogit",
|
||||
opts = {},
|
||||
keys = {
|
||||
{ prefix .. "n", "<cmd>Neogit<cr>", desc = "Neogit (Root Dir)" },
|
||||
{ prefix .. "c", "<cmd>Neogit commit<cr>", desc = "Commit" },
|
||||
{ prefix .. "p", "<cmd>Neogit pull<cr>", desc = "Pull" },
|
||||
{ prefix .. "P", "<cmd>Neogit push<cr>", desc = "Push" },
|
||||
{ prefix .. "f", "<cmd>Neogit fetch<cr>", desc = "Fetch" },
|
||||
},
|
||||
},
|
||||
{
|
||||
"folke/which-key.nvim",
|
||||
opts = {
|
||||
spec = {
|
||||
{ prefix, group = "neogit", icon = " " },
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
26
nvim/lua/plugins/extras/editor/git/worktree.lua
Normal file
26
nvim/lua/plugins/extras/editor/git/worktree.lua
Normal file
@@ -0,0 +1,26 @@
|
||||
local prefix = "<leader>gw"
|
||||
|
||||
return {
|
||||
{
|
||||
"ThePrimeagen/git-worktree.nvim",
|
||||
opts = {},
|
||||
config = function()
|
||||
LazyVim.on_load("telescope.nvim", function()
|
||||
require("telescope").load_extension("git_worktree")
|
||||
end)
|
||||
end,
|
||||
-- stylua: ignore
|
||||
keys = {
|
||||
{ prefix .. "m", function() require("telescope").extensions.git_worktree.git_worktrees() end, desc = "Manage Worktrees" },
|
||||
{ prefix .. "c", function() require("telescope").extensions.git_worktree.create_git_worktree() end, desc = "Create Worktree" },
|
||||
},
|
||||
},
|
||||
{
|
||||
"folke/which-key.nvim",
|
||||
opts = {
|
||||
spec = {
|
||||
{ prefix, group = "worktrees", icon = " " },
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
16
nvim/lua/plugins/extras/editor/gitsigns-extended.lua
Normal file
16
nvim/lua/plugins/extras/editor/gitsigns-extended.lua
Normal file
@@ -0,0 +1,16 @@
|
||||
return {
|
||||
"lewis6991/gitsigns.nvim",
|
||||
opts = {
|
||||
current_line_blame_opts = {
|
||||
virt_text = true,
|
||||
virt_text_pos = "eol", -- 'eol' | 'overlay' | 'right_align'
|
||||
delay = 5,
|
||||
ignore_whitespace = false,
|
||||
},
|
||||
},
|
||||
keys = {
|
||||
-- stylua: ignore
|
||||
{ "<leader>uB", "<cmd>Gitsigns toggle_current_line_blame<CR>", desc = "Toggle Line Blame" },
|
||||
{ "<leader>ghe", "<cmd>Gitsigns toggle_deleted<CR>", desc = "Deletions Inline" },
|
||||
},
|
||||
}
|
||||
22
nvim/lua/plugins/extras/editor/hover.lua
Normal file
22
nvim/lua/plugins/extras/editor/hover.lua
Normal file
@@ -0,0 +1,22 @@
|
||||
return {
|
||||
"lewis6991/hover.nvim",
|
||||
init = function()
|
||||
require("hover.providers.lsp")
|
||||
require("hover.providers.gh")
|
||||
require("hover.providers.gh_user")
|
||||
require("hover.providers.jira")
|
||||
require("hover.providers.dap")
|
||||
require("hover.providers.man")
|
||||
require("hover.providers.dictionary")
|
||||
end,
|
||||
opts = {
|
||||
preview_opts = {
|
||||
border = "rounded",
|
||||
},
|
||||
},
|
||||
-- stylua: ignore
|
||||
keys = {
|
||||
{ "K", function() require("hover").hover() end, desc = "Hover" },
|
||||
{ "gk", function() require("hover").hover_select() end, desc = "Hover Select" },
|
||||
},
|
||||
}
|
||||
15
nvim/lua/plugins/extras/editor/leap-spooky.lua
Normal file
15
nvim/lua/plugins/extras/editor/leap-spooky.lua
Normal file
@@ -0,0 +1,15 @@
|
||||
return {
|
||||
{ import = "lazyvim.plugins.extras.editor.leap" },
|
||||
{
|
||||
"ggandor/leap.nvim",
|
||||
vscode = true,
|
||||
dependencies = {
|
||||
"ggandor/leap-spooky",
|
||||
vscode = true,
|
||||
},
|
||||
opts = {
|
||||
prefix = true,
|
||||
paste_on_remote_yank = true,
|
||||
},
|
||||
},
|
||||
}
|
||||
10
nvim/lua/plugins/extras/editor/live-server.lua
Normal file
10
nvim/lua/plugins/extras/editor/live-server.lua
Normal file
@@ -0,0 +1,10 @@
|
||||
return {
|
||||
"aurum77/live-server.nvim",
|
||||
build = function()
|
||||
require("live_server.util").install()
|
||||
end,
|
||||
cmd = { "LiveServer", "LiveServerStart", "LiveServerStop" },
|
||||
keys = {
|
||||
{ "<leader>cV", ft = "html", "<cmd>LiveServer<CR>", desc = "Live Server" },
|
||||
},
|
||||
}
|
||||
5
nvim/lua/plugins/extras/editor/macroni.lua
Normal file
5
nvim/lua/plugins/extras/editor/macroni.lua
Normal file
@@ -0,0 +1,5 @@
|
||||
return {
|
||||
"jesseleite/nvim-macroni",
|
||||
event = "VeryLazy",
|
||||
opts = {},
|
||||
}
|
||||
9
nvim/lua/plugins/extras/editor/markmap.lua
Normal file
9
nvim/lua/plugins/extras/editor/markmap.lua
Normal file
@@ -0,0 +1,9 @@
|
||||
return {
|
||||
"Zeioth/markmap.nvim",
|
||||
build = "yarn global add markmap-cli",
|
||||
cmd = { "MarkmapOpen", "MarkmapSave", "MarkmapWatch", "MarkmapWatchStop" },
|
||||
opts = {},
|
||||
keys = {
|
||||
{ "<leader>cm", "<cmd>MarkmapOpen<cr>", desc = "Markmap" },
|
||||
},
|
||||
}
|
||||
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 = " " },
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
52
nvim/lua/plugins/extras/editor/neo-tree-extended.lua
Normal file
52
nvim/lua/plugins/extras/editor/neo-tree-extended.lua
Normal file
@@ -0,0 +1,52 @@
|
||||
return {
|
||||
"nvim-neo-tree/neo-tree.nvim",
|
||||
opts = {
|
||||
close_if_last_window = true,
|
||||
window = {
|
||||
mappings = {
|
||||
["e"] = "open",
|
||||
["E"] = function()
|
||||
vim.api.nvim_exec("Neotree focus filesystem left", true)
|
||||
end,
|
||||
["b"] = function()
|
||||
vim.api.nvim_exec("Neotree focus buffers left", true)
|
||||
end,
|
||||
["g"] = function()
|
||||
vim.api.nvim_exec("Neotree focus git_status left", true)
|
||||
end,
|
||||
["<c-/>"] = "fuzzy_finder_directory",
|
||||
["D"] = function(state)
|
||||
local node = state.tree:get_node()
|
||||
local log = require("neo-tree.log")
|
||||
state.clipboard = state.clipboard or {}
|
||||
if diff_Node and diff_Node ~= tostring(node.id) then
|
||||
local current_Diff = node.id
|
||||
require("neo-tree.utils").open_file(state, diff_Node, open)
|
||||
vim.cmd("vert diffs " .. current_Diff)
|
||||
log.info("Diffing " .. diff_Name .. " against " .. node.name)
|
||||
diff_Node = nil
|
||||
current_Diff = nil
|
||||
state.clipboard = {}
|
||||
require("neo-tree.ui.renderer").redraw(state)
|
||||
else
|
||||
local existing = state.clipboard[node.id]
|
||||
if existing and existing.action == "diff" then
|
||||
state.clipboard[node.id] = nil
|
||||
diff_Node = nil
|
||||
require("neo-tree.ui.renderer").redraw(state)
|
||||
else
|
||||
state.clipboard[node.id] = { action = "diff", node = node }
|
||||
diff_Name = state.clipboard[node.id].node.name
|
||||
diff_Node = tostring(state.clipboard[node.id].node.id)
|
||||
log.info("Diff source file " .. diff_Name)
|
||||
require("neo-tree.ui.renderer").redraw(state)
|
||||
end
|
||||
end
|
||||
end,
|
||||
},
|
||||
},
|
||||
filesystem = {
|
||||
hijack_netrw_behavior = "open_default",
|
||||
},
|
||||
},
|
||||
}
|
||||
5
nvim/lua/plugins/extras/editor/numb.lua
Normal file
5
nvim/lua/plugins/extras/editor/numb.lua
Normal file
@@ -0,0 +1,5 @@
|
||||
return {
|
||||
"nacro90/numb.nvim",
|
||||
event = "CmdlineEnter",
|
||||
opts = {},
|
||||
}
|
||||
21
nvim/lua/plugins/extras/editor/oil.lua
Normal file
21
nvim/lua/plugins/extras/editor/oil.lua
Normal file
@@ -0,0 +1,21 @@
|
||||
return {
|
||||
"stevearc/oil.nvim",
|
||||
dependencies = {
|
||||
"nvim-tree/nvim-web-devicons",
|
||||
optional = true,
|
||||
},
|
||||
opts = {
|
||||
delete_to_trash = true,
|
||||
float = {
|
||||
max_height = 45,
|
||||
max_width = 90,
|
||||
},
|
||||
keymaps = {
|
||||
["q"] = "actions.close",
|
||||
},
|
||||
},
|
||||
-- stylua: ignore
|
||||
keys = {
|
||||
{ "<leader>;", function() require("oil").toggle_float() end, desc = "Toggle Oil" },
|
||||
},
|
||||
}
|
||||
16
nvim/lua/plugins/extras/editor/outline-extended.lua
Normal file
16
nvim/lua/plugins/extras/editor/outline-extended.lua
Normal file
@@ -0,0 +1,16 @@
|
||||
return {
|
||||
{ import = "lazyvim.plugins.extras.editor.outline" },
|
||||
{
|
||||
"hedyhli/outline.nvim",
|
||||
opts = {
|
||||
outline_window = {
|
||||
show_symbol_lineno = true,
|
||||
auto_jump = true,
|
||||
jump_highlight_duration = 150,
|
||||
},
|
||||
symbol_folding = {
|
||||
autofold_depth = 1,
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
37
nvim/lua/plugins/extras/editor/package-info.lua
Normal file
37
nvim/lua/plugins/extras/editor/package-info.lua
Normal file
@@ -0,0 +1,37 @@
|
||||
local prefix = "<leader>p"
|
||||
|
||||
return {
|
||||
{
|
||||
"vuki656/package-info.nvim",
|
||||
event = {
|
||||
"BufRead package.json",
|
||||
"BufRead package-lock.json",
|
||||
},
|
||||
opts = {},
|
||||
-- stylua: ignore
|
||||
keys = {
|
||||
{ prefix .. "wv", function() require('package-info').show({ force = true }) end, desc = "Show Package Versions" },
|
||||
{ prefix .. "wu", function() require('package-info').update() end, desc = "Update Package" },
|
||||
{ prefix .. "wr", function() require('package-info').delete() end, desc = "Remove Package" },
|
||||
{ prefix .. "wc", function() require('package-info').change_version() end, desc = "Change Package Version" },
|
||||
{ prefix .. "wi", function() require('package-info').install() end, desc = "Install New Dependency" },
|
||||
},
|
||||
},
|
||||
{
|
||||
"voldikss/vim-floaterm",
|
||||
optional = true,
|
||||
-- stylua: ignore
|
||||
keys = {
|
||||
{ prefix .. "wp", "<cmd>FloatermNew --disposable --name=lazynpm --opener=edit --titleposition=center --height=0.85 --width=0.85 --cwd=<root> lazynpm<CR>", desc = "Lazynpm" },
|
||||
},
|
||||
},
|
||||
{
|
||||
"folke/which-key.nvim",
|
||||
opts = {
|
||||
spec = {
|
||||
{ prefix, group = "packages/dependencies", icon = " ", mode = { "n", "v" } },
|
||||
{ prefix .. "w", group = "web", icon = " ", mode = { "n", "v" } },
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
19
nvim/lua/plugins/extras/editor/regex.lua
Normal file
19
nvim/lua/plugins/extras/editor/regex.lua
Normal file
@@ -0,0 +1,19 @@
|
||||
return {
|
||||
"bennypowers/nvim-regexplainer",
|
||||
dependencies = {
|
||||
"MunifTanjim/nui.nvim",
|
||||
},
|
||||
opts = {
|
||||
auto = "true",
|
||||
},
|
||||
-- stylua: ignore
|
||||
keys = {
|
||||
{
|
||||
"gR",
|
||||
function()
|
||||
require("regexplainer").show()
|
||||
end,
|
||||
desc = "Regexplainer",
|
||||
},
|
||||
},
|
||||
}
|
||||
8
nvim/lua/plugins/extras/editor/retirement.lua
Normal file
8
nvim/lua/plugins/extras/editor/retirement.lua
Normal file
@@ -0,0 +1,8 @@
|
||||
return {
|
||||
"chrisgrieser/nvim-early-retirement",
|
||||
event = "VeryLazy",
|
||||
opts = {
|
||||
retirementAgeMins = 30,
|
||||
ignoreUnsavedChangesBufs = false,
|
||||
},
|
||||
}
|
||||
50
nvim/lua/plugins/extras/editor/search-replace.lua
Normal file
50
nvim/lua/plugins/extras/editor/search-replace.lua
Normal file
@@ -0,0 +1,50 @@
|
||||
local prefix = "sr"
|
||||
|
||||
return {
|
||||
{
|
||||
"roobert/search-replace.nvim",
|
||||
opts = {
|
||||
default_replace_single_buffer_options = "gcI",
|
||||
default_replace_multi_buffer_options = "egcI",
|
||||
},
|
||||
-- stylua: ignore
|
||||
keys = {
|
||||
{ prefix .. "b", "<CMD>SearchReplaceSingleBufferVisualSelection<CR>", desc = "Buffer", mode = "v" },
|
||||
{ prefix .. "v", "<CMD>SearchReplaceWithinVisualSelection<CR>", desc = "Visual Selection", mode = "v" },
|
||||
{ prefix .. "w", "<CMD>SearchReplaceWithinVisualSelectionCWord<CR>", desc = "Word on Buffer", mode = "v" },
|
||||
|
||||
{ prefix .. "b", "<CMD>SearchReplaceSingleBufferOpen<CR>", desc = "Buffer", mode = "n" },
|
||||
{ prefix .. "w", "<CMD>SearchReplaceSingleBufferCWord<CR>", desc = "Word on Buffer", mode = "n" },
|
||||
{ prefix .. "W", "<CMD>SearchReplaceSingleBufferCWORD<CR>", desc = "WORD on Buffer", mode = "n" },
|
||||
{ prefix .. "e", "<CMD>SearchReplaceSingleBufferCExpr<CR>", desc = "Expression on Buffer", mode = "n" },
|
||||
},
|
||||
},
|
||||
{
|
||||
"folke/which-key.nvim",
|
||||
opts = {
|
||||
spec = {
|
||||
{ prefix, group = "replace", icon = " " },
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
"MagicDuck/grug-far.nvim",
|
||||
keys = {
|
||||
{
|
||||
prefix .. "p",
|
||||
function()
|
||||
local grug = require("grug-far")
|
||||
local ext = vim.bo.buftype == "" and vim.fn.expand("%:e")
|
||||
grug.grug_far({
|
||||
transient = true,
|
||||
prefills = {
|
||||
filesFilter = ext and ext ~= "" and "*." .. ext or nil,
|
||||
},
|
||||
})
|
||||
end,
|
||||
mode = { "n", "v" },
|
||||
desc = "Project",
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
39
nvim/lua/plugins/extras/editor/spectre.lua
Normal file
39
nvim/lua/plugins/extras/editor/spectre.lua
Normal file
@@ -0,0 +1,39 @@
|
||||
local prefix = "<leader>sr"
|
||||
|
||||
return {
|
||||
{
|
||||
"nvim-pack/nvim-spectre",
|
||||
build = false,
|
||||
cmd = "Spectre",
|
||||
opts = {
|
||||
open_cmd = "noswapfile vnew",
|
||||
default = {
|
||||
find = {
|
||||
cmd = "rg",
|
||||
},
|
||||
replace = {
|
||||
cmd = "sd",
|
||||
},
|
||||
},
|
||||
use_trouble_qf = true,
|
||||
},
|
||||
-- stylua: ignore
|
||||
keys = {
|
||||
{ prefix .. "g", function() require("spectre").toggle() end, desc = "Globally" },
|
||||
{ prefix .. "G", mode = { "n" }, function() require("spectre").open_visual({ select_word = true }) end, desc = "Word Globally" },
|
||||
{ prefix .. "G", mode = { "v" }, function() require("spectre").open_visual() end, desc = "Word Globally" },
|
||||
},
|
||||
},
|
||||
{
|
||||
"folke/which-key.nvim",
|
||||
opts = {
|
||||
spec = {
|
||||
{ prefix, group = "replace", icon = " " },
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
"MagicDuck/grug-far.nvim",
|
||||
enabled = false,
|
||||
},
|
||||
}
|
||||
8
nvim/lua/plugins/extras/editor/ssr.lua
Normal file
8
nvim/lua/plugins/extras/editor/ssr.lua
Normal file
@@ -0,0 +1,8 @@
|
||||
return {
|
||||
"cshuaimin/ssr.nvim",
|
||||
opts = {},
|
||||
-- stylua: ignore
|
||||
keys = {
|
||||
{ "<leader>srs", function() require("ssr").open() end, desc = "Structural" },
|
||||
},
|
||||
}
|
||||
11
nvim/lua/plugins/extras/editor/suda.lua
Normal file
11
nvim/lua/plugins/extras/editor/suda.lua
Normal file
@@ -0,0 +1,11 @@
|
||||
return {
|
||||
"lambdalisue/suda.vim",
|
||||
-- stylua: ignore
|
||||
keys = {
|
||||
{ "<leader>W", ":SudaWrite<CR>", desc = "Suda Write" },
|
||||
},
|
||||
cmd = {
|
||||
"SudaRead",
|
||||
"SudaWrite",
|
||||
},
|
||||
}
|
||||
8
nvim/lua/plugins/extras/editor/tabscope.lua
Normal file
8
nvim/lua/plugins/extras/editor/tabscope.lua
Normal file
@@ -0,0 +1,8 @@
|
||||
return {
|
||||
"akinsho/bufferline.nvim",
|
||||
optional = true,
|
||||
dependencies = {
|
||||
"backdround/tabscope.nvim",
|
||||
opts = {},
|
||||
},
|
||||
}
|
||||
27
nvim/lua/plugins/extras/editor/telescope/all-recent.lua
Normal file
27
nvim/lua/plugins/extras/editor/telescope/all-recent.lua
Normal file
@@ -0,0 +1,27 @@
|
||||
return {
|
||||
"nvim-telescope/telescope.nvim",
|
||||
dependencies = {
|
||||
"prochri/telescope-all-recent.nvim",
|
||||
dependencies = {
|
||||
"kkharji/sqlite.lua",
|
||||
},
|
||||
opts = {
|
||||
pickers = {
|
||||
["workspaces.nvim#workspaces"] = {
|
||||
disable = false,
|
||||
sorting = "frecency",
|
||||
},
|
||||
["project.nvim#projects"] = {
|
||||
disable = false,
|
||||
sorting = "frecency",
|
||||
},
|
||||
["yanky.nvim#yank_history"] = {
|
||||
disable = true,
|
||||
},
|
||||
["zoxide.nvim#zoxide"] = {
|
||||
disable = true,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
28
nvim/lua/plugins/extras/editor/telescope/file-browser.lua
Normal file
28
nvim/lua/plugins/extras/editor/telescope/file-browser.lua
Normal file
@@ -0,0 +1,28 @@
|
||||
return {
|
||||
"nvim-telescope/telescope-file-browser.nvim",
|
||||
config = function()
|
||||
LazyVim.on_load("telescope.nvim", function()
|
||||
require("telescope").setup({
|
||||
extensions = {
|
||||
file_browser = {
|
||||
hijack_netrw = true,
|
||||
},
|
||||
},
|
||||
})
|
||||
require("telescope").load_extension("file_browser")
|
||||
end)
|
||||
end,
|
||||
dependencies = {
|
||||
"nvim-telescope/telescope.nvim",
|
||||
"nvim-lua/plenary.nvim",
|
||||
{
|
||||
"nvim-tree/nvim-web-devicons",
|
||||
optional = true,
|
||||
},
|
||||
},
|
||||
-- stylua: ignore
|
||||
keys = {
|
||||
{ "<leader>'", "<cmd>Telescope file_browser<cr>", desc = "Telescope File Browser (root dir)" },
|
||||
{ '<leader>"', "<cmd>Telescope file_browser path=%:p:h select_buffer=true<cr>", desc = "Telescope File Browser (cwd)" },
|
||||
},
|
||||
}
|
||||
13
nvim/lua/plugins/extras/editor/telescope/frecuency.lua
Normal file
13
nvim/lua/plugins/extras/editor/telescope/frecuency.lua
Normal file
@@ -0,0 +1,13 @@
|
||||
return {
|
||||
"nvim-telescope/telescope-frecency.nvim",
|
||||
opts = {},
|
||||
config = function()
|
||||
LazyVim.on_load("telescope.nvim", function()
|
||||
require("telescope").load_extension("frecency")
|
||||
end)
|
||||
end,
|
||||
keys = {
|
||||
{ "<leader>fq", "<cmd>Telescope frecency<CR>", desc = "Frecency (Root Dir)" },
|
||||
{ "<leader>fQ", "<cmd>Telescope frecency workspace=CWD<CR>", desc = "Frecency (cwd)" },
|
||||
},
|
||||
}
|
||||
18
nvim/lua/plugins/extras/editor/telescope/headings.lua
Normal file
18
nvim/lua/plugins/extras/editor/telescope/headings.lua
Normal file
@@ -0,0 +1,18 @@
|
||||
return {
|
||||
"crispgm/telescope-heading.nvim",
|
||||
config = function()
|
||||
LazyVim.on_load("telescope.nvim", function()
|
||||
require("telescope").setup({
|
||||
extensions = {
|
||||
heading = {
|
||||
treesitter = true,
|
||||
},
|
||||
},
|
||||
})
|
||||
require("telescope").load_extension("heading")
|
||||
end)
|
||||
end,
|
||||
keys = {
|
||||
{ "<leader>s#", "<cmd>Telescope heading<CR>", desc = "Headings" },
|
||||
},
|
||||
}
|
||||
19
nvim/lua/plugins/extras/editor/telescope/import.lua
Normal file
19
nvim/lua/plugins/extras/editor/telescope/import.lua
Normal file
@@ -0,0 +1,19 @@
|
||||
return {
|
||||
"piersolenski/telescope-import.nvim",
|
||||
opts = {},
|
||||
config = function()
|
||||
LazyVim.on_load("telescope.nvim", function()
|
||||
require("telescope").setup({
|
||||
extensions = {
|
||||
import = {
|
||||
insert_at_top = true,
|
||||
},
|
||||
},
|
||||
})
|
||||
require("telescope").load_extension("import")
|
||||
end)
|
||||
end,
|
||||
keys = {
|
||||
{ "<leader>sI", "<cmd>Telescope import<CR>", desc = "Imports" },
|
||||
},
|
||||
}
|
||||
11
nvim/lua/plugins/extras/editor/telescope/lazy.lua
Normal file
11
nvim/lua/plugins/extras/editor/telescope/lazy.lua
Normal file
@@ -0,0 +1,11 @@
|
||||
return {
|
||||
"tsakirist/telescope-lazy.nvim",
|
||||
config = function()
|
||||
LazyVim.on_load("telescope.nvim", function()
|
||||
require("telescope").load_extension("lazy")
|
||||
end)
|
||||
end,
|
||||
keys = {
|
||||
{ "<leader>sp", "<cmd>Telescope lazy<CR>", desc = "Plugins (Lazy)" },
|
||||
},
|
||||
}
|
||||
13
nvim/lua/plugins/extras/editor/telescope/live-grep.lua
Normal file
13
nvim/lua/plugins/extras/editor/telescope/live-grep.lua
Normal file
@@ -0,0 +1,13 @@
|
||||
return {
|
||||
"nvim-telescope/telescope-live-grep-args.nvim",
|
||||
config = function()
|
||||
LazyVim.on_load("telescope.nvim", function()
|
||||
require("telescope").load_extension("lazy")
|
||||
end)
|
||||
end,
|
||||
-- stylua: ignore
|
||||
keys = {
|
||||
{ "<leader>sg", function() require("telescope").extensions.live_grep_args.live_grep_args() end, desc = "Grep (root dir)" },
|
||||
{ "<leader>/", function() require("telescope").extensions.live_grep_args.live_grep_args() end, desc = "Grep (root dir)" },
|
||||
},
|
||||
}
|
||||
11
nvim/lua/plugins/extras/editor/telescope/luasnip.lua
Normal file
11
nvim/lua/plugins/extras/editor/telescope/luasnip.lua
Normal file
@@ -0,0 +1,11 @@
|
||||
return {
|
||||
"benfowler/telescope-luasnip.nvim",
|
||||
config = function()
|
||||
LazyVim.on_load("telescope.nvim", function()
|
||||
require("telescope").load_extension("luasnip")
|
||||
end)
|
||||
end,
|
||||
keys = {
|
||||
{ "<leader>sl", "<cmd>Telescope luasnip<CR>", desc = "Luasnip (Snippets)" },
|
||||
},
|
||||
}
|
||||
18
nvim/lua/plugins/extras/editor/telescope/media.lua
Normal file
18
nvim/lua/plugins/extras/editor/telescope/media.lua
Normal file
@@ -0,0 +1,18 @@
|
||||
return {
|
||||
"dharmx/telescope-media.nvim",
|
||||
config = function()
|
||||
LazyVim.on_load("telescope.nvim", function()
|
||||
require("telescope").setup({
|
||||
extensions = {
|
||||
media = {
|
||||
backend = "ueberzug", -- image/gif backend
|
||||
},
|
||||
},
|
||||
})
|
||||
require("telescope").load_extension("media")
|
||||
end)
|
||||
end,
|
||||
keys = {
|
||||
{ "<leader>sM", "<cmd>Telescope media<CR>", desc = "Media" },
|
||||
},
|
||||
}
|
||||
69
nvim/lua/plugins/extras/editor/telescope/repo.lua
Normal file
69
nvim/lua/plugins/extras/editor/telescope/repo.lua
Normal file
@@ -0,0 +1,69 @@
|
||||
return {
|
||||
{
|
||||
"cljoly/telescope-repo.nvim",
|
||||
event = "VeryLazy",
|
||||
dependencies = {
|
||||
{
|
||||
"airblade/vim-rooter",
|
||||
init = function()
|
||||
vim.g["rooter_cd_cmd"] = "lcd"
|
||||
vim.g["rooter_silent_chdir"] = 1
|
||||
end,
|
||||
},
|
||||
{ "nvim-telescope/telescope.nvim" },
|
||||
{ "nvim-lua/plenary.nvim" },
|
||||
},
|
||||
opts = {},
|
||||
config = function()
|
||||
LazyVim.on_load("telescope.nvim", function()
|
||||
require("telescope").setup({
|
||||
extensions = {
|
||||
repo = {
|
||||
list = {
|
||||
fd_opts = {
|
||||
"--no-ignore-vcs",
|
||||
},
|
||||
search_dirs = {
|
||||
"~/dev/",
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
})
|
||||
require("telescope").load_extension("repo")
|
||||
end)
|
||||
end,
|
||||
-- stylua: ignore
|
||||
keys = {
|
||||
{ "<leader>fp", "<cmd>Telescope repo list<cr>", desc = "Projects (~/dev)" },
|
||||
{ "<leader>fP", "<cmd>lua require'telescope'.extensions.repo.list{search_dirs = { '~/' }}<cr>", desc = "Projects (System)" },
|
||||
},
|
||||
},
|
||||
{
|
||||
"goolord/alpha-nvim",
|
||||
optional = true,
|
||||
opts = function(_, dashboard)
|
||||
local button = dashboard.button("r", " " .. " Repos", "<cmd>Telescope repo list<CR>")
|
||||
button.opts.hl = "AlphaButtons"
|
||||
button.opts.hl_shortcut = "AlphaShortcut"
|
||||
table.insert(dashboard.section.buttons.val, 4, button)
|
||||
end,
|
||||
},
|
||||
{
|
||||
"nvimdev/dashboard-nvim",
|
||||
optional = true,
|
||||
opts = function(_, opts)
|
||||
local projects = {
|
||||
action = "Telescope repo list",
|
||||
desc = " Repos",
|
||||
icon = " ",
|
||||
key = "r",
|
||||
}
|
||||
|
||||
projects.desc = projects.desc .. string.rep(" ", 43 - #projects.desc)
|
||||
projects.key_format = " %s"
|
||||
|
||||
table.insert(opts.config.center, 4, projects)
|
||||
end,
|
||||
},
|
||||
}
|
||||
126
nvim/lua/plugins/extras/editor/telescope/telescope-extended.lua
Normal file
126
nvim/lua/plugins/extras/editor/telescope/telescope-extended.lua
Normal file
@@ -0,0 +1,126 @@
|
||||
local symbols_prefix = "<leader>ss"
|
||||
local symbols_workspace_prefix = "<leader>sS"
|
||||
local actions = require("telescope.actions")
|
||||
|
||||
return {
|
||||
{ import = "lazyvim.plugins.extras.editor.telescope" },
|
||||
{
|
||||
"nvim-telescope/telescope.nvim",
|
||||
-- stylua: ignore
|
||||
keys = {
|
||||
{
|
||||
symbols_prefix .. "a",
|
||||
LazyVim.pick("lsp_document_symbols", { symbols = { "Class", "Function", "Method", "Constructor", "Interface", "Module", "Struct", "Trait", "Field", "Property", "Enum", "Constant" } }),
|
||||
desc = "All",
|
||||
},
|
||||
{ symbols_prefix .. "c", LazyVim.pick("lsp_document_symbols", { symbols = { "Class" } }), desc = "Class" },
|
||||
{ symbols_prefix .. "f", LazyVim.pick("lsp_document_symbols", { symbols = { "Function" } }), desc = "Function" },
|
||||
{ symbols_prefix .. "m", LazyVim.pick("lsp_document_symbols", { symbols = { "Method" } }), desc = "Method" },
|
||||
{ symbols_prefix .. "C", LazyVim.pick("lsp_document_symbols", { symbols = { "Constructor" } }), desc = "Constructor" },
|
||||
{ symbols_prefix .. "e", LazyVim.pick("lsp_document_symbols", { symbols = { "Enum" } }), desc = "Enum" },
|
||||
{ symbols_prefix .. "i", LazyVim.pick("lsp_document_symbols", { symbols = { "Interface" } }), desc = "Interface" },
|
||||
{ symbols_prefix .. "M", LazyVim.pick("lsp_document_symbols", { symbols = { "Module" } }), desc = "Module" },
|
||||
{ symbols_prefix .. "s", LazyVim.pick("lsp_document_symbols", { symbols = { "Struct" } }), desc = "Struct" },
|
||||
{ symbols_prefix .. "t", LazyVim.pick("lsp_document_symbols", { symbols = { "Trait" } }), desc = "Trait" },
|
||||
{ symbols_prefix .. "F", LazyVim.pick("lsp_document_symbols", { symbols = { "Field" } }), desc = "Field" },
|
||||
{ symbols_prefix .. "p", LazyVim.pick("lsp_document_symbols", { symbols = { "Property" } }), desc = "Property" },
|
||||
{ symbols_prefix .. "v", LazyVim.pick("lsp_document_symbols", { symbols = { "Variable", "Parameter" } }), desc = "Variable" },
|
||||
{
|
||||
symbols_workspace_prefix .. "a",
|
||||
LazyVim.pick("lsp_dynamic_workspace_symbols", { symbols = { "Class", "Function", "Method", "Constructor", "Interface", "Module", "Struct", "Trait", "Field", "Property", "Enum", "Constant" } }),
|
||||
desc = "All",
|
||||
},
|
||||
{ symbols_workspace_prefix .. "c", LazyVim.pick("lsp_dynamic_workspace_symbols", { symbols = { "Class" } }), desc = "Class" },
|
||||
{ symbols_workspace_prefix .. "f", LazyVim.pick("lsp_dynamic_workspace_symbols", { symbols = { "Function" } }), desc = "Function" },
|
||||
{ symbols_workspace_prefix .. "m", LazyVim.pick("lsp_dynamic_workspace_symbols", { symbols = { "Method" } }), desc = "Method" },
|
||||
{ symbols_workspace_prefix .. "C", LazyVim.pick("lsp_dynamic_workspace_symbols", { symbols = { "Constructor" } }), desc = "Constructor" },
|
||||
{ symbols_workspace_prefix .. "e", LazyVim.pick("lsp_dynamic_workspace_symbols", { symbols = { "Enum" } }), desc = "Enum" },
|
||||
{ symbols_workspace_prefix .. "i", LazyVim.pick("lsp_dynamic_workspace_symbols", { symbols = { "Interface" } }), desc = "Interface" },
|
||||
{ symbols_workspace_prefix .. "M", LazyVim.pick("lsp_dynamic_workspace_symbols", { symbols = { "Module" } }), desc = "Module" },
|
||||
{ symbols_workspace_prefix .. "s", LazyVim.pick("lsp_dynamic_workspace_symbols", { symbols = { "Struct" } }), desc = "Struct" },
|
||||
{ symbols_workspace_prefix .. "t", LazyVim.pick("lsp_dynamic_workspace_symbols", { symbols = { "Trait" } }), desc = "Trait" },
|
||||
{ symbols_workspace_prefix .. "F", LazyVim.pick("lsp_dynamic_workspace_symbols", { symbols = { "Field" } }), desc = "Field" },
|
||||
{ symbols_workspace_prefix .. "p", LazyVim.pick("lsp_dynamic_workspace_symbols", { symbols = { "Property" } }), desc = "Property" },
|
||||
{ symbols_workspace_prefix .. "v", LazyVim.pick("lsp_dynamic_workspace_symbols", { symbols = { "Variable", "Parameter" } }), desc = "Variable" },
|
||||
{ "<leader>sA", LazyVim.pick("treesitter"), desc = "Treesitter Symbols" },
|
||||
{ "<leader>sP", "<cmd>Telescope builtin<cr>", desc = "Pickers (Telescope)" },
|
||||
{ "<leader>fh", LazyVim.pick("find_files", { hidden = true }), desc = "Find Files (hidden)" },
|
||||
{ "<leader><c-space>", LazyVim.pick("find_files", { hidden = true }), desc = "Find Files (hidden)" },
|
||||
{ "<leader>gb", "<cmd>Telescope git_branches<cr>", desc = "Branches" },
|
||||
{ "<leader>S", "<cmd>Telescope spell_suggest<cr>", desc = "Spelling" },
|
||||
{ "<leader>gs", false },
|
||||
},
|
||||
opts = {
|
||||
defaults = {
|
||||
mappings = {
|
||||
i = {
|
||||
["<C-k>"] = actions.move_selection_previous,
|
||||
["<C-j>"] = actions.move_selection_next,
|
||||
["<S-esc>"] = actions.close,
|
||||
["<C-p>"] = require("telescope.actions.layout").toggle_preview,
|
||||
["<c-l>"] = require("telescope.actions.layout").cycle_layout_next,
|
||||
["<a-l>"] = require("telescope.actions.layout").cycle_layout_prev,
|
||||
["<C-Down>"] = actions.cycle_history_next,
|
||||
["<C-Up>"] = actions.cycle_history_prev,
|
||||
["<C-Tab>"] = require("telescope.actions").select_tab_drop,
|
||||
["<M-h>"] = require("telescope.actions").results_scrolling_left,
|
||||
["<M-l>"] = require("telescope.actions").results_scrolling_right,
|
||||
},
|
||||
},
|
||||
file_ignore_patterns = {
|
||||
".gitignore",
|
||||
"node_modules",
|
||||
"build",
|
||||
"dist",
|
||||
"yarn.lock",
|
||||
"*.git/*",
|
||||
"*/tmp/*",
|
||||
},
|
||||
},
|
||||
pickers = {
|
||||
find_files = {
|
||||
hidden = false,
|
||||
},
|
||||
buffers = {
|
||||
layout_config = {
|
||||
height = 0.7,
|
||||
width = 0.7,
|
||||
},
|
||||
mappings = {
|
||||
i = {
|
||||
["<c-r>"] = require("telescope.actions").delete_buffer,
|
||||
},
|
||||
},
|
||||
},
|
||||
spell_suggest = {
|
||||
layout_config = {
|
||||
prompt_position = "top",
|
||||
height = 0.3,
|
||||
width = 0.25,
|
||||
},
|
||||
sorting_strategy = "ascending",
|
||||
},
|
||||
},
|
||||
extensions = {
|
||||
fzf = {
|
||||
fuzzy = true,
|
||||
override_generic_sorter = true,
|
||||
override_file_sorter = true,
|
||||
case_mode = "smart_case",
|
||||
},
|
||||
["ui-select"] = {
|
||||
require("telescope.themes").get_dropdown({}),
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
"folke/which-key.nvim",
|
||||
opts = {
|
||||
spec = {
|
||||
{ symbols_prefix, group = "goto symbols", icon = " " },
|
||||
{ symbols_workspace_prefix, group = "goto symbols (Workspace)", icon = " " },
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
25
nvim/lua/plugins/extras/editor/telescope/undotree.lua
Normal file
25
nvim/lua/plugins/extras/editor/telescope/undotree.lua
Normal file
@@ -0,0 +1,25 @@
|
||||
return {
|
||||
{
|
||||
"debugloop/telescope-undo.nvim",
|
||||
opts = {},
|
||||
config = function()
|
||||
LazyVim.on_load("telescope.nvim", function()
|
||||
require("telescope").setup({
|
||||
extensions = {
|
||||
undo = {
|
||||
side_by_side = true,
|
||||
layout_strategy = "vertical",
|
||||
layout_config = {
|
||||
preview_height = 0.6,
|
||||
},
|
||||
},
|
||||
},
|
||||
})
|
||||
require("telescope").load_extension("undo")
|
||||
end)
|
||||
end,
|
||||
keys = {
|
||||
{ "<leader>su", "<cmd>Telescope undo<cr>", desc = "Undos" },
|
||||
},
|
||||
},
|
||||
}
|
||||
9
nvim/lua/plugins/extras/editor/telescope/urlview.lua
Normal file
9
nvim/lua/plugins/extras/editor/telescope/urlview.lua
Normal file
@@ -0,0 +1,9 @@
|
||||
return {
|
||||
"axieax/urlview.nvim",
|
||||
dependencies = { "nvim-telescope/telescope.nvim" },
|
||||
cmd = { "UrlView" },
|
||||
keys = { { "<leader>sU", "<cmd>UrlView<cr>", desc = "Search Urls" } },
|
||||
opts = {
|
||||
default_picker = "telescope",
|
||||
},
|
||||
}
|
||||
55
nvim/lua/plugins/extras/editor/telescope/workspaces.lua
Normal file
55
nvim/lua/plugins/extras/editor/telescope/workspaces.lua
Normal file
@@ -0,0 +1,55 @@
|
||||
return {
|
||||
{
|
||||
"natecraddock/workspaces.nvim",
|
||||
event = "VeryLazy",
|
||||
cmd = {
|
||||
"WorkspacesAdd",
|
||||
"WorkspacesAddDir",
|
||||
"WorkspacesRemove",
|
||||
"WorkspacesRename",
|
||||
"WorkspacesOpen",
|
||||
"WorkspacesList",
|
||||
"WorkspacesListDirs",
|
||||
},
|
||||
config = function()
|
||||
require("workspaces").setup({
|
||||
hooks = {
|
||||
open = { "Telescope find_files" },
|
||||
},
|
||||
})
|
||||
LazyVim.on_load("telescope.nvim", function()
|
||||
require("telescope").load_extension("workspaces")
|
||||
end)
|
||||
end,
|
||||
keys = {
|
||||
{ "<leader>fw", "<cmd>Telescope workspaces<cr>", desc = "Workspaces" },
|
||||
},
|
||||
},
|
||||
{
|
||||
"goolord/alpha-nvim",
|
||||
optional = true,
|
||||
opts = function(_, dashboard)
|
||||
local button = dashboard.button("w", " " .. " Workspaces", "<cmd>Telescope workspaces<CR>")
|
||||
button.opts.hl = "AlphaButtons"
|
||||
button.opts.hl_shortcut = "AlphaShortcut"
|
||||
table.insert(dashboard.section.buttons.val, 4, button)
|
||||
end,
|
||||
},
|
||||
{
|
||||
"nvimdev/dashboard-nvim",
|
||||
optional = true,
|
||||
opts = function(_, opts)
|
||||
local projects = {
|
||||
action = "Telescope workspaces",
|
||||
desc = " Workspaces",
|
||||
icon = " ",
|
||||
key = "w",
|
||||
}
|
||||
|
||||
projects.desc = projects.desc .. string.rep(" ", 43 - #projects.desc)
|
||||
projects.key_format = " %s"
|
||||
|
||||
table.insert(opts.config.center, 4, projects)
|
||||
end,
|
||||
},
|
||||
}
|
||||
53
nvim/lua/plugins/extras/editor/telescope/zoxide.lua
Normal file
53
nvim/lua/plugins/extras/editor/telescope/zoxide.lua
Normal file
@@ -0,0 +1,53 @@
|
||||
return {
|
||||
{
|
||||
"jvgrootveld/telescope-zoxide",
|
||||
config = function()
|
||||
LazyVim.on_load("telescope.nvim", function()
|
||||
require("telescope").setup({
|
||||
extensions = {
|
||||
zoxide = {
|
||||
mappings = {
|
||||
default = {
|
||||
after_action = function(selection)
|
||||
require("telescope.builtin").find_files({ cwd = selection.path })
|
||||
end,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
})
|
||||
require("telescope").load_extension("zoxide")
|
||||
end)
|
||||
end,
|
||||
keys = {
|
||||
{ "<leader>fz", "<cmd>Telescope zoxide list<CR>", desc = "Zoxide" },
|
||||
},
|
||||
},
|
||||
{
|
||||
"goolord/alpha-nvim",
|
||||
optional = true,
|
||||
opts = function(_, dashboard)
|
||||
local button = dashboard.button("z", " " .. " Zoxide", "<cmd>Telescope zoxide list <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 zoxide = {
|
||||
action = "Telescope zoxide list",
|
||||
desc = " Zoxide",
|
||||
icon = " ",
|
||||
key = "z",
|
||||
}
|
||||
|
||||
zoxide.desc = zoxide.desc .. string.rep(" ", 43 - #zoxide.desc)
|
||||
zoxide.key_format = " %s"
|
||||
|
||||
table.insert(opts.config.center, 4, zoxide)
|
||||
end,
|
||||
},
|
||||
}
|
||||
57
nvim/lua/plugins/extras/editor/terminal/floaterm.lua
Normal file
57
nvim/lua/plugins/extras/editor/terminal/floaterm.lua
Normal file
@@ -0,0 +1,57 @@
|
||||
return {
|
||||
{
|
||||
"voldikss/vim-floaterm",
|
||||
cmd = { "FloatermNew", "FloatermToggle", "FloatermNext", "FloatermPrev", "FloatermLast", "FloatermFirst" },
|
||||
--stylua: ignore
|
||||
keys = {
|
||||
{ "<A-e>", "<cmd>FloatermNew --disposable --name=yaziroot --opener=edit --titleposition=center --height=0.85 --width=0.85 --cwd=<root> yazi<CR>", desc = "Yazi" },
|
||||
{ "<leader>gg", "<cmd>FloatermNew --name=lazygitroot --opener=edit --titleposition=center --height=0.85 --width=0.85 --cwd=<root> lazygit<CR>", desc = "Lazygit (root dir)" },
|
||||
{ "<leader>gG", "<cmd>FloatermNew --name=lazygitbuffer --opener=edit --titleposition=center --height=0.85 --width=0.85 --cwd=<buffer> lazygit<CR>", desc = "Lazygit (cwd)" },
|
||||
{ "<leader>cen", "<cmd>FloatermNew --name=node --opener=edit --titleposition=center --wintype=split --height=0.35 node<CR>", desc = "Node" },
|
||||
{ "<leader>cep", "<cmd>FloatermNew --name=python --opener=edit --titleposition=center --wintype=split --height=0.35 python<CR>", desc = "Python" },
|
||||
{ "<S-Right>", "<Esc><Esc><cmd>FloatermNext<CR>", mode = { "t" }, desc = "Next Terminal" },
|
||||
{ "<S-Left>", "<Esc><Esc><cmd>FloatermPrev<CR>", mode = { "t" }, desc = "Prev Terminal" },
|
||||
{ "<A-Right>", "<Esc><Esc><cmd>FloatermLast<CR>", mode = { "t" }, desc = "Last Terminal" },
|
||||
{ "<A-Left>", "<Esc><Esc><cmd>FloatermFirst<CR>", mode = { "t" }, desc = "First Terminal" },
|
||||
{ [[<c-\>]], "<cmd>FloatermToggle<cr>", mode = { "n", "t" }, desc = "Toggle Terminal" },
|
||||
{ "<leader>ftf", "<cmd>FloatermNew --name=floatroot --opener=edit --titleposition=center --height=0.85 --width=0.85 --cwd=<root><cr>", desc = "Floating (root dir)" },
|
||||
{ "<leader>ftF", "<cmd>FloatermNew --name=floatbuffer --opener=edit --titleposition=center --height=0.85 --width=0.85 --cwd=<buffer><cr>", desc = "Floating (cwd)" },
|
||||
{ "<leader>fts", "<cmd>FloatermNew --name=splitroot --opener=edit --titleposition=center --height=0.35 --wintype=split --cwd=<root><cr>", desc = "Split (root dir)" },
|
||||
{ "<leader>ftS", "<cmd>FloatermNew --name=splitbuffer --opener=edit --titleposition=center --height=0.35 --wintype=split --cwd=<buffer><cr>", desc = "Split (cwd)" },
|
||||
},
|
||||
},
|
||||
{
|
||||
"dawsers/telescope-floaterm.nvim",
|
||||
config = function()
|
||||
LazyVim.on_load("telescope.nvim", function()
|
||||
require("telescope").load_extension("floaterm")
|
||||
end)
|
||||
end,
|
||||
keys = {
|
||||
{ [[<A-\>]], "<cmd>Telescope floaterm<cr>", desc = "Terminals" },
|
||||
},
|
||||
},
|
||||
{
|
||||
"folke/which-key.nvim",
|
||||
opts = {
|
||||
spec = {
|
||||
{ "<leader>ce", group = "r[e]pl", icon = " " },
|
||||
{ "<leader>ft", group = "terminals", icon = " " },
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
"folke/edgy.nvim",
|
||||
optional = true,
|
||||
opts = function(_, opts)
|
||||
table.insert(opts.bottom, {
|
||||
ft = "floaterm",
|
||||
title = "Floaterm",
|
||||
size = { height = 0.4 },
|
||||
filter = function(buf, win)
|
||||
return vim.api.nvim_win_get_config(win).relative == ""
|
||||
end,
|
||||
})
|
||||
end,
|
||||
},
|
||||
}
|
||||
58
nvim/lua/plugins/extras/editor/terminal/toggleterm.lua
Normal file
58
nvim/lua/plugins/extras/editor/terminal/toggleterm.lua
Normal file
@@ -0,0 +1,58 @@
|
||||
return {
|
||||
{
|
||||
"akinsho/toggleterm.nvim",
|
||||
cmd = {
|
||||
"ToggleTerm",
|
||||
"ToggleTermSetName",
|
||||
"ToggleTermToggleAll",
|
||||
"ToggleTermSendVisualLines",
|
||||
"ToggleTermSendCurrentLine",
|
||||
"ToggleTermSendVisualSelection",
|
||||
},
|
||||
opts = {
|
||||
size = function(term)
|
||||
if term.direction == "horizontal" then
|
||||
return 30
|
||||
elseif term.direction == "vertical" then
|
||||
return vim.o.columns * 0.4
|
||||
end
|
||||
end,
|
||||
open_mapping = [[<c-\>]],
|
||||
hide_numbers = true, -- hide the number column in toggleterm buffers
|
||||
shade_filetypes = {},
|
||||
shade_terminals = true, -- NOTE: this option takes priority over highlights specified so if you specify Normal highlights you should set this to false
|
||||
shading_factor = "-10", -- the percentage by which to lighten terminal background, default: -30 (gets multiplied by -3 if background is light)
|
||||
start_in_insert = true,
|
||||
insert_mappings = true, -- whether or not the open mapping applies in insert mode
|
||||
terminal_mappings = true, -- whether or not the open mapping applies in the opened terminals
|
||||
persist_size = true,
|
||||
persist_mode = true, -- if set to true (default) the previous terminal mode will be remembered
|
||||
direction = "float",
|
||||
close_on_exit = true, -- close the terminal window when the process exits
|
||||
-- Change the default shell. Can be a string or a function returning a string
|
||||
shell = vim.o.shell,
|
||||
-- This field is only relevant if direction is set to 'float'
|
||||
float_opts = {
|
||||
-- The border key is *almost* the same as 'nvim_open_win'
|
||||
-- see :h nvim_open_win for details on borders however
|
||||
-- the 'curved' border is a custom border type
|
||||
-- not natively supported but implemented in this plugin.
|
||||
border = "curved",
|
||||
-- like `size`, width and height can be a number or function which is passed the current terminal
|
||||
highlights = { border = "Normal", background = "Normal" },
|
||||
winblend = 3,
|
||||
},
|
||||
},
|
||||
-- stylua: ignore
|
||||
keys = {
|
||||
{ [[<c-\>]], "<cmd>ToggleTerm<cr>", mode = "n", desc = "Toggle Terminal" },
|
||||
},
|
||||
},
|
||||
{
|
||||
"ryanmsnyder/toggleterm-manager.nvim",
|
||||
opts = {},
|
||||
keys = {
|
||||
{ "<c-/>", "<cmd>Telescope toggleterm_manager<cr>", desc = "Terminals" },
|
||||
},
|
||||
},
|
||||
}
|
||||
41
nvim/lua/plugins/extras/editor/treesitter-playground.lua
Normal file
41
nvim/lua/plugins/extras/editor/treesitter-playground.lua
Normal file
@@ -0,0 +1,41 @@
|
||||
if vim.fn.has("nvim-0.10") == 1 then
|
||||
return {
|
||||
{
|
||||
"nvim-treesitter/playground",
|
||||
dependencies = {
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
build = ":TSInstall query",
|
||||
opts = {
|
||||
playground = {
|
||||
enable = true,
|
||||
},
|
||||
query_linter = {
|
||||
enable = true,
|
||||
use_virtual_text = true,
|
||||
lint_events = { "BufWrite", "CursorHold" },
|
||||
},
|
||||
},
|
||||
},
|
||||
keys = {
|
||||
{ "<leader>ciT", "<Cmd>TSHighlightCapturesUnderCursor<CR>", desc = "Treesitter Highlight Groups" },
|
||||
{ "<leader>cit", "<Cmd>TSPlaygroundToggle<CR>", desc = "Treesitter Playground" },
|
||||
},
|
||||
},
|
||||
{
|
||||
"folke/edgy.nvim",
|
||||
optional = true,
|
||||
opts = function(_, opts)
|
||||
opts.right = opts.right or {}
|
||||
table.insert(opts.right, {
|
||||
title = "TS Playground",
|
||||
ft = "tsplayground",
|
||||
pinned = true,
|
||||
open = "TSPlaygroundToggle",
|
||||
size = { width = 0.3 },
|
||||
})
|
||||
end,
|
||||
},
|
||||
}
|
||||
else
|
||||
LazyVim.notify("Treesitter Playground only works with the nightly build", { title = "Treesitter Playground" })
|
||||
end
|
||||
23
nvim/lua/plugins/extras/editor/trouble-extended.lua
Normal file
23
nvim/lua/plugins/extras/editor/trouble-extended.lua
Normal file
@@ -0,0 +1,23 @@
|
||||
return {
|
||||
"folke/trouble.nvim",
|
||||
opts = {
|
||||
keys = {
|
||||
e = "jump",
|
||||
l = "fold_open",
|
||||
L = "fold_open_recursive",
|
||||
h = "fold_close",
|
||||
H = "fold_close_recursive",
|
||||
},
|
||||
modes = {
|
||||
test = {
|
||||
mode = "diagnostics",
|
||||
preview = {
|
||||
type = "split",
|
||||
relative = "win",
|
||||
position = "right",
|
||||
size = 0.3,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
6
nvim/lua/plugins/extras/editor/winshift.lua
Normal file
6
nvim/lua/plugins/extras/editor/winshift.lua
Normal file
@@ -0,0 +1,6 @@
|
||||
return {
|
||||
"sindrets/winshift.nvim",
|
||||
cmd = "WinShift",
|
||||
opts = { highlight_moving_win = true },
|
||||
keys = { { "<leader>ws", "<CMD>WinShift<CR>", desc = "Win Shift/Swap" } },
|
||||
}
|
||||
Reference in New Issue
Block a user