This commit is contained in:
2025-08-13 21:46:48 +02:00
commit c3e2e6509b
818 changed files with 54187 additions and 0 deletions

22
nvim/.github/README.md vendored Normal file
View File

@@ -0,0 +1,22 @@
<div align="center">
<a href="#"><img src="./title.png"></a>
</div>
<div align="center">
<img src="https://raw.githubusercontent.com/catppuccin/catppuccin/main/assets/palette/macchiato.png" width="90%"/><br>
</div>
<div align="center">
<a href="https://dotfiles-docs.vercel.app/app-confs/neovim.html#about"><img width="190px" src="https://raw.githubusercontent.com/Matt-FTW/dotfiles/main/.github/assets/category-images/dotfiles-about.png"></a>
<a href="https://dotfiles-docs.vercel.app/app-confs/neovim.html#setup"><img width="190px" src="https://raw.githubusercontent.com/Matt-FTW/dotfiles/main/.github/assets/category-images/dotfiles-setup.png"></a>
<a href="https://dotfiles-docs.vercel.app/app-confs/neovim.html#gallery"><img width="190px" src="https://raw.githubusercontent.com/Matt-FTW/dotfiles/main/.github/assets/category-images/dotfiles-gallery.png"></a>
</div>
<br>
> [!NOTE]
> All the information about the neovim setup is on the documentation website: https://dotfiles-docs.vercel.app/app-confs/neovim.html

BIN
nvim/.github/assets/actions-preview.png vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 64 KiB

BIN
nvim/.github/assets/breadcrumbs.png vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.2 KiB

BIN
nvim/.github/assets/bufferline.png vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

BIN
nvim/.github/assets/cmp-2.png vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 36 KiB

BIN
nvim/.github/assets/cmp.png vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 41 KiB

BIN
nvim/.github/assets/dashboard.png vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 40 KiB

BIN
nvim/.github/assets/diff-history.png vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 312 KiB

BIN
nvim/.github/assets/dressing.png vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 38 KiB

BIN
nvim/.github/assets/find-files.png vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 206 KiB

BIN
nvim/.github/assets/floaterm-float.png vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 33 KiB

BIN
nvim/.github/assets/live-grep.png vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 196 KiB

BIN
nvim/.github/assets/lualine.png vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

BIN
nvim/.github/assets/neo-tree.png vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 59 KiB

BIN
nvim/.github/assets/notify-error.png vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 87 KiB

BIN
nvim/.github/assets/notify-info.png vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

BIN
nvim/.github/assets/notify-warning.png vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

BIN
nvim/.github/assets/outline.png vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 66 KiB

BIN
nvim/.github/assets/trouble.png vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 129 KiB

BIN
nvim/.github/assets/which-key.png vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 61 KiB

BIN
nvim/.github/title.png vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

15
nvim/.neoconf.json Normal file
View File

@@ -0,0 +1,15 @@
{
"neodev": {
"library": {
"enabled": true,
"plugins": true
}
},
"neoconf": {
"plugins": {
"lua_ls": {
"enabled": true
}
}
}
}

View File

@@ -0,0 +1,16 @@
-- Automatically end a self-closing tag when pressing /
vim.keymap.set("i", "/", function()
local node = vim.treesitter.get_node()
if not node then
return "/"
end
if node:type() == "jsx_opening_element" then
local char_at_cursor = vim.fn.strcharpart(vim.fn.strpart(vim.fn.getline("."), vim.fn.col(".") - 2), 0, 1)
local already_have_space = char_at_cursor == " "
return already_have_space and "/>" or " />"
end
return "/"
end, { expr = true, buffer = true })

View File

@@ -0,0 +1,11 @@
-- When creating a new line with o, make sure there is a trailing comma on the current line
vim.keymap.set("n", "o", function()
local line = vim.api.nvim_get_current_line()
local should_add_comma = string.find(line, "[^,{[]$")
if should_add_comma then
return "A,<cr>"
else
return "o"
end
end, { buffer = true, expr = true })

View File

@@ -0,0 +1,11 @@
-- When creating a new line with o, make sure there is a trailing comma on the current line
vim.keymap.set("n", "o", function()
local line = vim.api.nvim_get_current_line()
local should_add_comma = string.find(line, "[^,{[]$")
if should_add_comma then
return "A,<cr>"
else
return "o"
end
end, { buffer = true, expr = true })

View File

