add rest of plugins from previous config

This commit is contained in:
Alexander Navarro 2025-04-01 14:44:36 -03:00
parent 41327778ea
commit 93027a59a2
16 changed files with 697 additions and 1 deletions

View file

@ -0,0 +1,63 @@
return {
icons = {
misc = {
pint = "",
},
dap = {
Stopped = { "󰁕 ", "DiagnosticWarn", "DapStoppedLine" },
Breakpoint = "",
BreakpointCondition = "",
BreakpointRejected = { "", "DiagnosticError" },
LogPoint = ".>",
},
diagnostics = {
Error = "",
Warn = "",
Hint = "",
Info = "",
},
git = {
added = "",
modified = "",
removed = "",
branch = "",
},
kinds = {
Array = "",
Boolean = "",
Class = "",
Color = "",
Constant = "",
Constructor = "",
Copilot = "",
Enum = "",
EnumMember = "",
Event = "",
Field = "",
File = "",
Folder = "",
Function = "",
Interface = "",
Key = "",
Keyword = "",
Method = "",
Module = "",
Namespace = "",
Null = "",
Number = "",
Object = "",
Operator = "",
Package = "",
Property = "",
Reference = "",
Snippet = "",
String = "",
Struct = "",
Text = "",
TypeParameter = "",
Unit = "",
Value = "",
Variable = "",
},
},
}

View file

@ -0,0 +1,38 @@
local function select_or_create(search)
local grapple = require("grapple")
if grapple.exists(search) then
grapple.select(search)
else
grapple.tag()
end
end
return {
"cbochs/grapple.nvim",
dependencies = {
{ "nvim-tree/nvim-web-devicons", lazy = true },
},
lazy = false,
cmd = "Grapple",
config = function()
local telescope = require("telescope")
telescope.load_extension("grapple")
end,
keys = {
{ "<leader><leader>a", "<cmd>Grapple toggle<cr>", desc = "Toggle bookmark for current file" },
{ "<leader><leader>D", "<cmd>Grapple reset<cr>", desc = "Delete all bookmarks" },
{ "<leader><leader>t", "<cmd>Grapple toggle_tags<cr>", desc = "Toggle bookmarks window" },
{ "<leader><leader>T", "<cmd>Grapple toggle_scopes<cr>", desc = "Toggle scopes window" },
{ "<leader><leader>n", "<cmd>Grapple cycle forward<cr>", desc = "Next bookmark" },
{ "<leader><leader>N", "<cmd>Grapple cycle backward<cr>", desc = "Prev bookmark" },
{ "<leader><leader>j", function() select_or_create({ index = 1 }) end, desc = "Go or create bookmark 1" },
{ "<leader><leader>k", function() select_or_create({ index = 2 }) end, desc = "Go or create bookmark 2" },
{ "<leader><leader>l", function() select_or_create({ index = 3 }) end, desc = "Go or create bookmark 3" },
{ "<leader><leader>ñ", function() select_or_create({ index = 4 }) end, desc = "Go or create bookmark 4" },
{ "<leader><leader>J", "<cmd>Grapple tag index=1<cr>", desc = "Override bookmark 1" },
{ "<leader><leader>K", "<cmd>Grapple tag index=2<cr>", desc = "Override bookmark 2" },
{ "<leader><leader>L", "<cmd>Grapple tag index=3<cr>", desc = "Override bookmark 3" },
{ "<leader><leader>Ñ", "<cmd>Grapple tag index=4<cr>", desc = "Override bookmark 4" },
},
}

View file

@ -0,0 +1,24 @@
return {
{
"LudoPinelli/comment-box.nvim",
opts = {
outer_blank_lines = true,
},
keys = {
{ "gcb", function() require("comment-box").lcbox() end, { desc = "Create a comment box", mode = { "n", "v" }, } },
{ "gcl", function() require("comment-box").llline() end, { desc = "Create a comment line", mode = { "n", "v" }, } },
},
},
{
"folke/todo-comments.nvim",
cmd = { "TodoTrouble", "TodoTelescope" },
event = { "BufReadPost", "BufNewFile" },
config = true,
keys = {
{ "]t", function() require("todo-comments").jump_next() end, desc = "Next todo comment" },
{ "[t", function() require("todo-comments").jump_prev() end, desc = "Previous todo comment" },
{ "<leader>ft", "<cmd>TodoTrouble<cr>", desc = "Find todos (Trouble)" },
{ "<leader>fT", "<cmd>TodoTelescope<cr>", desc = "Find todos (Telescope)" },
},
}
}

View file

@ -0,0 +1,44 @@
return {
"kristijanhusak/vim-dadbod-ui",
dependencies = {
{ "tpope/vim-dadbod", lazy = true },
{ "kristijanhusak/vim-dadbod-completion", ft = { "sql", "mysql", "plsql" }, lazy = true },
},
cmd = {
"DBUI",
"DBUIToggle",
"DBUIAddConnection",
"DBUIFindBuffer",
},
keys = {
{ "<Leader>ud", "<CMD>DBUIToggle<CR>", desc = "Toggle DB UI" },
},
init = function()
-- Your DBUI configuration
vim.g.db_ui_use_nerd_fonts = 1
vim.g.db_ui_force_echo_notifications = 1
vim.api.nvim_create_autocmd("FileType", {
pattern = {
"sql",
"mysql",
"plsql",
},
command = [[setlocal omnifunc=vim_dadbod_completion#omni]],
})
vim.api.nvim_create_autocmd("FileType", {
pattern = {
"sql",
"mysql",
"plsql",
},
callback = function()
---@diagnostic disable-next-line: missing-fields
require("cmp").setup.buffer({
sources = { { name = "vim-dadbod-completion" }, { name = "buffer" } },
})
end,
})
end,
}

View file

@ -0,0 +1,15 @@
return {
"danymat/neogen",
opts = { snippet_engine = "luasnip" },
dependencies = { "nvim-treesitter/nvim-treesitter" },
version = "*", -- stable releases
keys = {
{
"gcd",
function()
require("neogen").generate()
end,
desc = "Generate comment docstring",
},
},
}

View file

@ -0,0 +1,33 @@
return {
"mikavilpas/yazi.nvim",
keys = {
{
"<leader>e",
"<cmd>Yazi<cr>",
desc = "Open yazi at the current file",
},
{
-- Open in the current working directory
"<leader>E",
"<cmd>Yazi cwd<cr>",
desc = "Open the file manager in nvim's working directory",
},
},
opts = {
-- if you want to open yazi instead of netrw, see below for more info
open_for_directories = true,
open_multiple_tabs = true,
floating_window_scaling_factor = 1,
keymaps = {
show_help = '<f1>',
open_file_in_vertical_split = '<c-v>',
open_file_in_horizontal_split = '<c-s>',
open_file_in_tab = '<c-t>',
grep_in_directory = '<c-w>',
cycle_open_buffers = '<tab>',
copy_relative_path_to_selected_files = '<c-y>',
send_to_quickfix_list = '<c-q>',
change_working_directory = "<c-\\>",
},
},
}

View file

@ -0,0 +1,124 @@
return {
"stevearc/conform.nvim",
event = { "BufWritePre" },
cmd = { "ConformInfo" },
opts = {
-- log_level = vim.log.levels.DEBUG,
-- See aviable formatters in: https://github.com/stevearc/conform.nvim#formatters
-- Formatters can be installed by mason
formatters_by_ft = {
-- Conform will run multiple formatters sequentially
-- Use a stop_after_first = true to run only the first available formatter
-- Use the "_" filetype to run formatters on filetypes that don't
-- have other formatters configured.
["_"] = { "trim_whitespace" },
blade = { "blade-formatter" },
css = { "biome" },
go = { "gofumpt", "goimports_reviser", "golines" },
html = { "djlint", "prettierd", stop_after_first = true },
htmldjango = { "djlint", stop_after_first = true },
javascript = { "biome" },
javascriptreact = { "biome" },
json = { "biome" },
jsonc = { "biome" },
lua = { "stylua" },
markdown = { "markdownlint" },
nim = { "nimpretty" },
php = { "pint" },
python = { "ruff_format", "ruff_organize_imports" },
scss = { "prettierd", "prettier", stop_after_first = true },
sh = { "shfmt" },
toml = { "taplo" },
typescript = { "biome" },
typescriptreact = { "biome" },
xml = { "lemminx" },
zsh = { "shfmt" },
sql = { "sleek" }
},
formatters = {
djlint = {
prepend_args = {
"--format-css",
"--indent-css",
"2",
"--format-js",
"--indent-js",
"2",
"--indent",
"2",
"--preserve-blank-lines",
"--quiet"
}
}
},
format_on_save = function(bufnr)
-- Disable with a global or buffer-local variable
if vim.g.disable_autoformat or vim.b[bufnr].disable_autoformat then
return
end
return { timeout_ms = 2000, lsp_fallback = true }
end,
},
config = function(_, opts)
require("conform").setup(opts)
local function toggleAutoFormat()
-- to make this global, change b to g
if vim.b.disable_autoformat == nil then
vim.b.disable_autoformat = true
print("Autoformat set to: " .. tostring(not vim.b.disable_autoformat))
return
end
vim.b.disable_autoformat = not vim.b.disable_autoformat
print("Autoformat set to: " .. tostring(not vim.b.disable_autoformat))
end
MAP("n", "<leader>uf", toggleAutoFormat, "Toggle auto format")
vim.api.nvim_create_user_command("Fmt", function(args)
local range = nil
if args.count ~= -1 then
local end_line = vim.api.nvim_buf_get_lines(0, args.line2 - 1, args.line2, true)[1]
range = {
start = { args.line1, 0 },
["end"] = { args.line2, end_line:len() },
}
end
local function callback(err, did_edit)
if not did_edit then
vim.notify("The file was not formatted:\n" .. tostring(err), vim.log.levels.ERROR)
return
end
if args.bang then
vim.cmd("w")
end
end
require("conform").format(
{
async = true,
lsp_format = "fallback",
range = range,
formatters = args.fargs
},
callback
)
end, {
range = true,
bang = true,
force = true,
desc = "Format the document",
nargs = '*',
-- complete = function()
-- local formatters = require('conform').formatters_by_ft
--
-- return vim.tbl_keys(formatters)
-- end
})
end,
}

View file

@ -0,0 +1,52 @@
local const = require("aleidk.constants")
return {
{
"lewis6991/gitsigns.nvim",
event = { "BufReadPre", "BufNewFile" },
opts = {
-- See `:help gitsigns.txt`
signcolumn = true, -- Toggle with `:Gitsigns toggle_signs`
numhl = true, -- Toggle with `:Gitsigns toggle_numhl`
linehl = false, -- Toggle with `:Gitsigns toggle_linehl`
word_diff = false, -- Toggle with `:Gitsigns toggle_word_diff`
signs = {
add = { text = const.icons.git.added },
change = { text = const.icons.git.modified },
delete = { text = const.icons.git.removed },
topdelete = { text = const.icons.git.removed },
changedelete = { text = const.icons.git.removed },
untracked = { text = "" },
},
signs_staged = {
add = { text = const.icons.git.added },
change = { text = const.icons.git.modified },
delete = { text = const.icons.git.removed },
topdelete = { text = const.icons.git.removed },
changedelete = { text = const.icons.git.removed },
untracked = { text = "" },
},
on_attach = function(buffer)
local gs = package.loaded.gitsigns
local function map(mode, l, r, desc)
vim.keymap.set(mode, "<leader>g" .. l, r, { buffer = buffer, desc = desc })
end
-- stylua: ignore start
map("n", "j", gs.next_hunk, "Next Hunk")
map("n", "k", gs.prev_hunk, "Prev Hunk")
map({ "n", "v" }, "s", ":Gitsigns stage_hunk<CR>", "Stage Hunk")
map({ "n", "v" }, "r", ":Gitsigns reset_hunk<CR>", "Reset Hunk")
map("n", "u", gs.undo_stage_hunk, "Undo Stage Hunk")
map("n", "R", gs.reset_buffer, "Reset Buffer")
map("n", "<TAB>", gs.preview_hunk, "Preview Hunk")
map("n", "l", function() gs.blame_line({ full = true }) end, "Blame Line")
map("n", "L", gs.toggle_current_line_blame, "Toggle current line blame")
map("n", "d", gs.toggle_word_diff, "Toggle word diff")
map("n", "h", "<CMD>diffget<CR>", "Diff This with last commit")
map("n", "l", "<CMD>diffput<CR>", "Diff This with last commit")
end,
},
},
}

View file

@ -0,0 +1,30 @@
return {
-- Add indentation guides even on blank lines
"lukas-reineke/indent-blankline.nvim",
dependencies = { "nvim-treesitter/nvim-treesitter" },
main = "ibl",
opts = {
-- char = "▏",
indent = {
char = "",
tab_char = "",
},
scope = {
enabled = true,
},
exclude = {
filetypes = {
"help",
"alpha",
"dashboard",
"neo-tree",
"Trouble",
"lazy",
"mason",
"notify",
"toggleterm",
"lazyterm",
},
},
},
}

View file

@ -1,6 +1,42 @@
return {
'tpope/vim-sleuth', -- Detect tabstop and shiftwidth automatically
{ "nvim-tree/nvim-web-devicons", lazy = true },
{
-- Highlight word under cursor
"RRethy/vim-illuminate",
event = { "BufReadPost", "BufNewFile" },
opts = {
delay = 200,
filetypes_denylist = {
'dirbuf',
'dirvish',
'fugitive',
'aerial',
},
},
config = function(_, opts)
require("illuminate").configure(opts)
end,
},
{
"ckolkey/ts-node-action",
dependencies = { "nvim-treesitter" },
opts = {},
keys = {
{ "<leader>ls", function() require("ts-node-action").node_action() end, desc = "Node Action" }
}
},
{
"Wansmer/treesj",
cmd = { "TSJToggle" },
keys = {
{ "<leader>lm", "<CMD>TSJToggle<CR>", desc = "Toggle treesitter join" },
},
dependencies = { "nvim-treesitter/nvim-treesitter" },
opts = {
use_default_keymaps = true,
},
},
}

View file

@ -0,0 +1,25 @@
return {
"mfussenegger/nvim-lint",
event = "VeryLazy",
config = function()
local lint = require("lint")
lint.linters.gitlint.stdin = true
lint.linters.gitlint.args = { "--contrib", "contrib-title-conventional-commits", "--msg-filename", "-" }
lint.linters_by_ft = {
-- astro = { "eslint_d" },
python = { "ruff" },
sh = { "shellcheck" },
NeogitCommitMessage = { "gitlint" },
gitcommit = { "gitlint" },
markdown = { "markdownlint" },
}
vim.api.nvim_create_autocmd({ "BufWritePost" }, {
callback = function()
require("lint").try_lint()
end,
})
end,
}

View file

@ -0,0 +1,27 @@
return {
"L3MON4D3/LuaSnip",
dependencies = {
"rafamadriz/friendly-snippets",
config = function()
require("luasnip.loaders.from_vscode").lazy_load()
end,
},
opts = {
history = true,
delete_check_events = "TextChanged",
},
-- stylua: ignore
keys = {
{
"<tab>",
function()
return require("luasnip").jumpable(1) and "<Plug>luasnip-jump-next" or "<tab>"
end,
expr = true,
silent = true,
mode = "i",
},
{ "<tab>", function() require("luasnip").jump(1) end, mode = "s" },
{ "<s-tab>", function() require("luasnip").jump(-1) end, mode = { "i", "s" } },
},
}

View file

@ -0,0 +1,15 @@
return {
{
"MeanderingProgrammer/markdown.nvim",
name = "render-markdown", -- Only needed if you have another plugin named markdown.nvim
-- dependencies = { 'nvim-treesitter/nvim-treesitter', 'echasnovski/mini.nvim' }, -- if you use the mini.nvim suite
-- dependencies = { 'nvim-treesitter/nvim-treesitter', 'echasnovski/mini.icons' }, -- if you use standalone mini plugins
dependencies = { "nvim-treesitter/nvim-treesitter", "nvim-tree/nvim-web-devicons" }, -- if you prefer nvim-web-devicons
opts = {
file_types = { 'markdown', 'copilot-chat' },
sign = {
enabled = false,
},
},
},
}

View file

@ -0,0 +1,59 @@
return {
{
"nosduco/remote-sshfs.nvim",
dependencies = { "nvim-telescope/telescope.nvim" },
cmd = { "RemoteSSHFSConnect" },
config = function()
require("remote-sshfs").setup({})
require("telescope").load_extension("remote-sshfs")
end,
},
{
"amitds1997/remote-nvim.nvim",
version = "*", -- Pin to GitHub releases
dependencies = {
"nvim-lua/plenary.nvim", -- For standard functions
"MunifTanjim/nui.nvim", -- To build the plugin UI
"nvim-telescope/telescope.nvim", -- For picking b/w different remote methods
},
opts = {
remote = {
copy_dirs = {
data = {
base = vim.fn.stdpath("data"), -- Path from where data has to be copied. You can choose to copy entire path or subdirectories inside using `dirs`
dirs = { "lazy" }, -- Directories inside `base` to copy over. If this is set to string "*"; it means entire `base` should be copied over
compression = {
enabled = true, -- Should data be compressed before uploading
additional_opts = { "--exclude-vcs" }, -- Any arguments that can be passed to `tar` for compression can be specified here to improve your compression
},
},
-- cache = {
-- base = vim.fn.stdpath("cache"),
-- dirs = {},
-- compression = {
-- enabled = true,
-- },
-- },
state = {
base = vim.fn.stdpath("state"),
dirs = {},
compression = {
enabled = true,
},
},
},
},
client_callback = function(port, workspace_config)
local cmd = ("tmux new-window 'nvim --server localhost:%s --remote-ui' && tmux select-window -t:$"):format(port)
vim.fn.jobstart(cmd, {
detach = true,
on_exit = function(job_id, exit_code, event_type)
-- This function will be called when the job exits
print("Client", job_id, "exited with code", exit_code, "Event type:", event_type)
end,
})
end,
},
config = true,
}
}

View file

@ -0,0 +1,93 @@
---@module 'trouble'
return {
"folke/trouble.nvim",
dependencies = { "nvim-tree/nvim-web-devicons" },
cmd = { "Trouble" },
keys = {
{
"<leader>fD",
"<cmd>Trouble diagnostics open<cr>",
desc = "Find diagnostics (Trouble)",
},
{
"<leader>fd",
"<cmd>Trouble diagnostics open filter.buf=0<cr>",
desc = "Find buffer diagnostics (Trouble)",
},
{
"<leader>ll",
"<cmd>Trouble symbols open<cr>",
desc = "Symbols (Trouble)",
},
{
"<leader>li",
"<cmd>Trouble lsp open<cr>",
desc = "LSP info of node (Trouble)",
},
{
"<leader>fq",
"<cmd>Trouble qflist open<cr>",
desc = "Quickfix List (Trouble)",
},
},
opts = function()
---@type trouble.Window.opts
local win_opts = {
-- size = { width = 30, height = 0.5 },
minimal = true,
border = "rounded",
position = "bottom",
}
---@type trouble.Config
return {
focus = true,
---@type trouble.Window.opts
preview = {
type = "split",
relative = "win",
position = "top",
},
---@type table<string, trouble.Action.spec|false>
keys = {
["<s-cr>"] = "jump_close",
["<cr>"] = "jump",
["<2-leftmouse>"] = "jump",
["<c-v>"] = "jump_split_close",
["<c-s>"] = "jump_vsplit_close",
["v"] = "jump_split_close",
["s"] = "jump_vsplit_close",
["<c-k>"] = "cancel", -- hack to fool myself into thinking I move to the avobe window
["a"] = function(view, ctx)
-- TODO: this is not possible until this issue is solved
-- https://github.com/neovim/neovim/issues/31206
local trouble = require("trouble")
view:action("jump_only")
vim.lsp.buf.code_action()
trouble.focus(view, ctx)
end,
},
win = win_opts,
---@type table<string, trouble.Mode>
modes = {
symbols = {
focus = true,
win = win_opts
},
lsp_references = {
focus = true,
win = win_opts
},
lsp = {
focus = true,
win = win_opts
},
}
}
end
}

View file

@ -0,0 +1,18 @@
return {
"pmizio/typescript-tools.nvim",
dependencies = { "nvim-lua/plenary.nvim", "neovim/nvim-lspconfig" },
opts = {
init_options = {
preferences = {
disableSuggestions = true,
},
},
settings = {
-- array of strings("fix_all"|"add_missing_imports"|"remove_unused"|
-- "remove_unused_imports"|"organize_imports") -- or string "all"
-- to include all supported code actions
-- specify commands exposed as code_actions
expose_as_code_action = "all",
},
},
}