@@ -0,0 +1,11 @@
vim.keymap.set({ "n", "x" }, "]#", [[/^#\+ .*<CR>]], { desc = "Next Heading", buffer = true })
vim.keymap.set({ "n", "x" }, "[#", [[?^#\+ .*<CR>]], { desc = "Prev Heading", buffer = true })
-- stylua: ignore start
if LazyVim.has("markdowny.nvim") then
vim.keymap.set("v", "<C-b>", function() require('markdowny').bold() end, { buffer = 0 })
vim.keymap.set("v", "<C-i>", function() require('markdowny').italic() end, { buffer = 0 })
vim.keymap.set("v", "<C-k>", function() require('markdowny').link() end, { buffer = 0 })
vim.keymap.set("v", "<C-e>", function() require('markdowny').code() end, { buffer = 0 })
end
-- stylua: ignore end

View File

@@ -0,0 +1,16 @@
-- Automatically end a self-closing tag when pressing /
vim.keymap.set("i", "/", function()
local node = vim.treesitter.get_node()
if not node then
return "/"
end
if node:type() == "jsx_opening_element" then
local char_at_cursor = vim.fn.strcharpart(vim.fn.strpart(vim.fn.getline("."), vim.fn.col(".") - 2), 0, 1)
local already_have_space = char_at_cursor == " "
return already_have_space and "/>" or " />"
end
return "/"
end, { expr = true, buffer = true })

4948
nvim/dotfyle.json Normal file

File diff suppressed because it is too large Load Diff

2
nvim/init.lua Normal file
View File

@@ -0,0 +1,2 @@
-- bootstrap lazy.nvim, LazyVim and your plugins
require("config.lazy")

57
nvim/lazy-lock.json Normal file
View File

@@ -0,0 +1,57 @@
{
"LazyVim": { "branch": "main", "commit": "25abbf546d564dc484cf903804661ba12de45507" },
"SchemaStore.nvim": { "branch": "main", "commit": "c957914d75b4a008ce09f4116e57e59fe6e3fae1" },
"autolist.nvim": { "branch": "main", "commit": "5f70a5f99e96c8fe3069de042abd2a8ed2deb855" },
"blink.cmp": { "branch": "main", "commit": "586ee87534f5bf65f1c8dea2d1da2a57e8cddd36" },
"bufferline.nvim": { "branch": "main", "commit": "655133c3b4c3e5e05ec549b9f8cc2894ac6f51b3" },
"catppuccin": { "branch": "main", "commit": "fa42eb5e26819ef58884257d5ae95dd0552b9a66" },
"conform.nvim": { "branch": "master", "commit": "973f3cb73887d510321653044791d7937c7ec0fa" },
"dial.nvim": { "branch": "master", "commit": "78bd73aaf2b9c8f80715a878feaf56f7ffa8b6ff" },
"diffview.nvim": { "branch": "main", "commit": "4516612fe98ff56ae0415a259ff6361a89419b0a" },
"edgy.nvim": { "branch": "main", "commit": "7e8dedc39abebe40c289b8012cc89b11c69aa7a0" },
"flash.nvim": { "branch": "main", "commit": "3c942666f115e2811e959eabbdd361a025db8b63" },
"friendly-snippets": { "branch": "main", "commit": "572f5660cf05f8cd8834e096d7b4c921ba18e175" },
"gitsigns.nvim": { "branch": "main", "commit": "0cb5a7753d3c4b8e9cfdc9d88d9110cb8d4b1544" },
"grapple.nvim": { "branch": "main", "commit": "b41ddfc1c39f87f3d1799b99c2f0f1daa524c5f7" },
"grug-far.nvim": { "branch": "main", "commit": "45981a9af7f4e666a3cdaedb1d21d2ab926727a2" },
"lazy.nvim": { "branch": "main", "commit": "6c3bda4aca61a13a9c63f1c1d1b16b9d3be90d7a" },
"lazydev.nvim": { "branch": "main", "commit": "2367a6c0a01eb9edb0464731cc0fb61ed9ab9d2c" },
"lualine.nvim": { "branch": "master", "commit": "a94fc68960665e54408fe37dcf573193c4ce82c9" },
"markdown-preview.nvim": { "branch": "master", "commit": "a923f5fc5ba36a3b17e289dc35dc17f66d0548ee" },
"mason-lspconfig.nvim": { "branch": "main", "commit": "1a31f824b9cd5bc6f342fc29e9a53b60d74af245" },
"mason.nvim": { "branch": "main", "commit": "fc98833b6da5de5a9c5b1446ac541577059555be" },
"mini.ai": { "branch": "main", "commit": "6a8e0b151d39b293cfa483cdea785e448c2e0e11" },
"mini.icons": { "branch": "main", "commit": "94848dad1589a199f876539bd79befb0c5e3abf0" },
"mini.pairs": { "branch": "main", "commit": "42407ccb80ec59c84e7c91d815f42ed90a8cc093" },
"mini.surround": { "branch": "main", "commit": "d510a830e81a1b436e821c9a038eefb314b58b5d" },
"neo-tree.nvim": { "branch": "main", "commit": "8c6349bceb1d8a863964dd25dc7944d588a56aaa" },
"noice.nvim": { "branch": "main", "commit": "0427460c2d7f673ad60eb02b35f5e9926cf67c59" },
"nui.nvim": { "branch": "main", "commit": "de740991c12411b663994b2860f1a4fd0937c130" },
"nvim-highlight-colors": { "branch": "main", "commit": "b42a5ccec7457b44e89f7ed3b3afb1b375bb2093" },
"nvim-jqx": { "branch": "master", "commit": "07393e80fa8097e82f9038fec05e948fe8a60fd1" },
"nvim-lint": { "branch": "master", "commit": "3c5e34c24834a67b1cb37600ab7663eefd2b0390" },
"nvim-lspconfig": { "branch": "master", "commit": "dbfd8da6206b4ab0e2fe9b72a538f82e2b410102" },
"nvim-treesitter": { "branch": "master", "commit": "42fc28ba918343ebfd5565147a42a26580579482" },
"nvim-treesitter-textobjects": { "branch": "master", "commit": "89ebe73cd2836db80a22d9748999ace0241917a5" },
"nvim-ts-autotag": { "branch": "main", "commit": "a1d526af391f6aebb25a8795cbc05351ed3620b5" },
"nvim_context_vt": { "branch": "master", "commit": "4ee3f8fe1b3aacacd31eaf77378dffcad0ff9465" },
"persistence.nvim": { "branch": "main", "commit": "166a79a55bfa7a4db3e26fc031b4d92af71d0b51" },
"plenary.nvim": { "branch": "master", "commit": "857c5ac632080dba10aae49dba902ce3abf91b35" },
"py-requirements.nvim": { "branch": "main", "commit": "b30abd4a879c06669bf744630f81627d4cdec6a9" },
"refactoring.nvim": { "branch": "master", "commit": "74b608dfee827c2372250519d433cc21cb083407" },
"render-markdown.nvim": { "branch": "main", "commit": "12d951dfe3c884063e874bdfc0b4c86e0843237c" },
"smart-splits.nvim": { "branch": "master", "commit": "c2744fd80d4735134f96f50acaccc4fa9f48d6cb" },
"snacks.nvim": { "branch": "main", "commit": "bc0630e43be5699bb94dadc302c0d21615421d93" },
"suda.vim": { "branch": "master", "commit": "9adda7d195222d4e2854efb2a88005a120296c47" },
"todo-comments.nvim": { "branch": "main", "commit": "304a8d204ee787d2544d8bc23cd38d2f929e7cc5" },
"tokyonight.nvim": { "branch": "main", "commit": "057ef5d260c1931f1dffd0f052c685dcd14100a3" },
"trouble.nvim": { "branch": "main", "commit": "85bedb7eb7fa331a2ccbecb9202d8abba64d37b3" },
"ts-comments.nvim": { "branch": "main", "commit": "1bd9d0ba1d8b336c3db50692ffd0955fe1bb9f0c" },
"ts-error-translator.nvim": { "branch": "main", "commit": "47e5ba89f71b9e6c72eaaaaa519dd59bd6897df4" },
"ts-node-action": { "branch": "master", "commit": "b0850ecd82a508ad846ba250ea13485b0e13321e" },
"tsc.nvim": { "branch": "main", "commit": "8c1b4ec6a48d038a79ced8674cb15e7db6dd8ef0" },
"vim-wakatime": { "branch": "master", "commit": "f39c4a201ae350aaba713b59d4a4fdd88e0811aa" },
"which-key.nvim": { "branch": "main", "commit": "370ec46f710e058c9c1646273e6b225acf47cbed" },
"yanky.nvim": { "branch": "main", "commit": "04775cc6e10ef038c397c407bc17f00a2f52b378" },
"yazi.nvim": { "branch": "main", "commit": "d293ec2611356e98d59f03bc3da191c9da23afde" }
}

43
nvim/lazyvim.json Normal file
View File

@@ -0,0 +1,43 @@
{
"extras": [
"lazyvim.plugins.extras.coding.mini-surround",
"lazyvim.plugins.extras.editor.dial",
"lazyvim.plugins.extras.editor.refactoring",
"lazyvim.plugins.extras.util.dot",
"plugins.extras.coding.blink-extended",
"plugins.extras.coding.treesitter.node-action",
"plugins.extras.coding.yanky-extended",
"plugins.extras.editor.flash-extended",
"plugins.extras.editor.git.diffview",
"plugins.extras.editor.gitsigns-extended",
"plugins.extras.editor.marks.grapple",
"plugins.extras.editor.suda",
"plugins.extras.editor.trouble-extended",
"plugins.extras.formatting.prettier-extended",
"plugins.extras.lang.markdown-extended",
"plugins.extras.lang.python-extended",
"plugins.extras.lang.web.html-css",
"plugins.extras.lang.web.typescript-extended",
"plugins.extras.linting.eslint-extended",
"plugins.extras.lsp.lspconfig-extended",
"plugins.extras.lsp.mason-extended",
"plugins.extras.ui.bufferline-extended",
"plugins.extras.ui.colorschemes.catppuccin",
"plugins.extras.ui.context",
"plugins.extras.ui.edgy-extended",
"plugins.extras.ui.highlight-colors",
"plugins.extras.ui.lualine-extended",
"plugins.extras.ui.noice-extended",
"plugins.extras.ui.which-key-extended",
"plugins.extras.util.persistence-extended",
"plugins.extras.util.smart-splits",
"plugins.extras.util.snacks-extended",
"plugins.extras.util.wakatime",
"plugins.extras.util.yazi"
],
"install_version": 7,
"news": {
"NEWS.md": "10960"
},
"version": 8
}

View File

@@ -0,0 +1,127 @@
local ac = vim.api.nvim_create_autocmd
local ag = vim.api.nvim_create_augroup
-- Disable diagnostics in a .env file
ac("BufRead", {
pattern = ".env",
callback = function()
vim.diagnostic.disable(false)
end,
})
local auto_close_filetype = {
"lazy",
"mason",
"lspinfo",
"toggleterm",
"null-ls-info",
"TelescopePrompt",
"notify",
}
-- Auto close window when leaving
ac("BufLeave", {
group = ag("lazyvim_auto_close_win", { clear = true }),
callback = function(event)
local ft = vim.api.nvim_buf_get_option(event.buf, "filetype")
if vim.fn.index(auto_close_filetype, ft) ~= -1 then
local winids = vim.fn.win_findbuf(event.buf)
for _, win in pairs(winids) do
vim.api.nvim_win_close(win, true)
end
end
end,
})
-- Disable leader and localleader for some filetypes
ac("FileType", {
group = ag("lazyvim_unbind_leader_key", { clear = true }),
pattern = {
"lazy",
"mason",
"lspinfo",
"toggleterm",
"null-ls-info",
"neo-tree-popup",
"TelescopePrompt",
"notify",
"floaterm",
},
callback = function(event)
vim.keymap.set("n", "<leader>", "<nop>", { buffer = event.buf, desc = "" })
vim.keymap.set("n", "<localleader>", "<nop>", { buffer = event.buf, desc = "" })
end,
})
-- Delete number column on terminals
ac("TermOpen", {
callback = function()
vim.cmd("setlocal listchars= nonumber norelativenumber")
vim.cmd("setlocal nospell")
end,
})
-- Disable next line comments
ac("BufEnter", {
callback = function()
vim.cmd("set formatoptions-=cro")
vim.cmd("setlocal formatoptions-=cro")
end,
})
-- Disable eslint on node_modules
ac({ "BufNewFile", "BufRead" }, {
group = ag("DisableEslintOnNodeModules", { clear = true }),
pattern = { "**/node_modules/**", "node_modules", "/node_modules/*" },
callback = function()
vim.diagnostic.disable(false)
end,
})
-- Toggle between relative/absolute line numbers
local numbertoggle = ag("numbertoggle", { clear = true })
ac({ "BufEnter", "FocusGained", "InsertLeave", "CmdlineLeave", "WinEnter" }, {
pattern = "*",
group = numbertoggle,
callback = function()
if vim.o.nu and vim.api.nvim_get_mode().mode ~= "i" then
vim.opt.relativenumber = true
end
end,
})
ac({ "BufLeave", "FocusLost", "InsertEnter", "CmdlineEnter", "WinLeave" }, {
pattern = "*",
group = numbertoggle,
callback = function()
if vim.o.nu then
vim.opt.relativenumber = false
vim.cmd.redraw()
end
end,
})
-- Create a dir when saving a file if it doesnt exist
ac("BufWritePre", {
group = ag("auto_create_dir", { clear = true }),
callback = function(args)
if args.match:match("^%w%w+://") then
return
end
local file = vim.uv.fs_realpath(args.match) or args.match
vim.fn.mkdir(vim.fn.fnamemodify(file, ":p:h"), "p")
end,
})
-- Toggle lazygit instead of closing
ac("TermOpen", {
pattern = "*",
callback = function()
local term_title = vim.b.term_title
if term_title and term_title:match("lazygit") then
-- Create lazygit specific mappings
vim.keymap.set("t", "q", "<cmd>close<cr>", { buffer = true })
end
end,
})

248
nvim/lua/config/keymaps.lua Normal file
View File

@@ -0,0 +1,248 @@
local map = vim.keymap.set
local o = vim.opt
local lazy = require("lazy")
-- Search current word
local searching_brave = function()
vim.fn.system({ "xdg-open", "https://search.brave.com/search?q=" .. vim.fn.expand("<cword>") })
end
map("n", "<leader>?", searching_brave, { noremap = true, silent = true, desc = "Search Current Word on Brave Search" })
-- Lazy options
map("n", "<leader>l", "<Nop>")
map("n", "<leader>ll", "<cmd>Lazy<cr>", { desc = "Lazy" })
-- stylua: ignore start
map("n", "<leader>ld", function() vim.fn.system({ "xdg-open", "https://lazyvim.org" }) end, { desc = "LazyVim Docs" })
map("n", "<leader>lr", function() vim.fn.system({ "xdg-open", "https://github.com/LazyVim/LazyVim" }) end, { desc = "LazyVim Repo" })
map("n", "<leader>lx", "<cmd>LazyExtras<cr>", { desc = "Extras" })
map("n", "<leader>lc", function() LazyVim.news.changelog() end, { desc = "LazyVim Changelog" })
map("n", "<leader>lu", function() lazy.update() end, { desc = "Lazy Update" })
map("n", "<leader>lC", function() lazy.check() end, { desc = "Lazy Check" })
map("n", "<leader>ls", function() lazy.sync() end, { desc = "Lazy Sync" })
-- stylua: ignore end
-- Disable LazyVim bindings
map("n", "<leader>L", "<Nop>")
map("n", "<leader>fT", "<Nop>")
-- Identation
map("n", "<", "<<", { desc = "Deindent" })
map("n", ">", ">>", { desc = "Indent" })
-- Save without formatting
map("n", "<A-s>", "<cmd>noautocmd w<CR>", { desc = "Save Without Formatting" })
-- Cursor navigation on insert mode
map("i", "<M-h>", "<left>", { desc = "Move Cursor Left" })
map("i", "<M-l>", "<right>", { desc = "Move Cursor Left" })
map("i", "<M-j>", "<down>", { desc = "Move Cursor Left" })
map("i", "<M-k>", "<up>", { desc = "Move Cursor Left" })
-- End of the word backwards
map("n", "E", "ge")
-- Increment/decrement
map("n", "+", "<C-a>")
map("n", "-", "<C-x>")
-- Tabs
map("n", "]<tab>", "<cmd>tabnext<cr>", { desc = "Next Tab" })
map("n", "[<tab>", "<cmd>tabprevious<cr>", { desc = "Previous Tab" })
map("n", "<tab>", "<cmd>tabnext<cr>", { desc = "Next Tab" })
map("n", "<s-tab>", "<cmd>tabprevious<cr>", { desc = "Previous Tab" })
for i = 1, 9 do
map("n", "<leader><tab>" .. i, "<cmd>tabn " .. i .. "<cr>", { desc = "Tab " .. i })
end
map("n", "<leader>f<tab>", function()
vim.ui.select(vim.api.nvim_list_tabpages(), {
prompt = "Select Tab:",
format_item = function(tabid)
local wins = vim.api.nvim_tabpage_list_wins(tabid)
local not_floating_win = function(winid)
return vim.api.nvim_win_get_config(winid).relative == ""
end
wins = vim.tbl_filter(not_floating_win, wins)
local bufs = {}
for _, win in ipairs(wins) do
local buf = vim.api.nvim_win_get_buf(win)
local buftype = vim.api.nvim_get_option_value("buftype", { buf = buf })
if buftype ~= "nofile" then
local fname = vim.api.nvim_buf_get_name(buf)
table.insert(bufs, vim.fn.fnamemodify(fname, ":t"))
end
end
local tabnr = vim.api.nvim_tabpage_get_number(tabid)
local cwd = string.format(" %8s: ", vim.fn.fnamemodify(vim.fn.getcwd(-1, tabnr), ":t"))
local is_current = vim.api.nvim_tabpage_get_number(0) == tabnr and "" or " "
return tabnr .. is_current .. cwd .. table.concat(bufs, ", ")
end,
}, function(tabid)
if tabid ~= nil then
vim.cmd(tabid .. "tabnext")
end
end)
end, { desc = "Tabs" })
-- Buffers
map("n", "<leader>bf", "<cmd>bfirst<cr>", { desc = "First Buffer" })
map("n", "<leader>ba", "<cmd>blast<cr>", { desc = "Last Buffer" })
map("n", "<leader>b<tab>", "<cmd>tabnew %<cr>", { desc = "Current Buffer in New Tab" })
-- Toggle statusline
map("n", "<leader>uS", function()
if o.laststatus:get() == 0 then
o.laststatus = 3
else
o.laststatus = 0
end
end, { desc = "Toggle Statusline" })
-- Comment box
map("n", "]/", "/\\S\\zs\\s*╭<CR>zt", { desc = "Next Block Comment" })
map("n", "[/", "?\\S\\zs\\s*╭<CR>zt", { desc = "Prev Block Comment" })
-- Plugin Info
map("n", "<leader>cif", "<cmd>LazyFormatInfo<cr>", { desc = "Formatting" })
map("n", "<leader>cic", "<cmd>ConformInfo<cr>", { desc = "Conform" })
local linters = function()
local linters_attached = require("lint").linters_by_ft[vim.bo.filetype]
local buf_linters = {}
if not linters_attached then
LazyVim.warn("No linters attached", { title = "Linter" })
return
end
for _, linter in pairs(linters_attached) do
table.insert(buf_linters, linter)
end
local unique_client_names = table.concat(buf_linters, ", ")
local linters = string.format("%s", unique_client_names)
LazyVim.notify(linters, { title = "Linter" })
end
map("n", "<leader>ciL", linters, { desc = "Lint" })
map("n", "<leader>cir", "<cmd>LazyRoot<cr>", { desc = "Root" })
-- U for redo
map("n", "U", "<C-r>", { desc = "Redo" })
-- Copy whole text to clipboard
map("n", "<C-c>", ":%y+<CR>", { desc = "Copy Whole Text to Clipboard", silent = true })
-- Motion
map("c", "<C-a>", "<C-b>", { desc = "Start Of Line" })
map("i", "<C-a>", "<Home>", { desc = "Start Of Line" })
map("i", "<C-e>", "<End>", { desc = "End Of Line" })
-- Select all text
map("n", "<C-e>", "gg<S-V>G", { desc = "Select all Text", silent = true, noremap = true })
-- Paste options
map("i", "<C-v>", '<C-r>"', { desc = "Paste on Insert Mode" })
map("v", "p", '"_dP', { desc = "Paste Without Overwriting" })
-- Delete and change without yanking
map({ "n", "x" }, "<A-d>", '"_d', { desc = "Delete Without Yanking" })
map({ "n", "x" }, "<A-c>", '"_c', { desc = "Change Without Yanking" })
-- Deleting without yanking empty line
map("n", "dd", function()
local is_empty_line = vim.api.nvim_get_current_line():match("^%s*$")
if is_empty_line then
return '"_dd'
else
return "dd"
end
end, { noremap = true, expr = true, desc = "Don't Yank Empty Line to Clipboard" })
-- Search inside visually highlighted text
map("x", "g/", "<esc>/\\%V", { silent = false, desc = "Search Inside Visual Selection" })
-- Search visually selected text (slightly better than builtins in Neovim>=0.8)
map("x", "*", [[y/\V<C-R>=escape(@", '/\')<CR><CR>]], { desc = "Search Selected Text", silent = true })
map("x", "#", [[y?\V<C-R>=escape(@", '?\')<CR><CR>]], { desc = "Search Selected Text (Backwards)", silent = true })
-- Dashboard
map("n", "<leader>fd", function()
if LazyVim.has("snacks.nvim") then
Snacks.dashboard()
elseif LazyVim.has("alpha-nvim") then
require("alpha").start(true)
elseif LazyVim.has("dashboard-nvim") then
vim.cmd("Dashboard")
end
end, { desc = "Dashboard" })
-- Spelling
map("n", "<leader>!", "zg", { desc = "Add Word to Dictionary" })
map("n", "<leader>@", "zug", { desc = "Remove Word from Dictionary" })
-- Terminal Stuff
if not LazyVim.has("floaterm.nvim") or not LazyVim.has("toggleterm.nvim") then
local lazyterm = function()
Snacks.terminal(nil, { size = { width = 0.8, height = 0.8 }, cwd = LazyVim.root() })
end
map("n", "<leader>ft", lazyterm, { desc = "Terminal (Root Dir)" })
map("n", "<leader>fT", function()
Snacks.terminal(nil, { size = { width = 0.8, height = 0.8 }, cwd = vim.fn.getcwd() })
end, { desc = "Terminal (cwd)" })
map("n", [[<c-\>]], lazyterm, { desc = "Terminal (Root Dir)" })
map("t", [[<c-\>]], "<cmd>close<cr>", { desc = "Hide Terminal" })
end
-- Marks
map("n", "dm", function()
local cur_line = vim.fn.line(".")
-- Delete buffer local mark
for _, mark in ipairs(vim.fn.getmarklist("%")) do
if mark.pos[2] == cur_line and mark.mark:match("[a-zA-Z]") then
vim.api.nvim_buf_del_mark(0, string.sub(mark.mark, 2, #mark.mark))
return
end
end
-- Delete global marks
local cur_buf = vim.api.nvim_win_get_buf(vim.api.nvim_get_current_win())
for _, mark in ipairs(vim.fn.getmarklist()) do
if mark.pos[1] == cur_buf and mark.pos[2] == cur_line and mark.mark:match("[a-zA-Z]") then
vim.api.nvim_buf_del_mark(0, string.sub(mark.mark, 2, #mark.mark))
return
end
end
end, { noremap = true, desc = "Mark on Current Line" })
-- Empty Line
map("n", "gO", "<Cmd>call append(line('.') - 1, repeat([''], v:count1))<CR>", { desc = "Empty Line Above" })
map("n", "go", "<Cmd>call append(line('.'), repeat([''], v:count1))<CR>", { desc = "Empty Line Below" })
-- Insert Mode
map({ "c", "i", "t" }, "<M-BS>", "<C-w>", { desc = "Delete Word" })
-- Git
map("n", "<leader>ghb", Snacks.git.blame_line, { desc = "Blame Line" })
-- Windows Split
map("n", "<leader>_", "<C-W>s", { desc = "Split Window Below", remap = true })
map("n", "<leader>\\", "<C-W>v", { desc = "Split Window Right", remap = true })
-- Center when scrolling
if Snacks.scroll.enabled then
map("n", "<C-d>", function()
vim.wo.scrolloff = 999
vim.defer_fn(function()
vim.wo.scrolloff = 8
end, 500)
return "<c-d>"
end, { expr = true })
map("n", "<C-u>", function()
vim.wo.scrolloff = 999
vim.defer_fn(function()
vim.wo.scrolloff = 8
end, 500)
return "<c-u>"
end, { expr = true })
end

50
nvim/lua/config/lazy.lua Normal file
View File

@@ -0,0 +1,50 @@
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
if not vim.uv.fs_stat(lazypath) then
-- bootstrap lazy.nvim
-- stylua: ignore
vim.fn.system({ "git", "clone", "--filter=blob:none", "https://github.com/folke/lazy.nvim.git", "--branch=stable",
lazypath })
end
vim.opt.rtp:prepend(vim.env.LAZY or lazypath)
require("lazy").setup({
spec = {
{
"LazyVim/LazyVim",
import = "lazyvim.plugins",
opts = {
colorscheme = "catppuccin",
},
},
{
import = "plugins",
},
},
ui = {
backdrop = 100,
},
defaults = {
lazy = true,
version = false, -- always use the latest git commit
-- version = "*", -- try installing the latest stable version for plugins that support semver
},
local_spec = true,
checker = { enabled = true }, -- automatically check for plugin updates
performance = {
cache = {
enabled = true,
-- disable_events = {},
},
rtp = {
-- disable some rtp plugins
disabled_plugins = {
"gzip",
"tarPlugin",
"tohtml",
"tutor",
"netrwPlugin",
"zipPlugin",
},
},
},
})

View File

@@ -0,0 +1,54 @@
local go = vim.g
local o = vim.opt
-- Optimizations on startup
vim.loader.enable()
-- Personal Config and LazyVim global options
go.lualine_info_extras = false
go.codeium_cmp_hide = false
go.lazygit_config = false
go.lazyvim_cmp = "blink"
go.lazyvim_picker = "snacks"
-- Define leader key
go.mapleader = " "
go.maplocalleader = "\\"
-- Autoformat on save (Global)
go.autoformat = true
-- Font
go.gui_font_default_size = 10
go.gui_font_size = go.gui_font_default_size
go.gui_font_face = "JetBrainsMono Nerd Font"
-- Enable EditorConfig integration
go.editorconfig = true
-- Root dir detection
go.root_spec = {
"lsp",
{ ".git", "lua", ".obsidian", "package.json", "Makefile", "go.mod", "cargo.toml", "pyproject.toml", "src" },
"cwd",
}
-- Disable annoying cmd line stuff
o.showcmd = false
o.laststatus = 3
o.cmdheight = 0
-- Enable spell checking
o.spell = true
o.spelllang:append("es")
-- Backspacing and indentation when wrapping
o.backspace = { "start", "eol", "indent" }
o.breakindent = true
-- Smoothscroll
if vim.fn.has("nvim-0.10") == 1 then
o.smoothscroll = true
end
o.conceallevel = 2

View File

@@ -0,0 +1,20 @@
-- Delete this condition if you want to execute the file
if true then
return {}
end
-- Example of disabling some plugins. Add yours
local disabled = {
{
"akinsho/bufferline.nvim",
},
{
"nvim-lualine/lualine.nvim",
},
}
for i, plugin in ipairs(disabled) do
plugin.enabled = false
end
return disabled

View File

@@ -0,0 +1,20 @@
return {
{
"yetone/avante.nvim",
event = "VeryLazy",
build = "make",
opts = {
openai = {
endpoint = "http://127.0.0.1:11434",
model = "deepseek-coder-v2",
temperature = 60,
max_tokens = 4096,
["local"] = true,
},
},
dependencies = {
"MeanderingProgrammer/render-markdown.nvim",
ft = { "markdown", "norg", "rmd", "org", "Avante" },
},
},
}

View File

@@ -0,0 +1,91 @@
local prefix = "<leader>a"
local user = vim.env.USER or "User"
vim.api.nvim_create_autocmd("User", {
pattern = "CodeCompanionChatAdapter",
callback = function(args)
if args.data.adapter == nil or vim.tbl_isempty(args.data) then
return
end
vim.g.llm_name = args.data.adapter.name
end,
})
return {
{
"olimorris/codecompanion.nvim",
cmd = { "CodeCompanion", "CodeCompanionActions", "CodeCompanionToggle", "CodeCompanionAdd", "CodeCompanionChat" },
opts = {
adapters = {
deepseek_coder = function()
return require("codecompanion.adapters").extend("ollama", {
name = "deepseek_coder",
schema = {
model = {
default = "deepseek-coder-v2:latest",
},
},
})
end,
deepseek_r1 = function()
return require("codecompanion.adapters").extend("ollama", {
name = "deepseek_r1",
schema = {
model = {
default = "deepseek-r1:14b",
},
},
})
end,
},
strategies = {
chat = {
adapter = "deepseek_r1",
roles = {
llm = " CodeCompanion",
user = "" .. user:sub(1, 1):upper() .. user:sub(2),
},
keymaps = {
close = { modes = { n = "q", i = "<C-c>" } },
stop = { modes = { n = "<C-c>" } },
},
},
inline = { adapter = "deepseek_r1" },
agent = { adapter = "deepseek_r1" },
},
display = {
chat = {
show_settings = true,
render_headers = false,
},
},
},
keys = {
{ prefix .. "a", "<cmd>CodeCompanionActions<cr>", mode = { "n", "v" }, desc = "Action Palette" },
{ prefix .. "c", "<cmd>CodeCompanionChat<cr>", mode = { "n", "v" }, desc = "New Chat" },
{ prefix .. "A", "<cmd>CodeCompanionAdd<cr>", mode = "v", desc = "Add Code" },
{ prefix .. "i", "<cmd>CodeCompanion<cr>", mode = "n", desc = "Inline Prompt" },
{ prefix .. "C", "<cmd>CodeCompanionToggle<cr>", mode = "n", desc = "Toggle Chat" },
},
},
{
"folke/which-key.nvim",
opts = {
spec = {
{ prefix, group = "ai", icon = "󱚦 ", mode = { "n", "v" } },
},
},
},
{
"folke/edgy.nvim",
optional = true,
opts = function(_, opts)
opts.right = opts.right or {}
table.insert(opts.right, {
ft = "codecompanion",
title = "CodeCompanion",
size = { width = 70 },
})
end,
},
}

View File

@@ -0,0 +1,65 @@
return {
{
"Exafunction/codeium.vim",
event = "InsertEnter",
config = function()
if vim.g.codeium_cmp_hide == true then
local cmp = require("cmp")
cmp.event:on("menu_opened", function()
vim.g.codeium_manual = true
vim.fn["codeium#Clear"]()
end)
cmp.event:on("menu_closed", function()
vim.g.codeium_manual = false
vim.fn["codeium#Complete"]()
end)
end
vim.g.codeium_filetypes = {
TelescopePrompt = false,
DressingInput = false,
["neo-tree-popup"] = false,
["dap-repl"] = false,
["snacks_picker_input"] = false,
}
local opts = { expr = true, silent = true }
vim.g.codeium_disable_bindings = 1
vim.keymap.set("i", "<M-CR>", function()
return vim.fn["codeium#Accept"]()
end, opts)
vim.keymap.set("n", "<leader>ch", function()
return vim.fn["codeium#Chat"]()
end, { desc = "Chat with IA (Codeium)" })
vim.keymap.set("i", "<M-]>", function()
return vim.fn["codeium#CycleCompletions"](1)
end, opts)
vim.keymap.set("i", "<M-[>", function()
return vim.fn["codeium#CycleCompletions"](-1)
end, opts)
vim.keymap.set("i", "<M-c>", function()
return vim.fn["codeium#Clear"]()
end, opts)
vim.keymap.set("n", "<leader>cI", "<cmd>CodeiumToggle<cr>", { desc = "Toggle IA (Codeium)" })
end,
},
{
"nvim-lualine/lualine.nvim",
optional = true,
opts = function(_, opts)
local icon = require("lazyvim.config").icons.kinds.Codeium
local function show_codeium_status()
return icon .. vim.fn["codeium#GetStatusString"]()
end
-- Insert the icon
table.insert(opts.sections.lualine_x, 2, show_codeium_status)
end,
},
}

View File

@@ -0,0 +1,24 @@
return {
{ import = "lazyvim.plugins.extras.ai.copilot" },
{
"zbirenbaum/copilot.lua",
event = "InsertEnter",
opts = {
suggestion = {
enabled = true,
auto_trigger = true,
keymap = {
accept = "<M-CR>",
accept_line = "<M-l>",
accept_word = "<M-k>",
next = "<M-]>",
prev = "<M-[>",
dismiss = "<M-c>",
},
},
},
keys = {
{ "<leader>cI", "<cmd>Copilot toggle<cr>", desc = "Toggle IA (Copilot)" },
},
},
}

View File

@@ -0,0 +1,65 @@
local prefix = "<leader>a"
return {
{
"jellydn/gen.nvim",
opts = {
model = "codellama",
host = "localhost",
port = "11434",
display_mode = "split",
show_prompt = true,
show_model = true,
no_auto_close = false,
init = function(options)
pcall(io.popen, "ollama serve > /dev/null 2>&1 &")
end,
command = function(options)
local body = { model = options.model, stream = true }
return "curl --silent --no-buffer -X POST http://"
.. options.host
.. ":"
.. options.port
.. "/api/generate -d $body"
end,
},
config = function(_, opts)
local gen = require("gen")
gen.setup(opts)
gen.prompts["Elaborate_Text"] = {
prompt = "Elaborate the following text:\n$text",
}
gen.prompts["Fix_Code"] = {
prompt = "Fix the following code. Only output the result in format ```$filetype\n...\n```:\n```$filetype\n$text\n```",
extract = "```$filetype\n(.-)```",
}
end,
keys = {
{ prefix .. "i", "<cmd>Gen<cr>", mode = { "n", "v" }, desc = "IA (Gen)" },
{ prefix .. "g", "<cmd>Gen Generate<cr>", mode = { "n" }, desc = "Generate" },
{ prefix .. "c", "<cmd>Gen Chat<cr>", mode = { "n" }, desc = "Chat" },
{ prefix .. "s", "<cmd>Gen Summarize<cr>", mode = { "n", "v" }, desc = "Summarize" },
{ prefix .. "a", "<cmd>Gen Ask<cr>", mode = { "v" }, desc = "Ask" },
{ prefix .. "H", "<cmd>Gen Change<cr>", mode = { "v" }, desc = "Change" },
{ prefix .. "G", "<cmd>Gen Enhance_Grammar_Spelling<cr>", mode = { "v" }, desc = "Enhance Grammar Spelling" },
{ prefix .. "w", "<cmd>Gen Enhance_Wording<cr>", mode = { "v" }, desc = "Enhance Wording" },
{ prefix .. "C", "<cmd>Gen Make_Concise<cr>", mode = { "v" }, desc = "Make Concise" },
{ prefix .. "l", "<cmd>Gen Make_List<cr>", mode = { "v" }, desc = "Make List" },
{ prefix .. "t", "<cmd>Gen Make_Table<cr>", mode = { "v" }, desc = "Make Table" },
{ prefix .. "r", "<cmd>Gen Review_Code<cr>", mode = { "v" }, desc = "Review Code" },
{ prefix .. "e", "<cmd>Gen Enhance_Code<cr>", mode = { "v" }, desc = "Enhance Code" },
{ prefix .. "h", "<cmd>Gen Change_Code<cr>", mode = { "v" }, desc = "Change Code" },
{ prefix .. "f", "<cmd>Gen Fix_Code<cr>", mode = { "v" }, desc = "Fix Code" },
{ prefix .. "E", "<cmd>Gen Elaborate_Text<cr>", mode = { "v" }, desc = "Elaborate Text" },
},
},
{
"folke/which-key.nvim",
opts = {
spec = {
{ prefix, group = "IA (Gen)", icon = "󱚦 " },
},
},
},
}

View File

@@ -0,0 +1,108 @@
local prefix = "<leader>C"
return {
{
"jackMort/ChatGPT.nvim",
dependencies = {
"MunifTanjim/nui.nvim",
"nvim-lua/plenary.nvim",
"nvim-telescope/telescope.nvim",
},
cond = function()
local api_key = os.getenv("OPENAI_API_KEY")
return api_key and api_key ~= "" and true or false
end,
opts = {
edit_with_instructions = {
diff = false,
keymaps = {
close = "<C-c>",
accept = "<C-y>",
toggle_diff = "<C-d>",
toggle_settings = "<C-o>",
cycle_windows = "<Tab>",
use_output_as_input = "<C-i>",
},
},
chat = {
welcome_message = "",
keymaps = {
close = { "<C-c>" },
yank_last = "<C-y>",
yank_last_code = "<C-k>",
scroll_up = "<C-u>",
scroll_down = "<C-d>",
new_session = "<C-n>",
cycle_windows = "<Tab>",
cycle_modes = "<C-f>",
next_message = "<C-j>",
prev_message = "<C-k>",
select_session = { "<Space>", "o", "<cr>" },
rename_session = "r",
delete_session = "d",
draft_message = "<C-d>",
edit_message = "e",
delete_message = "d",
toggle_settings = "<C-o>",
toggle_message_role = "<C-r>",
toggle_system_role_open = "<C-s>",
stop_generating = "<C-x>",
},
},
openai_params = {
model = "gpt-3.5-turbo-16k",
-- model = "gpt-4",
frequency_penalty = 0,
presence_penalty = 0,
max_tokens = 300,
temperature = 0.3,
top_p = 0.3,
n = 1,
-- temperature = 0,
-- top_p = 1,
},
openai_edit_params = {
model = "gpt-3.5-turbo-16k",
-- model = "gpt-4",
frequency_penalty = 0,
presence_penalty = 0,
temperature = 0,
top_p = 1,
n = 1,
},
show_quickfixes_cmd = "Trouble quickfix",
-- actions_paths = { "~/.config/nvim/custom_actions.json" },
},
cmd = {
"ChatGPT",
"ChatGPTActAs",
"ChatGPTCompleteCode",
"ChatGPTEditWithInstructions",
"ChatGPTRun",
},
-- stylua: ignore
keys = {
{ prefix .. "c", "<cmd>ChatGPT<CR>", desc = "ChatGPT" },
{ prefix .. "e", "<cmd>ChatGPTEditWithInstruction<CR>", desc = "Edit With Instruction", mode = { "n", "v" } },
{ prefix .. "g", "<cmd>ChatGPTRun grammar_correction<CR>", desc = "Grammar Correction", mode = { "n", "v" } },
{ prefix .. "t", "<cmd>ChatGPTRun translate<CR>", desc = "Translate", mode = { "n", "v" } },
{ prefix .. "k", "<cmd>ChatGPTRun keywords<CR>", desc = "Keywords", mode = { "n", "v" } },
{ prefix .. "d", "<cmd>ChatGPTRun docstring<CR>", desc = "Docstring", mode = { "n", "v" } },
{ prefix .. "T", "<cmd>ChatGPTRun add_tests<CR>", desc = "Add Tests", mode = { "n", "v" } },
{ prefix .. "o", "<cmd>ChatGPTRun optimize_code<CR>", desc = "Optimize Code", mode = { "n", "v" } },
{ prefix .. "s", "<cmd>ChatGPTRun summarize<CR>", desc = "Summarize", mode = { "n", "v" } },
{ prefix .. "f", "<cmd>ChatGPTRun fix_bugs<CR>", desc = "Fix Bugs", mode = { "n", "v" } },
{ prefix .. "x", "<cmd>ChatGPTRun explain_code<CR>", desc = "Explain Code", mode = { "n", "v" } },
{ prefix .. "r", "<cmd>ChatGPTRun roxygen_edit<CR>", desc = "Roxygen Edit", mode = { "n", "v" } },
{ prefix .. "l", "<cmd>ChatGPTRun code_readability_analysis<CR>", desc = "Code Readability Analysis", mode = { "n", "v" }, },
},
},
{
"folke/which-key.nvim",
opts = {
spec = {
{ prefix, group = "chatGPT", icon = "󰚩 " },
},
},
},
}

View File

@@ -0,0 +1,40 @@
return {
"monkoose/neocodeium",
event = "InsertEnter",
config = function()
local neocodeium = require("neocodeium")
neocodeium.setup()
local commands = require("neocodeium.commands")
if vim.g.codeium_cmp_hide == true then
local cmp = require("cmp")
cmp.event:on("menu_opened", function()
commands.disable()
neocodeium.clear()
end)
cmp.event:on("menu_closed", function()
commands.enable()
end)
end
vim.keymap.set("i", "<M-CR>", function()
require("neocodeium").accept()
end)
vim.keymap.set("i", "<A-w>", function()
require("neocodeium").accept_word()
end)
vim.keymap.set("i", "<A-a>", function()
require("neocodeium").accept_line()
end)
vim.keymap.set("i", "<M-]>", function()
require("neocodeium").cycle_or_complete()
end)
vim.keymap.set("i", "<M-[>", function()
require("neocodeium").cycle_or_complete(-1)
end)
vim.keymap.set("i", "<M-c>", function()
require("neocodeium").clear()
end)
end,
}

View File

@@ -0,0 +1,35 @@
local prefix = "<leader>A"
return {
{ import = "lazyvim.plugins.extras.coding.neogen" },
{
"danymat/neogen",
-- stylua: ignore
keys = {
{ prefix .. "d", function() require("neogen").generate() end, desc = "Default Annotation" },
{ prefix .. "C", function() require("neogen").generate({ type = "class" }) end, desc = "Class" },
{ prefix .. "f", function() require("neogen").generate({ type = "func" }) end, desc = "Function" },
{ prefix .. "t", function() require("neogen").generate({ type = "type" }) end, desc = "Type" },
{ prefix .. "F", function() require("neogen").generate({ type = "file" }) end, desc = "File" },
{ "<leader>cn", false },
},
},
{
"Zeioth/dooku.nvim",
cmd = { "DookuGenerate", "DookuOpen", "DookuAutoSetup" },
opts = {},
-- stylua: ignore
keys = {
{ prefix .. "g", "<Cmd>DookuGenerate<CR>", desc = "Generate HTML Docs" },
{ prefix .. "o", "<Cmd>DookuOpen<CR>", desc = "Open HTML Docs" },
},
},
{
"folke/which-key.nvim",
opts = {
spec = {
{ prefix, group = "annotation/snippets", icon = "" },
},
},
},
}

View File

@@ -0,0 +1,20 @@
return {
"saghen/blink.cmp",
opts = {
keymap = {
["<C-k>"] = { "select_prev", "fallback" },
["<C-j>"] = { "select_next", "fallback" },
},
completion = {
menu = {
border = "rounded",
winhighlight = "Normal:BlinkCmpDoc,FloatBorder:BlinkCmpDocBorder,CursorLine:BlinkCmpDocCursorLine,Search:None",
},
documentation = {
window = {
border = "rounded",
},
},
},
},
}

View File

@@ -0,0 +1,84 @@
local cmp = require("cmp")
return {
"hrsh7th/nvim-cmp",
dependencies = {
"hrsh7th/cmp-nvim-lsp",
"hrsh7th/cmp-buffer",
"hrsh7th/cmp-path",
},
keys = {
{ "<leader>ciC", "<cmd>CmpStatus<CR>", desc = "Cmp Status" },
},
opts = function(_, opts)
opts.mapping = cmp.mapping.preset.insert({
["<C-j>"] = cmp.mapping.select_next_item({ behavior = cmp.SelectBehavior.Insert }),
["<C-k>"] = cmp.mapping.select_prev_item({ behavior = cmp.SelectBehavior.Insert }),
["<C-n>"] = cmp.mapping.select_next_item({ behavior = cmp.SelectBehavior.Insert }),
["<C-p>"] = cmp.mapping.select_prev_item({ behavior = cmp.SelectBehavior.Insert }),
["<C-b>"] = cmp.mapping.scroll_docs(-4),
["<C-f>"] = cmp.mapping.scroll_docs(4),
["<C-Space>"] = cmp.mapping.complete(),
["<C-e>"] = cmp.mapping.abort(),
["<CR>"] = cmp.mapping.confirm({ select = true }), -- Accept currently selected item. Set `select` to `false` to only confirm explicitly selected items.
["<S-CR>"] = cmp.mapping.confirm({
behavior = cmp.ConfirmBehavior.Replace,
select = true,
}), -- Accept currently selected item. Set `select` to `false` to only confirm explicitly selected items.
["<C-CR>"] = function(fallback)
cmp.abort()
fallback()
end,
})
opts.window = {
completion = {
border = "rounded",
winhighlight = "Normal:Normal,FloatBorder:Normal,CursorLine:Visual,Search:None",
scrollbar = false,
col_offset = -3,
side_padding = 1,
},
documentation = {
border = "rounded",
winhighlight = "Normal:Normal,FloatBorder:Normal,CursorLine:Visual,Search:None",
scrollbar = false,
},
}
opts.performance = {
debounce = 0,
throttle = 0,
fetching_timeout = 20,
confirm_resolve_timeout = 20,
async_budget = 1,
max_view_entries = 50,
}
cmp.setup.cmdline({ "/", "?" }, {
mapping = cmp.mapping.preset.cmdline({
["<C-j>"] = {
c = function(fallback)
if cmp.visible() then
cmp.select_next_item()
else
fallback()
end
end,
},
["<C-k>"] = {
c = function(fallback)
if cmp.visible() then
cmp.select_prev_item()
else
fallback()
end
end,
},
}),
sources = {
{ name = "buffer" },
},
})
end,
}

View File

@@ -0,0 +1,125 @@
return {
{
"hrsh7th/nvim-cmp",
dependencies = {
"windwp/nvim-autopairs",
opts = {},
},
opts = function()
local cmp = require("cmp")
local cmp_autopairs = require("nvim-autopairs.completion.cmp")
local ts_utils = require("nvim-treesitter.ts_utils")
local ts_node_func_parens_disabled = {
-- ecma
named_imports = true,
-- rust
use_declaration = true,
}
local npairs = require("nvim-autopairs")
local Rule = require("nvim-autopairs.rule")
local cond = require("nvim-autopairs.conds")
local brackets = { { "(", ")" }, { "[", "]" }, { "{", "}" } }
local default_handler = cmp_autopairs.filetypes["*"]["("].handler
cmp_autopairs.filetypes["*"]["("].handler = function(char, item, bufnr, rules, commit_character)
local node_type = ts_utils.get_node_at_cursor():type()
if ts_node_func_parens_disabled[node_type] then
if item.data then
item.data.funcParensDisabled = true
else
char = ""
end
end
default_handler(char, item, bufnr, rules, commit_character)
end
cmp.event:on("confirm_done", cmp_autopairs.on_confirm_done())
npairs.add_rules({
-- Rule for a pair with left-side ' ' and right side ' '
Rule(" ", " ")
-- Pair will only occur if the conditional function returns true
:with_pair(function(opts)
-- We are checking if we are inserting a space in (), [], or {}
local pair = opts.line:sub(opts.col - 1, opts.col)
return vim.tbl_contains({
brackets[1][1] .. brackets[1][2],
brackets[2][1] .. brackets[2][2],
brackets[3][1] .. brackets[3][2],
}, pair)
end)
:with_move(cond.none())
:with_cr(cond.none())
-- We only want to delete the pair of spaces when the cursor is as such: ( | )
:with_del(
function(opts)
local col = vim.api.nvim_win_get_cursor(0)[2]
local context = opts.line:sub(col - 1, col + 2)
return vim.tbl_contains({
brackets[1][1] .. " " .. brackets[1][2],
brackets[2][1] .. " " .. brackets[2][2],
brackets[3][1] .. " " .. brackets[3][2],
}, context)
end
),
-- Javascript arrow key
Rule("%(.*%)%s*%=>$", " { }", { "typescript", "typescriptreact", "javascript" })
:use_regex(true)
:set_end_pair_length(2),
-- Auto addspace on =
Rule("=", "")
:with_pair(cond.not_inside_quote())
:with_pair(function(opts)
local last_char = opts.line:sub(opts.col - 1, opts.col - 1)
if last_char:match("[%w%=%s]") then
return true
end
return false
end)
:replace_endpair(function(opts)
local prev_2char = opts.line:sub(opts.col - 2, opts.col - 1)
local next_char = opts.line:sub(opts.col, opts.col)
next_char = next_char == " " and "" or " "
if prev_2char:match("%w$") then
return "<bs> =" .. next_char
end
if prev_2char:match("%=$") then
return next_char
end
if prev_2char:match("=") then
return "<bs><bs>=" .. next_char
end
return ""
end)
:set_end_pair_length(0)
:with_move(cond.none())
:with_del(cond.none()),
})
-- For each pair of brackets we will add another rule
for _, bracket in pairs(brackets) do
npairs.add_rules({
-- Each of these rules is for a pair with left-side '( ' and right-side ' )' for each bracket type
Rule(bracket[1] .. " ", " " .. bracket[2])
:with_pair(cond.none())
:with_move(function(opts)
return opts.char == bracket[2]
end)
:with_del(cond.none())
:use_key(bracket[2])
-- Removes the trailing whitespace that can occur without this
:replace_map_cr(function(_)
return "<C-c>2xi<CR><C-c>O"
end),
})
end
end,
},
{
"echasnovski/mini.pairs",
enabled = false,
},
}

View File

@@ -0,0 +1,9 @@
return {
"hrsh7th/nvim-cmp",
dependencies = {
"SergioRibera/cmp-dotenv",
},
opts = function(_, opts)
table.insert(opts.sources, { name = "dotenv" })
end,
}

View File

@@ -0,0 +1,9 @@
return {
"hrsh7th/nvim-cmp",
dependencies = {
"hrsh7th/cmp-emoji",
},
opts = function(_, opts)
table.insert(opts.sources, { name = "emoji" })
end,
}

View File

@@ -0,0 +1,9 @@
return {
"hrsh7th/nvim-cmp",
dependencies = {
"amarakon/nvim-cmp-fonts",
},
opts = function(_, opts)
table.insert(opts.sources, { name = "fonts", option = { space_filter = "-" } })
end,
}

View File

@@ -0,0 +1,9 @@
return {
"hrsh7th/nvim-cmp",
dependencies = {
"chrisgrieser/cmp-nerdfont",
},
opts = function(_, opts)
table.insert(opts.sources, { name = "nerdfont" })
end,
}

View File

@@ -0,0 +1,12 @@
return {
"hrsh7th/nvim-cmp",
dependencies = {
"David-Kunz/cmp-npm",
dependencies = "nvim-lua/plenary.nvim",
ft = "json",
opts = {},
},
opts = function(_, opts)
table.insert(opts.sources, { name = "npm", keyword_length = 4 })
end,
}

View File

@@ -0,0 +1,9 @@
return {
"hrsh7th/nvim-cmp",
dependencies = {
"lukas-reineke/cmp-rg",
},
opts = function(_, opts)
table.insert(opts.sources, { name = "rg", keyword_length = 3 })
end,
}

View File

@@ -0,0 +1,9 @@
return {
"hrsh7th/nvim-cmp",
dependencies = {
"lukas-reineke/cmp-under-comparator",
},
opts = function(_, opts)
table.insert(opts.sorting.comparators, 4, require("cmp-under-comparator").under)
end,
}

View File

@@ -0,0 +1,9 @@
return {
"hrsh7th/nvim-cmp",
dependencies = {
"chrisgrieser/cmp_yanky",
},
opts = function(_, opts)
table.insert(opts.sources, { name = "cmp_yanky" })
end,
}

View File

@@ -0,0 +1,36 @@
local prefix = "<leader>dd"
return {
{
"andrewferrier/debugprint.nvim",
opts = {
create_keymaps = false,
},
-- stylua: ignore
keys = {
{ prefix .. "l", function() return require("debugprint").debugprint() end, desc = "Under Line", expr = true },
{ prefix .. "L", function() return require("debugprint").debugprint({ above = true }) end, desc = "Above Line", expr = true },
{
prefix .. "v",
function() return require("debugprint").debugprint({ variable = true }) end,
desc = "Variable Under Line",
expr = true,
},
{
prefix .. "V",
function() return require("debugprint").debugprint({ above = true, variable = true }) end,
desc = "Variable Above Line",
expr = true,
},
{ prefix .. "d", function() return require("debugprint").deleteprints() end, desc = "Delete All" },
},
},
{
"folke/which-key.nvim",
opts = {
spec = {
{ prefix, group = "debugPrint", icon = "󰐪 " },
},
},
},
}

View File

@@ -0,0 +1,5 @@
return {
"kevinhwang91/nvim-ibus-sw",
event = "InsertLeave",
opts = {},
}

View File

@@ -0,0 +1,32 @@
return {
{ import = "lazyvim.plugins.extras.coding.luasnip" },
{
"L3MON4D3/LuaSnip",
dependencies = {
"rafamadriz/friendly-snippets",
config = function()
require("luasnip.loaders.from_vscode").lazy_load()
require("luasnip").filetype_extend("typescript", { "tsdoc" })
require("luasnip").filetype_extend("typescript", { "next-ts" })
require("luasnip").filetype_extend("javascript", { "jsdoc" })
require("luasnip").filetype_extend("javascript", { "next" })
require("luasnip").filetype_extend("lua", { "luadoc" })
require("luasnip").filetype_extend("python", { "pydoc" })
require("luasnip").filetype_extend("rust", { "rustdoc" })
require("luasnip").filetype_extend("cs", { "csharpdoc" })
require("luasnip").filetype_extend("java", { "javadoc" })
require("luasnip").filetype_extend("c", { "cdoc" })
require("luasnip").filetype_extend("cpp", { "cppdoc" })
require("luasnip").filetype_extend("php", { "phpdoc" })
require("luasnip").filetype_extend("kotlin", { "kdoc" })
require("luasnip").filetype_extend("ruby", { "rdoc" })
require("luasnip").filetype_extend("sh", { "shelldoc" })
require("luasnip.loaders.from_vscode").lazy_load({ paths = vim.fn.stdpath("config") .. "/snippets" })
end,
},
},
{
"garymjr/nvim-snippets",
enabled = false,
},
}

View File

@@ -0,0 +1,48 @@
return {
{
"smoka7/multicursors.nvim",
dependencies = {
"nvim-treesitter/nvim-treesitter",
"smoka7/hydra.nvim",
},
cmd = { "MCstart", "MCvisual", "MCclear", "MCpattern", "MCvisualPattern", "MCunderCursor" },
-- stylua: ignore
keys = {
{ mode = { "v", "n" }, "<leader>M", "<cmd>MCstart<cr>", desc = "Multicursor" },
},
opts = {
hint_config = {
border = "rounded",
position = "bottom-right",
},
generate_hints = {
normal = true,
insert = true,
extend = true,
config = {
column_count = 1,
},
},
},
},
{
"nvim-lualine/lualine.nvim",
optional = true,
opts = function(_, opts)
local function is_active()
local ok, hydra = pcall(require, "hydra.statusline")
return ok and hydra.is_active()
end
local function get_name()
local ok, hydra = pcall(require, "hydra.statusline")
if ok then
return hydra.get_name()
end
return ""
end
table.insert(opts.sections.lualine_b, { get_name, cond = is_active })
end,
},
}

View File

@@ -0,0 +1,34 @@
return {
{
"chrisgrieser/nvim-recorder",
event = "VeryLazy",
vscode = true,
keys = {
{ "q", desc = "Start Recording" },
{ "Q", desc = "Play Recording" },
{ "<C-q>", desc = "Switch Slot" },
{ "cq", desc = "Edit Macro" },
{ "yq", desc = "Yank Macro" },
{ "dq", desc = "Delete All Macros" },
},
opts = {
useNerdFontsIcons = false,
slots = { "a", "b", "c", "d" },
mapping = {
startStopRecording = "q",
playMacro = "Q",
editMacro = "cq",
switchSlot = "<C-q>",
deleteAllMacros = "dq",
yankMacro = "yq",
},
},
},
{
"nvim-lualine/lualine.nvim",
optional = true,
opts = function(_, opts)
table.insert(opts.sections.lualine_x, require("recorder").displaySlots)
end,
},
}

View File

@@ -0,0 +1,23 @@
local prefix = "<leader>a"
return {
{
"chrisgrieser/nvim-scissors",
opts = {
jsonFormatter = "jq",
},
-- stylua: ignore
keys = {
{ prefix .. "S", function() require("scissors").editSnippet() end, desc = "Edit Snippets" },
{ prefix .. "s", mode = { "n", "v" }, function() require("scissors").addNewSnippet() end, desc = "Add Snippets" },
},
},
{
"folke/which-key.nvim",
opts = {
spec = {
{ prefix, group = "annotation/snippets", icon = "" },
},
},
},
}

View File

@@ -0,0 +1,71 @@
local prefix = "<leader>cu"
return {
{
"michaelb/sniprun",
run = "bash ./install.sh",
cmd = { "SnipRun", "SnipInfo", "SnipLive", "SnipClose", "SnipReset", "SnipReplMemoryClean" },
opts = {
selected_interpreters = {}, --# use those instead of the default for the current filetype
repl_enable = { "javascript", "typescript" }, --# enable REPL-like behavior for the given interpreters
repl_disable = {}, --# disable REPL-like behavior for the given interpreters
interpreter_options = {
GFM_original = {
use_on_filetypes = { "markdown.pandoc" }, --# the 'use_on_filetypes' configuration key is
},
Python3_original = {
error_truncate = "auto", --# Truncate runtime errors 'long', 'short' or 'auto'
},
},
display = {
"VirtualText", --# display results as virtual text
},
live_display = { "VirtualTextOk" }, --# display mode used in live_mode
display_options = {
terminal_scrollback = vim.o.scrollback, --# change terminal display scrollback lines
terminal_line_number = false, --# whether show line number in terminal window
terminal_signcolumn = false, --# whether show signcolumn in terminal window
terminal_persistence = true, --# always keep the terminal open (true) or close it at every occasion (false)
terminal_width = 45, --# change the terminal display option width
notification_timeout = 5, --# timeout for nvim_notify output
},
--# You can use the same keys to customize whether a sniprun producing
--# no output should display nothing or '(no output)'
show_no_output = {
"Classic",
"TempFloatingWindow", --# implies LongTempFloatingWindow, which has no effect on its own
},
live_mode_toggle = "off", --# live mode toggle, see Usage - Running for more info
inline_messages = false, --# inline_message (0/1) is a one-line way to display messages
borders = "single", --# display borders around floating windows
--# possible values are 'none', 'single', 'double', or 'shadow'
},
-- stylua: ignore
keys = {
{ prefix .. "r", "<cmd>SnipRun<cr>", desc = "Run" },
{ "<F6>", "<cmd>SnipRun<cr>", desc = "Run" },
{ prefix .. "r", function() require("sniprun").run("v") end, mode = { "v" }, desc = "Run" },
{ "<F6>", function() require("sniprun").run("v") end, mode = { "v" }, desc = "Run" },
{ prefix .. "i", function() require("sniprun").info() end, desc = "Info" },
{ prefix .. "R", function() require("sniprun").reset() end, desc = "Reset" },
{ "<S-F6>", function() require("sniprun").reset() end, desc = "Reset" },
{ prefix .. "l", function() require("sniprun.live_mode").toggle() end, desc = "Live" },
},
},
{
"folke/which-key.nvim",
opts = {
spec = {
{ prefix, group = "runner", icon = "󰜎 " },
},
},
},
}

View File

@@ -0,0 +1,11 @@
return {
"vidocqh/auto-indent.nvim",
event = "LazyFile",
opts = {
---@param lnum: number
---@return number
indentexpr = function(lnum)
return require("nvim-treesitter.indent").get_indent(lnum)
end,
},
}

View File

@@ -0,0 +1,11 @@
return {
"nvim-treesitter/nvim-treesitter",
dependencies = {
"RRethy/nvim-treesitter-endwise",
},
opts = {
endwise = {
enable = true,
},
},
}

View File

@@ -0,0 +1,5 @@
return {
"nmac427/guess-indent.nvim",
event = "LazyFile",
opts = {},
}

View File

@@ -0,0 +1,9 @@
return {
"echasnovski/mini.align",
opts = {},
vscode = true,
keys = {
{ "ga", mode = { "n", "v" }, desc = "Align" },
{ "gA", mode = { "n", "v" }, desc = "Align Preview" },
},
}

View File

@@ -0,0 +1,10 @@
return {
"ckolkey/ts-node-action",
dependencies = { "nvim-treesitter" },
vscode = true,
opts = {},
--stylua: ignore
keys = {
{ "J", "<cmd>NodeAction<cr>", mode = "n", desc = "Node action" }
},
}

View File

@@ -0,0 +1,4 @@
return {
"nvim-treesitter/nvim-treesitter",
dependencies = { "chrisgrieser/nvim-puppeteer" },
}

View File

@@ -0,0 +1,14 @@
return {
"Wansmer/sibling-swap.nvim",
dependencies = "nvim-treesitter/nvim-treesitter",
vscode = true,
opts = {
use_default_keymaps = false,
highlight_node_at_cursor = true,
},
-- stylua: ignore
keys = {
{ "<C-.>", function() require("sibling-swap").swap_with_right() end, desc = "Move Node Right" },
{ "<C-,>", function() require("sibling-swap").swap_with_left() end, desc = "Move Node Left" },
},
}

View File

@@ -0,0 +1,12 @@
return {
"chrisgrieser/nvim-spider",
opts = {},
vscode = true,
-- stylua: ignore
keys = {
{ "e", mode = { "n", "o", "x" }, function() require("spider").motion("e") end, desc = "Spider-e" },
{ "w", mode = { "n", "o", "x" }, function() require("spider").motion("w") end, desc = "Spider-w" },
{ "b", mode = { "n", "o", "x" }, function() require("spider").motion("b") end, desc = "Spider-b" },
{ "E", mode = { "n", "x", "o" }, function() require("spider").motion("ge") end, desc = "Spider-E" },
},
}

View File

@@ -0,0 +1,12 @@
return {
"johmsalas/text-case.nvim",
config = function()
require("textcase").setup()
LazyVim.on_load("telescope.nvim", function()
require("telescope").load_extension("lazy")
end)
end,
keys = {
{ "gC", "<cmd>TextCaseOpenTelescope<CR>", mode = { "n", "v" }, desc = "Text Case" },
},
}

View File

@@ -0,0 +1,35 @@
return {
"chrisgrieser/nvim-various-textobjs",
opts = {
keymaps = {
useDefaults = false,
},
},
vscode = true,
-- stylua: ignore
keys = {
{ "im", ft = { "markdown", "toml" }, mode = { "o", "x" }, function() require("various-textobjs").mdlink("inner") end, desc = "Markdown Link" },
{ "am", ft = { "markdown", "toml" }, mode = { "o", "x" }, function() require("various-textobjs").mdlink("outer") end, desc = "Markdown Link" },
{ "iC", ft = { "markdown" }, mode = { "o", "x" }, function() require("various-textobjs").mdFencedCodeBlock("inner") end, desc = "CodeBlock" },
{ "aC", ft = { "markdown" }, mode = { "o", "x" }, function() require("various-textobjs").mdFencedCodeBlock("outer") end, desc = "CodeBlock" },
{ "ie", ft = { "markdown" }, mode = { "o", "x" }, function() require("various-textobjs").mdEmphasis("inner") end, desc = "Emphasis" },
{ "ae", ft = { "markdown" }, mode = { "o", "x" }, function() require("various-textobjs").mdEmphasis("outer") end, desc = "Emphasis" },
{ "gd", mode = { "o", "x" }, function() require("various-textobjs").diagnostics() end, desc = "Diagnostics" },
{ "iy", ft = { "python" }, mode = { "o", "x" }, function() require("various-textobjs").pyTripleQuotes("inner") end, desc = "Triple Quotes" },
{ "ay", ft = { "python" }, mode = { "o", "x" }, function() require("various-textobjs").pyTripleQuotes("outer") end, desc = "Triple Quotes" },
{ "iC", ft = { "css", "scss", "less" }, mode = { "o", "x" }, function() require("various-textobjs").cssSelector("inner") end, desc = "CSS Selector" },
{ "aC", ft = { "css", "scss", "less" }, mode = { "o", "x" }, function() require("various-textobjs").cssSelector("outer") end, desc = "CSS Selector" },
{ "i#", ft = { "css", "scss", "less" }, mode = { "o", "x" }, function() require("various-textobjs").cssColor("inner") end, desc = "CSS Color" },
{ "a#", ft = { "css", "scss", "less" }, mode = { "o", "x" }, function() require("various-textobjs").cssColor("outer") end, desc = "CSS Color" },
{ "iP", ft = { "sh" }, mode = { "o", "x" }, function() require("various-textobjs").shellPipe("inner") end, desc = "Pipe" },
{ "aP", ft = { "sh" }, mode = { "o", "x" }, function() require("various-textobjs").shellPipe("outer") end, desc = "Pipe" },
{ "iH", ft = { "html, xml, css, scss, less" }, mode = { "o", "x" }, function() require("various-textobjs").htmlAttribute("inner") end, desc = "HTML Attribute" },
{ "iv", mode = { "o", "x" }, function() require("various-textobjs").value("inner") end, desc = "Value" },
{ "av", mode = { "o", "x" }, function() require("various-textobjs").value("outer") end, desc = "Value" },
{ "ik", mode = { "o", "x" }, function() require("various-textobjs").key("inner") end, desc = "Key" },
{ "ak", mode = { "o", "x" }, function() require("various-textobjs").key("outer") end, desc = "Key" },
{ "L", mode = { "o", "x" }, function() require("various-textobjs").url() end, desc = "Link" },
{ "iN", mode = { "o", "x" }, function() require("various-textobjs").number("inner") end, desc = "Number" },
{ "aN", mode = { "o", "x" }, function() require("various-textobjs").number("outer") end, desc = "Number" },
},
}

View File

@@ -0,0 +1,6 @@
return {
"sustech-data/wildfire.nvim",
event = "BufEnter",
vscode = true,
opts = {},
}

View File

@@ -0,0 +1,12 @@
return {
{
"altermo/ultimate-autopair.nvim",
event = { "InsertEnter", "CmdlineEnter" },
branch = "v0.6", --recomended as each new version will have breaking changes
opts = {},
},
{
"echasnovski/mini.pairs",
enabled = false,
},
}

View File

@@ -0,0 +1,45 @@
return {
{ import = "lazyvim.plugins.extras.coding.yanky" },
{
"gbprod/yanky.nvim",
opts = function(_, opts)
opts.highlight = { timer = 250 }
if LazyVim.has("telescope.nvim") then
local utils = require("yanky.utils")
local mapping = require("yanky.telescope.mapping")
opts.picker = {
telescope = {
use_default_mappings = false,
mappings = {
default = mapping.put("p"),
i = {
["<c-g>"] = mapping.put("p"),
["<c-h>"] = mapping.put("P"),
["<c-x>"] = mapping.delete(),
["<c-r>"] = mapping.set_register(utils.get_default_register()),
},
n = {
p = mapping.put("p"),
P = mapping.put("P"),
d = mapping.delete(),
r = mapping.set_register(utils.get_default_register()),
},
},
},
}
end
end,
keys = {
{
"<leader>sy",
function()
vim.cmd([[YankyRingHistory]])
end,
mode = { "n", "v" },
desc = "Yank History",
},
{ "<leader>p", mode = { "n", "x" }, false },
},
},
}

View File

@@ -0,0 +1,33 @@
return {
{ import = "lazyvim.plugins.extras.dap.core" },
{
"mfussenegger/nvim-dap",
opts = {
defaults = {
fallback = {
external_terminal = {
command = "/usr/bin/kitty",
args = { "--class", "kitty-dap", "--hold", "--detach", "nvim-dap", "-c", "DAP" },
},
},
},
},
-- stylua: ignore
keys = {
{ "<F5>", function() require("dap").continue() end, desc = "Debug: Continue" },
{ "<F10>", function() require("dap").step_over() end, desc = "Debug: Step over" },
{ "<F11>", function() require("dap").step_into() end, desc = "Debug: Step into" },
{ "<F12>", function() require("dap").step_out() end, desc = "Debug: Step out" },
{ "<F2>", function() require("dap").toggle_breakpoint() end, desc = "Debug: Toggle breakpoint" },
{ "<S-F2>", function() require("dap").set_breakpoint(vim.fn.input('Breakpoint condition: ')) end, desc = "Breakpoint Condition" },
},
},
{
"nvim-neotest/neotest",
optional = true,
-- stylua: ignore
keys = {
{ "<leader>tL", function() require("neotest").run.run_last({ strategy = "dap" }) end, desc = "Debug Last Test" },
},
},
}

View File

@@ -0,0 +1,35 @@
local prefix = "<leader>db"
return {
{
"mfussenegger/nvim-dap",
optional = true,
vscode = false,
dependencies = {
"Weissle/persistent-breakpoints.nvim",
vscode = false,
event = "LazyFile",
keys = {
{ prefix .. "d", "<cmd>PBClearAllBreakpoints<cr>", desc = "Delete All Breakpoints" },
{ prefix .. "B", "<cmd>PBSetConditionalBreakpoint<cr>", desc = "Breakpoint Condition" },
{ prefix .. "b", "<cmd>PBToggleBreakpoint<cr>", desc = "Toggle Breakpoint" },
{ "<F2>", "<cmd>PBToggleBreakpoint<cr>", desc = "Toggle Breakpoint" },
},
opts = {
load_breakpoints_event = { "BufReadPost" },
},
},
keys = {
{ "<F2>", false },
{ "<leader>dB", false },
},
},
{
"folke/which-key.nvim",
opts = {
spec = {
{ prefix, group = "breakpoints", icon = "" },
},
},
},
}

View File

@@ -0,0 +1,12 @@
return {
"nvim-treesitter/nvim-treesitter",
dependencies = {
"LiadOz/nvim-dap-repl-highlights",
opts = {},
},
opts = function(_, opts)
if type(opts.ensure_installed) == "table" then
vim.list_extend(opts.ensure_installed, { "dap_repl" })
end
end,
}

View File

@@ -0,0 +1,17 @@
return {
"nvim-telescope/telescope-dap.nvim",
cond = LazyVim.has("nvim-dap"),
config = function()
LazyVim.on_load("telescope.nvim", function()
require("telescope").load_extension("dap")
end)
end,
-- stylua: ignore
keys = {
{ "<leader>dm", "<cmd>Telescope dap commands<CR>", desc = "Commands" },
{ "<leader>df", "<cmd>Telescope dap frames<CR>", desc = "Frames" },
{ "<leader>dG", "<cmd>Telescope dap configurations<CR>", desc = "Configurations" },
{ "<leader>dbL", "<cmd>Telescope dap list_breakpoints<CR>", desc = "List Breakpoints" },
{ "<leader>dv", "<cmd>Telescope dap variables<CR>", desc = "Variables" },
},
}

View File

@@ -0,0 +1,5 @@
return {
"kristijanhusak/vim-carbon-now-sh",
cmd = "CarbonNowSh",
vscode = true,
}

View 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,
},
},
}

View 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",
},
}

View 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,
},
},
},
}

View 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 = "" },
},
},
},
}

View 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",
},
},
}

View 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",
},
},
},
},
},
}

View 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" } },
},
},
},
}

View 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 = {},
},
}

View 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,
},
}

View File

@@ -0,0 +1,8 @@
return {
"Diogo-ss/five-server.nvim",
cmd = { "FiveServer" },
build = function()
require("fs.utils.install")()
end,
opts = {},
}

View 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",
},
},
}

View 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 = {},
},
}

View 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" },
},
},
}

View 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 = "" },
},
},
},
}

View 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 = "" },
},
},
},
}

View 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",
},
},
}

View 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" },
},
},
}

View 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 = "" },
},
},
},
}

View 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 = "" },
},
},
},
}

View 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" },
},
}

Some files were not shown because too many files have changed in this diff Show More