promote nvim_unstable

This commit is contained in:
Alexander Navarro 2025-05-22 10:55:13 -04:00
parent f1430fa64d
commit a6c0b4b867
66 changed files with 489 additions and 498 deletions

View file

@ -1,9 +0,0 @@
(directive) @function
(directive_start) @function
(directive_end) @function
(comment) @comment
((parameter) @include (#set! "priority" 110))
((php_only) @include (#set! "priority" 110))
((bracket_start) @function (#set! "priority" 120))
((bracket_end) @function (#set! "priority" 120))
(keyword) @function

View file

@ -1,3 +0,0 @@
((php) @injection.content
(#set! injection.combined)
(#set! injection.language php))

View file

@ -1,7 +1,33 @@
-- Loadnoptions before anything
-- Bootstrap lazy.nvim
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
if not (vim.uv or vim.loop).fs_stat(lazypath) then
local lazyrepo = "https://github.com/folke/lazy.nvim.git"
local out = vim.fn.system({ "git", "clone", "--filter=blob:none", "--branch=stable", lazyrepo, lazypath })
if vim.v.shell_error ~= 0 then
vim.api.nvim_echo({
{ "Failed to clone lazy.nvim:\n", "ErrorMsg" },
{ out, "WarningMsg" },
{ "\nPress any key to exit..." },
}, true, {})
vim.fn.getchar()
os.exit(1)
end
end
vim.opt.rtp:prepend(lazypath)
require("aleidk.options")
require("aleidk.lazy")
require("aleidk.keymaps")
require("aleidk.autocmds")
require("aleidk.keymaps")
-- Setup lazy.nvim
require("lazy").setup({
spec = {
-- import your plugins
{ import = "aleidk/plugins" },
},
-- Configure any other settings here. See the documentation for more details.
-- colorscheme that will be used when installing plugins.
install = { colorscheme = { "habamax" } },
-- automatically check for plugin updates
-- checker = { enabled = true },
})

View file

@ -1,57 +1,28 @@
{
"LuaSnip": { "branch": "master", "commit": "0f7bbce41ea152a94d12aea286f2ce98e63c0f58" },
"blink.cmp": { "branch": "main", "commit": "81069e3955a8b4d5063287a2a6a47a844e9ca2cb" },
"blink.compat": { "branch": "main", "commit": "08943fdf2eb00432d6205db6d0239434135416bd" },
"catppuccin": { "branch": "main", "commit": "faf15ab0201b564b6368ffa47b56feefc92ce3f4" },
"ccc.nvim": { "branch": "main", "commit": "7c639042583c7bdc7ce2e37e5a0e0aa6d0659c6a" },
"comment-box.nvim": { "branch": "main", "commit": "06bb771690bc9df0763d14769b779062d8f12bc5" },
"conform.nvim": { "branch": "master", "commit": "a203480a350b03092e473bf3001733d547160a73" },
"copilot-lualine": { "branch": "main", "commit": "f40450c3e138766026327e7807877ea860618258" },
"dressing.nvim": { "branch": "master", "commit": "fc78a3ca96f4db9f8893bb7e2fd9823e0780451b" },
"friendly-snippets": { "branch": "main", "commit": "de8fce94985873666bd9712ea3e49ee17aadb1ed" },
"gitsigns.nvim": { "branch": "main", "commit": "5f808b5e4fef30bd8aca1b803b4e555da07fc412" },
"fzf-lua": { "branch": "main", "commit": "8adf950093af5361621cf52208d64995b1af78b5" },
"grapple.nvim": { "branch": "main", "commit": "b41ddfc1c39f87f3d1799b99c2f0f1daa524c5f7" },
"indent-blankline.nvim": { "branch": "master", "commit": "7871a88056f7144defca9c931e311a3134c5d509" },
"lazy.nvim": { "branch": "main", "commit": "56ead98e05bb37a4ec28930a54d836d033cf00f2" },
"lazydev.nvim": { "branch": "main", "commit": "f59bd14a852ca43db38e3662395354cb2a9b13e0" },
"lualine.nvim": { "branch": "master", "commit": "2a5bae925481f999263d6f5ed8361baef8df4f83" },
"luvit-meta": { "branch": "main", "commit": "57d464c4acb5c2e66bd4145060f5dc9e96a7bbb7" },
"mason-lspconfig.nvim": { "branch": "main", "commit": "43894adcf10bb1190c2184bd7c1750e8ea2b3dce" },
"mason.nvim": { "branch": "main", "commit": "e2f7f9044ec30067bc11800a9e266664b88cda22" },
"mini.clue": { "branch": "main", "commit": "8e329f586a7cfd06085859066a4b60965fc4ecce" },
"mini.comment": { "branch": "main", "commit": "03c13e37318bdb18481311c0ac1adc9ed731caf1" },
"mini.surround": { "branch": "main", "commit": "0e67c4bc147f2a15cee94e7c94dcc0e115b9f55e" },
"mini.nvim": { "branch": "main", "commit": "94cae4660a8b2d95dbbd56e1fbc6fcfa2716d152" },
"neogen": { "branch": "main", "commit": "dc50715c009f89b8111197fd2f282f6042daa7ea" },
"noice.nvim": { "branch": "main", "commit": "c6f6fb178ebe9b4fd90383de743c3399f8c3a37c" },
"nui.nvim": { "branch": "main", "commit": "b58e2bfda5cea347c9d58b7f11cf3012c7b3953f" },
"nvim-autopairs": { "branch": "master", "commit": "b464658e9b880f463b9f7e6ccddd93fb0013f559" },
"nvim-lint": { "branch": "master", "commit": "6b46370d02cd001509a765591a3ffc481b538794" },
"nvim-lspconfig": { "branch": "master", "commit": "4ae9796c4e95ca84ec77946a9f9089b8f1a3eec9" },
"nvim-notify": { "branch": "master", "commit": "fbef5d32be8466dd76544a257d3f3dce20082a07" },
"nvim-treesitter": { "branch": "master", "commit": "8d4fdc5e47e2a4e00179e43f56221250ce365973" },
"nvim-treesitter-context": { "branch": "master", "commit": "6b081ea63a3711243d11540ce28ccdb6f35ecd33" },
"nvim-treesitter-textobjects": { "branch": "master", "commit": "ad8f0a472148c3e0ae9851e26a722ee4e29b1595" },
"nvim-ts-autotag": { "branch": "main", "commit": "e239a560f338be31337e7abc3ee42515daf23f5e" },
"nvim-ts-context-commentstring": { "branch": "main", "commit": "9c74db656c3d0b1c4392fc89a016b1910539e7c0" },
"nvim-web-devicons": { "branch": "master", "commit": "edbe0a65cfacbbfff6a4a1e98ddd60c28c560509" },
"overseer.nvim": { "branch": "master", "commit": "10ee48ff96c8d1049efb278ea4c8cf9f3b0e4326" },
"plenary.nvim": { "branch": "master", "commit": "2d9b06177a975543726ce5c73fca176cedbffe9d" },
"remote-nvim.nvim": { "branch": "main", "commit": "66fc20fd259401c7bb6ac5189ecb6283c2eb65d2" },
"remote-sshfs.nvim": { "branch": "main", "commit": "03f6c40c4032eeb1ab91368e06db9c3f3a97a75d" },
"render-markdown": { "branch": "main", "commit": "6096cf3608b576a38fd1396227dbc0473091714d" },
"smart-splits.nvim": { "branch": "master", "commit": "fc7bb00fe67ab504356bed4310d23c2e4cb4b06b" },
"telescope-fzf-native.nvim": { "branch": "main", "commit": "cf48d4dfce44e0b9a2e19a008d6ec6ea6f01a83b" },
"telescope.nvim": { "branch": "0.1.x", "commit": "a0bbec21143c7bc5f8bb02e0005fa0b982edc026" },
"todo-comments.nvim": { "branch": "main", "commit": "ae0a2afb47cf7395dc400e5dc4e05274bf4fb9e0" },
"treesj": { "branch": "main", "commit": "03415ac60791d48e120a80d37e080744faf3ac15" },
"trouble.nvim": { "branch": "main", "commit": "46cf952fc115f4c2b98d4e208ed1e2dce08c9bf6" },
"ts-node-action": { "branch": "master", "commit": "6d3b60754fd87963d70eadaa2f77873b447eac26" },
"typescript-tools.nvim": { "branch": "master", "commit": "346062e8cd06e82776b60785a040dfbbdcb6de77" },
"undotree": { "branch": "master", "commit": "78b5241191852ffa9bb5da5ff2ee033160798c3b" },
"vim-dadbod": { "branch": "master", "commit": "fe5a55e92b2dded7c404006147ef97fb073d8b1b" },
"vim-dadbod-completion": { "branch": "master", "commit": "da0e75c09c27a82aad078d993bb1b2f4afd43427" },
"vim-dadbod-ui": { "branch": "master", "commit": "28a16902cb2134c934b85da5250033ee43b0dee5" },
"vim-illuminate": { "branch": "master", "commit": "5eeb7951fc630682c322e88a9bbdae5c224ff0aa" },
"vim-sleuth": { "branch": "master", "commit": "be69bff86754b1aa5adcbb527d7fcd1635a84080" },
"yazi.nvim": { "branch": "main", "commit": "053867916a9be3cb46f84b6f095ee731bbddd213" }
}

View file

@ -1,10 +1,34 @@
-- Highlight on yank
-- See `:help vim.highlight.on_yank()`
local highlight_group = vim.api.nvim_create_augroup("YankHighlight", { clear = true })
vim.api.nvim_create_autocmd("TextYankPost", {
callback = function()
vim.highlight.on_yank()
end,
group = highlight_group,
pattern = "*",
vim.api.nvim_create_autocmd('LspAttach', {
callback = function(args)
local client = vim.lsp.get_client_by_id(args.data.client_id)
if not client then
return
end
vim.bo[args.buf].omnifunc = 'v:lua.MiniCompletion.completefunc_lsp'
-- Prefer LSP folding if client supports it
if client:supports_method('textDocument/foldingRange') then
local win = vim.api.nvim_get_current_win()
vim.wo[win][0].foldexpr = 'v:lua.vim.lsp.foldexpr()'
end
vim.keymap.set({ "n", "x", "v" }, "<leader>la", vim.lsp.buf.code_action, { buffer = args.buf, desc = "Code Action" })
vim.keymap.set({ "n", "x", "v" }, "<leader>ld", vim.diagnostic.open_float, { desc = "Show diagnostic under cursor" })
vim.keymap.set({ "n", "x", "v" }, "<leader>lc", function()
local curpos = vim.fn.getcurpos()
local diagnostics = vim.diagnostic.get(0, { lnum = curpos[2] - 1 })
if #diagnostics == 0 then
vim.notify("No diagnostic under cursor")
return
end
local diagnostic = diagnostics[1]
local msg = string.format("%s [%s]: %s", diagnostic.source, diagnostic.code, diagnostic.message)
vim.fn.setreg("+", msg)
vim.notify("Diagnostic saved to clipboard:\n\n" .. msg)
end, { buffer = args.buf, desc = "Copy diagnostic to clipboard" })
end,
})

View file

@ -1,77 +1,34 @@
-- [[ Basic Keymaps ]]
function MAP(mode, l, r, desc)
vim.keymap.set(mode, l, r, { desc = desc, silent = true })
end
function ReloadModule(module)
package.loaded[module] = nil
require(module)
end
local function default(desc)
return {
silent = true,
desc = desc,
}
end
local function fixIndentation()
local indent = 2
vim.opt.tabstop = indent
vim.opt.shiftwidth = indent
vim.opt.softtabstop = indent
vim.cmd("retab")
end
-- Keymaps for better default experience
-- See `:help vim.keymap.set()`
vim.keymap.set({ "n", "v" }, "<Space>", "<Nop>", { silent = true })
-- vim.keymap.set("n", "<C-s>", "<CMD>w<CR>", default("Keep cursor centered while junping"))
-- Remap for dealing with word wrap
vim.keymap.set("n", "k", "v:count == 0 ? 'gk' : 'k'", { expr = true, silent = true })
vim.keymap.set("n", "j", "v:count == 0 ? 'gj' : 'j'", { expr = true, silent = true })
vim.keymap.set("n", "J", "mzJ`z", default("Keep cursor in column while joining lines"))
vim.keymap.set("n", "|", ":vs<CR>", default("Open vsplit"))
vim.keymap.set("n", "°", ":sp<CR>", default("Open split"))
vim.keymap.set("n", "<C-d>", "<C-d>zz", default("Keep cursor centered while junping"))
vim.keymap.set("n", "<C-u>", "<C-u>zz", default("Keep cursor centered while junping"))
vim.keymap.set("n", "n", "nzzzv", default("Keep cursor centered while searching"))
vim.keymap.set("n", "N", "Nzzzv", default("Keep cursor centered while searching"))
-- stylua: ignore start
-- QoL normalization's
vim.keymap.set("n", "Q", "<nop>", {})
vim.keymap.set({ "n", "v" }, "<Space>", "<Nop>", { desc = "Prevent cursor movement", silent = true })
vim.keymap.set("n", "k", "v:count == 0 ? 'gk' : 'k'",
{ desc = "Move cursor regardless of word wrap", expr = true, silent = true })
vim.keymap.set("n", "j", "v:count == 0 ? 'gj' : 'j'",
{ desc = "Move cursor regardless of word wrap", expr = true, silent = true })
vim.keymap.set("n", "J", "mzJ`z", { desc = "Keep cursor in column while joining lines", silent = true })
vim.keymap.set(
"n",
"<leader>rw",
[[:%s/\<<C-r><C-w>\>/<C-r><C-w>/gI<Left><Left><Left>]],
default("Search and replace current word")
)
-- vim.keymap.set("n", "<C-d>", "<C-d>zz", { desc = "Keep cursor centered while junping", silent = true })
-- vim.keymap.set("n", "<C-u>", "<C-u>zz", { desc = "Keep cursor centered while junping", silent = true })
-- vim.keymap.set("n", "n", "nzzzv", { desc = "Keep cursor centered while searching", silent = true })
-- vim.keymap.set("n", "N", "Nzzzv", { desc = "Keep cursor centered while searching", silent = true })
-- vim.keymap.set("n", "<leader>rR", ":s/", default("Search and replace inline"))
-- vim.keymap.set("n", "<leader>rr", ":%s/", default("Search and replace globally"))
-- vim.keymap.set("v", "<leader>r", ":s/", default("Search and replace in selection"))
-- Utils
vim.keymap.set("n", "|", ":vs<CR>", { desc = "Create vsplit", silent = true })
vim.keymap.set("n", "°", ":sp<CR>", { desc = "Create split", silent = true })
vim.keymap.set("v", "p", [["_dP]], default("Paste without lossing yanked text"))
vim.keymap.set("v", "p", [["_dP]], { desc = "Paste without lossing yanked text", silent = true })
vim.keymap.set("n", "<Leader>uh", ":nohl<CR>", { desc = "Remove search highlight", silent = true })
vim.keymap.set("v", "J", ":m '>+1<CR>gv=gv", default("Move selection down"))
vim.keymap.set("v", "K", ":m '<-2<CR>gv=gv", default("Move selection up"))
vim.keymap.set("n", "<Leader>uI", fixIndentation, default("Fix indentation"))
vim.keymap.set("n", "<Leader>uO", function() ReloadModule('aleidk.options') end,
default("Reload the options configuration"))
-- Buffer manipulation
vim.keymap.set("n", "<leader>bc", "<Cmd>bd<CR>", { desc = "Close buffer", silent = true })
vim.keymap.set("n", "<leader>bh", "<Cmd>bp<CR>", { desc = "Prev buffer", silent = true })
vim.keymap.set("n", "<leader>bl", "<Cmd>bn<CR>", { desc = "Next buffer", silent = true })
vim.keymap.set("n", "<leader>bA", "<Cmd>bufdo bd<CR>", { desc = "Close all buffers", silent = true })
vim.keymap.set("n", "<Leader>uh", ":nohl<CR>", default("Remove search highlight"))
vim.keymap.set("n", "<C-h>", "<C-w>h", { desc = "Move to left window", silent = true })
vim.keymap.set("n", "<C-j>", "<C-w>j", { desc = "Move to bottom window", silent = true })
vim.keymap.set("n", "<C-k>", "<C-w>k", { desc = "Move to top window", silent = true })
vim.keymap.set("n", "<C-l>", "<C-w>l", { desc = "Move to right window", silent = true })
vim.keymap.set("t", "<ESC>", "<C-\\><C-n>", default("Exit insert mode on terminal"))
vim.keymap.set("n", "<leader>bc", "<Cmd>bd<CR>", default("Close buffer"))
vim.keymap.set("n", "<leader>bh", "<Cmd>bp<CR>", default("Prev buffer"))
vim.keymap.set("n", "<leader>bl", "<Cmd>bn<CR>", default("Next buffer"))
vim.keymap.set("n", "<leader>bA", "<Cmd>bufdo bd<CR>", default("Close all buffers"))
-- stylua: ignore end

View file

@ -1,35 +0,0 @@
-- Bootstrap lazy.nvim
-- Load this file after options has been set
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
if not (vim.uv or vim.loop).fs_stat(lazypath) then
local lazyrepo = "https://github.com/folke/lazy.nvim.git"
local out = vim.fn.system({ "git", "clone", "--filter=blob:none", "--branch=stable", lazyrepo, lazypath })
if vim.v.shell_error ~= 0 then
vim.api.nvim_echo({
{ "Failed to clone lazy.nvim:\n", "ErrorMsg" },
{ out, "WarningMsg" },
{ "\nPress any key to exit..." },
}, true, {})
vim.fn.getchar()
os.exit(1)
end
end
vim.opt.rtp:prepend(lazypath)
-- enabled_plugins is injected as a local variable in the top of the file by the dotfile manager
-- See: .dotter/global.toml inside [nvim.files] & [nvim.variables] table
require("lazy").setup({
spec = {
{ import = "aleidk.plugins-core" },
{ import = "aleidk.plugins-base" },
{ import = "aleidk.plugins-ide" },
},
install = { colorscheme = { "catppuccin" } },
-- checker = { enabled = true },
})
return {
enabled_plugins
}

View file

@ -9,10 +9,15 @@ vim.o.diffopt = "vertical,closeoff,filler"
local opt = vim.opt
-- stylua: ignore
opt.autowrite = true -- Enable auto write
opt.clipboard = "unnamedplus" -- Sync with system clipboard
opt.completeopt = "menu,menuone,noselect"
vim.schedule(function()
vim.opt.clipboard = 'unnamedplus'
end)
vim.o.winborder = 'rounded'
opt.breakindent = true -- Every wrapped line will continue visually indented
opt.autowrite = true -- Enable auto write
-- opt.completeopt = "menu,menuone,noselect"
vim.o.completeopt = 'noselect,menu,menuone,noinsert,popup'
opt.conceallevel = 2 -- Hide * markup for bold and italic
opt.confirm = true -- Confirm to save changes before exiting modified buffer
opt.cursorline = true -- Enable highlighting of the current line
@ -23,7 +28,8 @@ opt.grepprg = "rg --vimgrep"
opt.ignorecase = true -- Ignore case
opt.inccommand = "nosplit" -- preview incremental substitute
opt.laststatus = 0
opt.list = true -- Show some invisible characters (tabs...
vim.opt.list = true -- Sets how neovim will display certain whitespace characters in the editor.
vim.opt.listchars = { tab = '» ', trail = '·', nbsp = '' }
opt.mouse = "a" -- Enable mouse mode
opt.number = true -- Print line number
opt.pumblend = 10 -- Popup blend
@ -34,7 +40,7 @@ opt.sessionoptions = { "buffers", "curdir", "tabpages", "winsize" }
opt.shiftround = true -- Round indent
opt.shiftwidth = 2 -- Size of an indent
-- opt.shortmess:append({ W = true, I = true, c = true }) -- INFO: this control the format of some messages
opt.showmode = false -- Dont show mode since we have a statusline
opt.showmode = false -- Don't show mode since we have a statusline
opt.sidescrolloff = 8 -- Columns of context
opt.signcolumn = "yes" -- Always show the signcolumn, otherwise it would shift the text each time
opt.smartcase = true -- Don't ignore case with capitals
@ -44,101 +50,112 @@ opt.splitbelow = true -- Put new windows below current
opt.splitright = true -- Put new windows right of current
opt.tabstop = 2 -- Number of spaces tabs count for
opt.termguicolors = true -- True color support
opt.timeoutlen = 300
opt.undofile = true
opt.undolevels = 10000
opt.updatetime = 200 -- Save swap file and trigger CursorHold
opt.wildmode = "longest,list:full" -- Command-line completion mode
opt.winminwidth = 5 -- Minimum window width
opt.wrap = false -- Disable line wrap
vim.opt.inccommand = 'split' -- Preview substitutions live, as you type!
vim.o.sessionoptions = "blank,buffers,curdir,folds,help,tabpages,winsize,winpos,terminal,localoptions"
-- Nice and simple folding:
vim.o.foldenable = true
vim.o.foldlevel = 99
vim.o.foldmethod = "expr"
vim.o.foldexpr = "v:lua.vim.treesitter.foldexpr()"
vim.opt.fillchars:append({ fold = " " })
local fn = vim.fn
-- Quickfix customization
function _G.qftf(info)
local items
local ret = {}
-- The name of item in list is based on the directory of quickfix window.
-- Change the directory for quickfix window make the name of item shorter.
-- It's a good opportunity to change current directory in quickfixtextfunc :)
--
-- local alterBufnr = fn.bufname('#') -- alternative buffer is the buffer before enter qf window
-- local root = getRootByAlterBufnr(alterBufnr)
-- vim.cmd(('noa lcd %s'):format(fn.fnameescape(root)))
--
if info.quickfix == 1 then
items = fn.getqflist({ id = info.id, items = 0 }).items
else
items = fn.getloclist(info.winid, { id = info.id, items = 0 }).items
end
local limit = 31
local fnameFmt1, fnameFmt2 = "%-" .. limit .. "s", "…%." .. (limit - 1) .. "s"
local validFmt = "%s │%5d:%-3d│%s %s"
for i = info.start_idx, info.end_idx do
local e = items[i]
local fname = ""
local str
if e.valid == 1 then
if e.bufnr > 0 then
fname = fn.bufname(e.bufnr)
if fname == "" then
fname = "[No Name]"
else
fname = fname:gsub("^" .. vim.env.HOME, "~")
end
-- char in fname may occur more than 1 width, ignore this issue in order to keep performance
if #fname <= limit then
fname = fnameFmt1:format(fname)
else
fname = fnameFmt2:format(fname:sub(1 - limit))
end
end
local lnum = e.lnum > 99999 and -1 or e.lnum
local col = e.col > 999 and -1 or e.col
local qtype = e.type == "" and "" or " " .. e.type:sub(1, 1):upper()
str = validFmt:format(fname, lnum, col, qtype, e.text)
else
str = e.text
end
table.insert(ret, str)
end
return ret
local items
local ret = {}
-- The name of item in list is based on the directory of quickfix window.
-- Change the directory for quickfix window make the name of item shorter.
-- It's a good opportunity to change current directory in quickfixtextfunc :)
--
-- local alterBufnr = fn.bufname('#') -- alternative buffer is the buffer before enter qf window
-- local root = getRootByAlterBufnr(alterBufnr)
-- vim.cmd(('noa lcd %s'):format(fn.fnameescape(root)))
--
if info.quickfix == 1 then
items = fn.getqflist({ id = info.id, items = 0 }).items
else
items = fn.getloclist(info.winid, { id = info.id, items = 0 }).items
end
local limit = 31
local fnameFmt1, fnameFmt2 = "%-" .. limit .. "s", "…%." .. (limit - 1) .. "s"
local validFmt = "%s │%5d:%-3d│%s %s"
for i = info.start_idx, info.end_idx do
local e = items[i]
local fname = ""
local str
if e.valid == 1 then
if e.bufnr > 0 then
fname = fn.bufname(e.bufnr)
if fname == "" then
fname = "[No Name]"
else
fname = fname:gsub("^" .. vim.env.HOME, "~")
end
-- char in fname may occur more than 1 width, ignore this issue in order to keep performance
if #fname <= limit then
fname = fnameFmt1:format(fname)
else
fname = fnameFmt2:format(fname:sub(1 - limit))
end
end
local lnum = e.lnum > 99999 and -1 or e.lnum
local col = e.col > 999 and -1 or e.col
local qtype = e.type == "" and "" or " " .. e.type:sub(1, 1):upper()
str = validFmt:format(fname, lnum, col, qtype, e.text)
else
str = e.text
end
table.insert(ret, str)
end
return ret
end
-- TODO: how to customize?
vim.o.qftf = "{info -> v:lua._G.qftf(info)}"
vim.filetype.add({
-- Detect and assign filetype based on the extension of the filename
extension = {
mdx = "mdx",
log = "log",
conf = "conf",
env = "dotenv"
},
-- Detect and apply filetypes based on the entire filename
filename = {
[".env"] = "dotenv",
["env"] = "dotenv",
["tsconfig.json"] = "jsonc",
},
-- Detect and apply filetypes based on certain patterns of the filenames
pattern = {
-- INFO: Match filenames like - ".env.example", ".env.local" and so on
["%.env%.[%w_.-]+"] = "dotenv",
[".*%.blade%.php"] = "blade",
[".*%.hurl.*"] = "hurl",
[".*/hypr/.*%.conf"] = "hyprlang",
['.*/systemd/.*%.(%a+)'] = function(path, bufnr, ext)
vim.print(ext)
local allowed = { "container", "volume", "network", "build", "pod", "kube" }
for _, v in ipairs(allowed) do
if v == ext then
return "ini"
end
end
end,
},
-- Detect and assign filetype based on the extension of the filename
extension = {
mdx = "mdx",
log = "log",
conf = "conf",
env = "dotenv",
},
-- Detect and apply filetypes based on the entire filename
filename = {
[".env"] = "dotenv",
["env"] = "dotenv",
["tsconfig.json"] = "jsonc",
},
-- Detect and apply filetypes based on certain patterns of the filenames
pattern = {
-- INFO: Match filenames like - ".env.example", ".env.local" and so on
["%.env%.[%w_.-]+"] = "dotenv",
[".*%.blade%.php"] = "blade",
[".*%.hurl.*"] = "hurl",
[".*/hypr/.*%.conf"] = "hyprlang",
},
})
-- ╭─────────────────────────────────────────────────────────╮
-- │ LSP │
-- ╰─────────────────────────────────────────────────────────╯
vim.lsp.enable({
"rust_analyzer",
"lua_ls",
})
vim.diagnostic.config({
virtual_lines = { current_line = true },
})

View file

@ -1,6 +0,0 @@
return {
"windwp/nvim-autopairs",
event = "InsertEnter",
config = true,
opts = {}, -- this is equalent to setup({}) function
}

View file

@ -1,30 +0,0 @@
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,90 +0,0 @@
return {
-- Highlight, edit, and navigate code
"nvim-treesitter/nvim-treesitter",
event = { "BufReadPost", "BufNewFile", "BufWritePre", "VeryLazy" },
dependencies = {
"nvim-treesitter/nvim-treesitter-textobjects",
"JoosepAlviste/nvim-ts-context-commentstring",
"nvim-treesitter/nvim-treesitter-context",
{ "windwp/nvim-ts-autotag", opts = {} },
},
build = ":TSUpdate",
config = function()
---@diagnostic disable-next-line: missing-fields
require("nvim-treesitter.configs").setup({
-- Autoinstall languages that are not installed. Defaults to false (but you can change for yourself!)
auto_install = true,
highlight = { enable = true },
indent = { enable = true },
incremental_selection = {
enable = true,
},
textobjects = {
select = {
enable = true,
lookahead = true, -- Automatically jump forward to textobj, similar to targets.vim
keymaps = {
-- You can use the capture groups defined in textobjects.scm
["aa"] = "@parameter.outer",
["ia"] = "@parameter.inner",
["af"] = "@function.outer",
["if"] = "@function.inner",
["ac"] = "@class.outer",
["ic"] = "@class.inner",
},
},
move = {
enable = true,
set_jumps = true, -- whether to set jumps in the jumplist
goto_previous = { -- current or last start of object
["[["] = { query = "@local.scope", query_group = "locals", desc = "Next scope" },
["[f"] = "@function.outer",
["[c"] = "@class.outer",
},
goto_next = { -- next object end
["]]"] = { query = "@local.scope", query_group = "locals", desc = "Next scope" },
["]f"] = "@function.outer", -- current function end
["]c"] = "@class.outer",
},
},
swap = {
enable = true,
swap_next = {
["<leader>ln"] = "@parameter.inner",
},
swap_previous = {
["<leader>lN"] = "@parameter.inner",
},
},
},
-- autotag = { enable = true },
})
require('ts_context_commentstring').setup {
enable_autocmd = false,
}
local ts_repeat_move = require "nvim-treesitter.textobjects.repeatable_move"
-- Repeat movement with ; and ,
-- ensure , goes forward and ; goes backward regardless of the last direction
vim.keymap.set({ "n", "x", "o" }, ",", ts_repeat_move.repeat_last_move_next)
vim.keymap.set({ "n", "x", "o" }, ";", ts_repeat_move.repeat_last_move_previous)
-- Optionally, make builtin f, F, t, T also repeatable with ; and ,
vim.keymap.set({ "n", "x", "o" }, "f", ts_repeat_move.builtin_f_expr, { expr = true })
vim.keymap.set({ "n", "x", "o" }, "F", ts_repeat_move.builtin_F_expr, { expr = true })
vim.keymap.set({ "n", "x", "o" }, "t", ts_repeat_move.builtin_t_expr, { expr = true })
vim.keymap.set({ "n", "x", "o" }, "T", ts_repeat_move.builtin_T_expr, { expr = true })
vim.keymap.set("n", "[u", function()
require("treesitter-context").go_to_context()
end, { silent = true, noremap = true, desc = "Go up when context is out of view" })
vim.opt.foldmethod = "expr"
vim.opt.foldexpr = "nvim_treesitter#foldexpr()"
-- Uncoment this line to disable auto folding on file open
vim.cmd("set nofoldenable")
end,
}

View file

@ -1,217 +0,0 @@
local icons = require("aleidk.constants").icons
return {
{
"rcarriga/nvim-notify",
opts = {
render = "compact",
fps = "60",
timeout = 2000,
stages = "slide",
icons = {
DEBUG = "",
TRACE = "",
ERROR = icons.diagnostics.Error,
INFO = icons.diagnostics.Info,
WARN = icons.diagnostics.Warn,
}
}
},
{
-- better imputs
"stevearc/dressing.nvim",
opts = {
input = {
-- handle by noice
enabled = false,
},
},
},
{
"folke/noice.nvim",
event = "VeryLazy",
dependencies = {
"MunifTanjim/nui.nvim",
"rcarriga/nvim-notify",
},
---@type NoiceConfig
opts = {
presets = {
bottom_search = true,
long_message_to_split = true,
inc_rename = true,
lsp_doc_border = true,
},
lsp = {
override = {
-- override the default lsp markdown formatter with Noice
["vim.lsp.util.convert_input_to_markdown_lines"] = true,
-- override the lsp markdown formatter with Noice
["vim.lsp.util.stylize_markdown"] = true,
-- override cmp documentation with Noice (needs the other options to work)
["cmp.entry.get_documentation"] = true,
},
message = {
view = "mini",
view_search = false,
},
progress = {
view = "mini_left"
}
},
---@type NoiceRouteConfig[]
routes = {
{
-- Don't show these messages
opts = { skip = true },
filter = {
any = {
{
event = "msg_show",
kind = "search_count",
},
{
event = "msg_show",
kind = "",
find = "written", -- file saved msg
},
{
event = "msg_show",
kind = "",
find = "yazi.nvim",
},
{
event = "msg_show",
kind = "",
find = "%d+ (more|fewer) lines", -- undo/redo msg
},
}
},
},
{
filter = {
event = "notify",
min_height = 15
},
view = 'popup',
},
{
filter = {
event = "notify",
kind = "info"
},
view = 'mini'
},
},
---@type NoiceConfigViews
views = {
notify = {
merge = true
},
cmdline_popup = {
position = {
row = 5,
col = "50%",
},
size = {
width = 60,
height = "auto",
},
},
popupmenu = {
relative = "editor",
position = {
row = 8,
col = "50%",
},
size = {
width = 60,
height = 10,
},
border = {
style = "rounded",
padding = { 0, 1 },
},
win_options = {
winhighlight = { Normal = "Normal", FloatBorder = "DiagnosticInfo" },
},
},
mini_left = {
backend = "mini",
relative = "editor",
align = "left",
timeout = 2000,
reverse = true,
focusable = false,
position = {
row = -1,
col = 0,
},
size = {
width = "auto",
height = "auto",
max_height = 10,
},
border = {
style = "none",
},
zindex = 60,
win_options = {
winbar = "",
foldenable = false,
winblend = 30,
winhighlight = {
Normal = "NoiceMini",
IncSearch = "",
CurSearch = "",
Search = "",
},
},
},
},
},
-- stylua: ignore
keys = {
{
"<S-Enter>",
function() require("noice").redirect(vim.fn.getcmdline()) end,
mode = "c",
desc =
"Redirect Cmdline"
},
{
"<leader>um",
function() require("noice").cmd("last") end,
desc =
"Messages last"
},
{
"<leader>uM",
function() require("noice").cmd("history") end,
desc =
"Messages all"
},
{ "<leader>uX", function() require("noice").cmd("dismiss") end, desc = "Message dismiss all" },
{
"<c-d>",
function() if not require("noice.lsp").scroll(4) then return "<c-d>" end end,
silent = true,
expr = true,
desc =
"Scroll forward",
mode = {
"i", "n", "s" }
},
{
"<c-u>",
function() if not require("noice.lsp").scroll(-4) then return "<c-u>" end end,
silent = true,
expr = true,
desc =
"Scroll backward",
mode = {
"i", "n", "s" }
},
},
}
}

View file

@ -1,13 +0,0 @@
return {
{
"mbbill/undotree",
config = function()
vim.g.undotree_WindowLayout = 2
vim.g.undotree_ShortIndicators = 1
vim.g.undotree_SetFocusWhenToggle = 1
end,
keys = {
{ "<leader>fu", vim.cmd.UndotreeToggle, desc = "Undo tree" },
},
},
}

View file

@ -1,22 +0,0 @@
return {
-- Detect tabstop and shiftwidth automatically
"tpope/vim-sleuth",
{ "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,
},
}

View file

@ -1,85 +0,0 @@
return {
"echasnovski/mini.clue",
version = "*",
event = "VeryLazy",
config = function()
local miniclue = require("mini.clue")
miniclue.setup({
triggers = {
-- Leader triggers
{ mode = "n", keys = "<Leader>" },
{ mode = "v", keys = "<Leader>" },
{ mode = "x", keys = "<Leader>" },
-- Built-in completion
{ mode = "i", keys = "<C-x>" },
-- `g` key
{ mode = "n", keys = "g" },
{ mode = "x", keys = "g" },
-- Marks
{ mode = "n", keys = "'" },
{ mode = "n", keys = "`" },
{ mode = "x", keys = "'" },
{ mode = "x", keys = "`" },
-- Registers
{ mode = "n", keys = '"' },
{ mode = "x", keys = '"' },
{ mode = "i", keys = "<C-r>" },
{ mode = "c", keys = "<C-r>" },
-- Window commands
{ mode = "n", keys = "<C-w>" },
-- `z` key
{ mode = "n", keys = "z" },
{ mode = "x", keys = "z" },
},
-- Add a "postkeys" value to activate those keys after others
clues = {
miniclue.gen_clues.builtin_completion(),
miniclue.gen_clues.g(),
miniclue.gen_clues.marks(),
miniclue.gen_clues.registers(),
miniclue.gen_clues.windows(),
miniclue.gen_clues.z(),
{ mode = "n", keys = "<Leader><Leader>", desc = "+Bookmarks" },
{ mode = "n", keys = "<Leader><Leader>n", postkeys = "<Leader><Leader>" },
{ mode = "n", keys = "<Leader><Leader>N", postkeys = "<Leader><Leader>" },
{ mode = "n", keys = "<Leader>b", desc = "+Buffers" },
{ mode = "n", keys = "<Leader>bh", postkeys = "<Leader>b" },
{ mode = "n", keys = "<Leader>bl", postkeys = "<Leader>b" },
{ mode = "n", keys = "<Leader>f", desc = "+Find" },
{ mode = "n", keys = "<Leader>g", desc = "+Git" },
{ mode = "n", keys = "<Leader>l", desc = "+LSP" },
{ mode = "n", keys = "<Leader>r", desc = "+Replace" },
{ mode = "n", keys = "<Leader>u", desc = "+UI & Config" },
{ mode = "n", keys = "<Leader>un", desc = "+Noice" },
{ mode = "n", keys = "<Leader>w", desc = "+Workspace" },
{ mode = "n", keys = "<Leader>p", desc = "+Run stuff" },
{ mode = "n", keys = "<Leader>z", desc = "+ZK" },
{ mode = "v", keys = "<Leader>z", desc = "+ZK" },
{ mode = "v", keys = "<Leader>a", desc = "+AI" },
{ mode = "n", keys = "<Leader>a", desc = "+AI" },
{ mode = "n", keys = "g?", desc = "+Print Debug" },
},
-- Clue window settings
window = {
-- Floating window config
config = {
width = "auto",
},
-- Delay before showing clue window
delay = 200,
-- Keys to scroll inside the clue window
scroll_down = "<C-d>",
scroll_up = "<C-u>",
},
})
end,
}

View file

@ -1,189 +0,0 @@
return {
"nvim-lualine/lualine.nvim",
lazy = false,
dependencies = {
"nvim-tree/nvim-web-devicons",
"cbochs/grapple.nvim",
{ 'AndreM222/copilot-lualine' }
},
opts = function()
local icons = require("aleidk.constants").icons
local palete = require("catppuccin.palettes").get_palette "macchiato"
local function diff_source()
local gitsigns = vim.b.gitsigns_status_dict
if gitsigns then
return {
added = gitsigns.added,
modified = gitsigns.changed,
removed = gitsigns.removed,
}
end
end
local function position_scrollbar(str)
local sbar = { "▁▁", "▂▂", "▃▃", "▄▄", "▅▅", "▆▆", "▇▇", "██" }
local curr_line = vim.api.nvim_win_get_cursor(0)[1]
local lines = vim.api.nvim_buf_line_count(0)
local i = math.floor((curr_line - 1) / lines * #sbar) + 1
return str .. " " .. sbar[i]
end
local codecompanion_status = require("lualine.component"):extend()
codecompanion_status.processing = false
codecompanion_status.spinner_index = 1
local spinner_symbols = require("copilot-lualine.spinners").bouncing_bar
-- Initializer
function codecompanion_status:init(options)
codecompanion_status.super.init(self, options)
local group = vim.api.nvim_create_augroup("CodeCompanionHooks", {})
vim.api.nvim_create_autocmd({ "User" }, {
pattern = "CodeCompanionRequest*",
group = group,
callback = function(request)
if request.match == "CodeCompanionRequestStarted" then
self.processing = true
elseif request.match == "CodeCompanionRequestFinished" then
self.processing = false
end
end,
})
end
-- Function that runs every time statusline is updated
function codecompanion_status:update_status()
if self.processing then
self.spinner_index = (self.spinner_index % #spinner_symbols) + 1
return spinner_symbols[self.spinner_index]
else
return nil
end
end
return {
options = {
theme = "catppuccin",
globalstatus = true,
disabled_filetypes = { statusline = { "dashboard", "alpha" } },
component_separators = "",
section_separators = "",
},
sections = {
lualine_a = {
{
"mode",
padding = 0,
fmt = function()
return " "
end,
},
},
lualine_b = {},
lualine_c = {
{ "branch", icon = icons.git.branch },
{
"diff",
symbols = {
added = icons.git.added,
modified = icons.git.modified,
removed = icons.git.removed,
},
source = diff_source,
},
{ codecompanion_status },
{
"diagnostics",
symbols = {
error = icons.diagnostics.Error,
warn = icons.diagnostics.Warn,
info = icons.diagnostics.Info,
hint = icons.diagnostics.Hint,
},
},
"filetype",
{
"filename",
path = 1,
symbols = {
modified = "", -- Text to show when the buffer is modified
alternate_file = "#", -- Text to show to identify the alternate file
directory = "", -- Text to show when the buffer is a directory
},
},
},
lualine_x = {
{
"overseer",
},
{
function()
return require("grapple").statusline()
end,
},
{
"copilot",
cond = function()
return vim.bo.filetype ~= "codecompanion"
end,
show_colors = true,
symbols = {
status = {
icons = {
enabled = "",
sleep = "", -- auto-trigger disabled
disabled = "",
warning = "",
unknown = ""
},
hl = {
enabled = palete.teal,
sleep = palete.lavender,
disabled = palete.subtext0,
warning = palete.peach,
unknown = palete.red
}
},
spinners = spinner_symbols,
spinner_color = palete.mauve
},
},
},
lualine_y = {
{
-- Macro recording status
function()
return require("noice").api.status.mode.get()
end,
cond = function()
return package.loaded["noice"] and require("noice").api.status.mode.has()
end,
},
{ "searchcount" },
{ "location" },
{
"progress",
fmt = position_scrollbar,
separator = " ",
padding = 0,
},
},
lualine_z = {},
},
extensions = {
"lazy",
"fzf",
"man",
"mason",
"quickfix",
"trouble",
"toggleterm",
},
}
end,
}

View file

@ -1,15 +0,0 @@
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

@ -1,6 +0,0 @@
return {
"echasnovski/mini.surround",
disabled = true,
version = "*",
opts = {},
}

View file

@ -1,83 +0,0 @@
-- Fuzzy Finder (files, lsp, etc)
return {
"nvim-telescope/telescope.nvim",
branch = "0.1.x",
dependencies = {
{ "nvim-lua/plenary.nvim" },
{
-- Blazingly Fast Fuzzy Finder Algorithm for Telescope
"nvim-telescope/telescope-fzf-native.nvim",
build = "make",
cond = function()
return vim.fn.executable("make") == 1
end,
},
},
config = function()
local actions = require("telescope.actions")
local telescope = require("telescope")
local builtin = require("telescope.builtin")
local opts = {
defaults = {
prompt_prefix = "",
selection_caret = "",
layout_strategy = "flex",
mappings = {
i = {
["<c-u>"] = actions.preview_scrolling_up,
["<c-d>"] = actions.preview_scrolling_down,
["<C-j>"] = actions.move_selection_next,
["<C-k>"] = actions.move_selection_previous,
["<C-s>"] = actions.file_vsplit,
["<C-v>"] = actions.file_split,
["<ESC>"] = actions.close,
["<C-q>"] = actions.send_to_qflist + actions.open_qflist,
["<M-q>"] = actions.send_selected_to_qflist + actions.open_qflist,
["<c-t>"] = require("trouble.sources.telescope").open,
["<a-t>"] = require("trouble.sources.telescope").open,
["<M-h>"] = actions.which_key,
},
},
},
pickers = {
find_files = {
hidden = true,
},
},
}
telescope.setup(opts)
-- Enable telescope fzf native, if installed
pcall(telescope.load_extension, "fzf")
vim.keymap.set("n", "<leader>fb", builtin.buffers, { desc = "Find buffers" })
vim.keymap.set("n", "<leader>ff", builtin.find_files, { desc = "Find files" })
vim.keymap.set("n", "<leader>fF", function()
builtin.find_files({ hidden = true, no_ignore = true })
end, { desc = "Find all files" })
-- Search inside files
vim.keymap.set("n", "<leader>fw", builtin.grep_string, { desc = "Find word under cursor" })
vim.keymap.set("n", "<leader>fW", builtin.live_grep, { desc = "Find word (live grep)" })
-- Help
vim.keymap.set("n", "<leader>fc", builtin.command_history, { desc = "Find in commands history" })
vim.keymap.set("n", "<leader>fC", builtin.commands, { desc = "Find a command" })
vim.keymap.set("n", "<leader>fh", builtin.help_tags, { desc = "Find Help" })
vim.keymap.set("n", "<leader>fk", builtin.keymaps, { desc = "Find Keymaps" })
-- Git
vim.keymap.set("n", "<leader>gb", builtin.git_branches, { desc = "Change branch" })
-- Diagnosticos
-- Disabled, handle by trouble
-- vim.keymap.set("n", "<leader>fD", function()
-- builtin.diagnostics({ bufnr = 0 })
-- end, { desc = "Find diagnostics (Telescope)" })
-- vim.keymap.set("n", "<leader>fD", function()
-- builtin.diagnostics({ bufnr = nil })
-- end, { desc = "Find diagnostics in workspace (Telescope)" })
-- vim.keymap.set("n", "<leader>fz", builtin.spell_suggest, { desc = "Find spell suggestion" })
end,
}

View file

@ -1,12 +0,0 @@
return {
"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

@ -1,14 +0,0 @@
return {
{
-- Color Picker
"uga-rosa/ccc.nvim",
opts = {
auto_enable = true,
lsp = true,
},
keys = {
{ "<leader>uc", "<CMD>CccPick<CR>", desc = "Open Color picker" },
{ "<leader>uC", "<CMD>CccHighlighterToggle<CR>", desc = "Toggle Color highlight" },
},
},
}

View file

@ -1,92 +0,0 @@
return {
"saghen/blink.cmp",
lazy = false,
version = "*",
dependencies = {
"rafamadriz/friendly-snippets",
"folke/lazydev.nvim",
{ "saghen/blink.compat", version = "*", },
},
opts = function()
local window_options = {
border = "rounded",
winblend = vim.o.pumblend,
}
---@module 'blink.cmp'
---@type blink.cmp.Config
return {
sources = {
providers = {
dadbod = { name = "Dadbod", module = "vim_dadbod_completion.blink" },
lazydev = { name = "LazyDev", module = "lazydev.integrations.blink" },
luasnip = {
name = 'luasnip',
module = 'blink.compat.source',
score_offset = -3,
opts = {
use_show_condition = false,
show_autosnippets = true,
},
},
},
-- nvim-cmp sources
compat = {},
completion = {
enabled_providers = {
"lsp",
"path",
"snippets",
"buffer",
"dadbod",
"lazydev",
},
},
},
accept = {
auto_brackets = { enabled = true },
expand_snippet = function(snippet) require('luasnip').lsp_expand(snippet) end,
},
-- trigger = { signature_help = { enabled = true } },
keymap = {
preset = "enter",
["<C-j>"] = { 'select_next', 'fallback' },
["<C-k>"] = { 'select_prev', 'fallback' },
["<C-u>"] = { 'scroll_documentation_up', 'fallback' },
["<C-d>"] = { 'scroll_documentation_down', 'fallback' },
},
highlight = {
-- sets the fallback highlight groups to nvim-cmp's highlight groups
-- useful for when your theme doesn't support blink.cmp
-- will be removed in a future release, assuming themes add support
use_nvim_cmp_as_default = false,
},
-- set to 'mono' for 'Nerd Font Mono' or 'normal' for 'Nerd Font'
-- adjusts spacing to ensure icons are aligned
nerd_font_variant = "mono",
windows = {
autocomplete = vim.tbl_extend("force", window_options, {
selection = "manual",
---@type blink.cmp.Draw
draw = {
components = {
kind_icon = {
text = function(ctx)
return ctx.kind_icon .. ctx.icon_gap
end,
}
}
}
}),
documentation = vim.tbl_extend("force", window_options, {
auto_show = true,
winblend = 0,
}),
ghost_text = {
enabled = true,
},
},
kind_icons = require("aleidk.constants").icons.kinds,
}
end
}

View file

@ -1,44 +0,0 @@
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

@ -1,15 +0,0 @@
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

@ -1,52 +0,0 @@
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

@ -1,21 +0,0 @@
return {
{
"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

@ -1,229 +0,0 @@
return {
-- LSP Plugins
{
-- `lazydev` configures Lua LSP for your Neovim config, runtime and plugins
-- used for completion, annotations and signatures of Neovim apis
'folke/lazydev.nvim',
ft = 'lua',
opts = {
library = {
-- Load luvit types when the `vim.uv` word is found
{ path = 'luvit-meta/library', words = { 'vim%.uv' } },
},
},
},
{ "Bilal2453/luvit-meta", lazy = true }, -- optional `vim.uv` typings
{
-- LSP Configuration & Plugins
"neovim/nvim-lspconfig",
event = { "BufReadPost", "BufNewFile", "BufWritePre" },
dependencies = {
-- Automatically install LSPs to stdpath for neovim
{ "williamboman/mason.nvim", config = true },
"williamboman/mason-lspconfig.nvim",
{ 'saghen/blink.cmp' } -- autocompletion
},
config = function()
-- LSP settings.
local on_attach = function(_, bufnr)
local nmap = function(keys, func, desc)
if desc then
desc = "LSP: " .. desc
end
vim.keymap.set("n", keys, func, { buffer = bufnr, desc = desc })
end
nmap("<leader>lr", vim.lsp.buf.rename, "Rename")
-- stylua: ignore
vim.keymap.set({ "n", "x", "v" }, "<leader>la", vim.lsp.buf.code_action, { buffer = bufnr, desc = "Code Action" })
nmap("<leader>ld", vim.lsp.buf.type_definition, "Go to type definition")
nmap("<leader>lf", function()
vim.lsp.buf.format()
end, "Format")
nmap("gd", vim.lsp.buf.definition, "Go to definition")
nmap("gr", require("telescope.builtin").lsp_references, "Goto References")
nmap("gI", vim.lsp.buf.implementation, "Go to Implementation")
-- See `:help K` for why this keymap
nmap("K", vim.lsp.buf.hover, "Hover Documentation")
-- nmap("<C-k>", vim.lsp.buf.signature_help, "Signature Documentation")
-- Lesser used LSP functionality
nmap("gD", vim.lsp.buf.declaration, "Goto Declaration")
nmap("<leader>lj", vim.diagnostic.goto_next, "Go to next diagnostic")
nmap("<leader>lk", vim.diagnostic.goto_prev, "Go to prev diagnostic")
nmap("<leader>lK", function()
-- execute twice to enter the float inmediatly
vim.diagnostic.open_float()
vim.diagnostic.open_float()
end, "Hover current diagnostic")
-- Create a command `:Format` local to the LSP buffer
vim.api.nvim_buf_create_user_command(bufnr, "Format", function(_)
vim.lsp.buf.format()
end, { desc = "Format current buffer with LSP" })
end
-- Enable the following language servers
-- To see options and cofigurations `:help lspconfig-all`
local servers = {
astro = {},
bashls = {},
biome = {
single_file_support = true,
},
cssls = {},
dockerls = {},
emmet_ls = {
filetypes = {
"astro",
"css",
"eruby",
"html",
"htmldjango",
"javascriptreact",
"less",
"pug",
"sass",
"scss",
"svelte",
"typescriptreact",
"vue",
"htmlangular",
"php",
"blade"
},
},
harper_ls = {},
html = {},
hyprls = {},
marksman = {},
phpactor = {},
gopls = {
settings = {
gopls = {
completeUnimported = true,
usePlaceholders = true,
analyses = {
unusedparams = true,
},
},
},
},
ruff = {},
rust_analyzer = {
settings = {
["rust-analyzer"] = {
imports = {
granularity = {
group = "module",
},
prefix = "self",
},
cargo = {
buildScripts = {
enable = true,
},
},
procMacro = {
enable = true,
},
},
},
},
sqlls = {},
taplo = {},
yamlls = {
settings = {
yaml = {
schemas = {},
customTags = {
"!vault" -- ansible encrypted vars support
}
}
},
},
lua_ls = {
settings = {
Lua = {
completion = {
callSnippet = 'Replace',
},
diagnostics = { disable = { 'missing-fields' } },
},
},
},
}
-- nvim-cmp supports additional completion capabilities, so broadcast that to servers
local capabilities = vim.lsp.protocol.make_client_capabilities()
capabilities = require("blink.cmp").get_lsp_capabilities(capabilities)
-- Ensure the servers above are installed
local mason_lspconfig = require("mason-lspconfig")
mason_lspconfig.setup({
ensure_installed = vim.tbl_keys(servers),
automatic_installation = false,
})
mason_lspconfig.setup_handlers({
function(server_name)
local _border = "single"
local default_config = {
capabilities = capabilities,
on_attach = on_attach,
handlers = {
["textDocument/signatureHelp"] = vim.lsp.with(vim.lsp.handlers.signature_help, {
border = _border,
}),
["textDocument/hover"] = vim.lsp.with(vim.lsp.handlers.hover, {
border = _border,
max_width = 200,
max_height = 200,
focus = true,
}),
},
}
require("lspconfig")[server_name].setup(
vim.tbl_deep_extend("force", default_config, servers[server_name] or {})
)
end,
})
vim.diagnostic.config({
update_in_insert = false,
underline = true,
float = {
source = true
},
virtual_text = {
severity = vim.diagnostic.severity.ERROR,
source = true,
spacing = -1,
prefix = nil,
format = function(diagnostic)
-- show small error code instead of whole error that probably won't fit in the screen
-- to see the whole error use other keybindings
return tostring(diagnostic.code)
end,
virt_text_hide = true
},
severity_sort = true,
})
-- Customize gutter icons
local signs = require("aleidk.constants").icons.diagnostics
for type, icon in pairs(signs) do
local hl = "DiagnosticSign" .. type
vim.fn.sign_define(hl, { text = icon, texthl = hl, numhl = hl })
end
end,
},
}

View file

@ -1,27 +0,0 @@
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

@ -1,59 +0,0 @@
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

@ -1,171 +0,0 @@
local function term_get_effective_line_count(bufnr)
local linecount = vim.api.nvim_buf_line_count(bufnr)
local non_blank_lines = linecount
for i = linecount, 1, -1 do
local line = vim.api.nvim_buf_get_lines(bufnr, i - 1, i, true)[1]
non_blank_lines = i
if line ~= "" then
break
end
end
return non_blank_lines
end
-- This is a copy of the original util function of overseer with the change that
-- vim.api.nvim_win_set_cursor(winid, { lnum, 0 }) column is set to 0 so the output is visible
-- the rest is the same
local scroll_to_end = function(winid)
winid = winid or 0
local bufnr = vim.api.nvim_win_get_buf(winid)
local lnum = vim.api.nvim_buf_line_count(bufnr)
-- Hack: terminal buffers add a bunch of empty lines at the end. We need to ignore them so that
-- we don't end up scrolling off the end of the useful output.
local not_much_output = lnum < vim.o.lines + 6
if vim.bo[bufnr].buftype == "terminal" and not_much_output then
lnum = term_get_effective_line_count(bufnr)
end
local scrolloff = vim.api.nvim_get_option_value("scrolloff", { scope = "local", win = winid })
vim.api.nvim_set_option_value("scrolloff", 0, { scope = "local", win = winid })
vim.api.nvim_win_set_cursor(winid, { lnum, 0 })
vim.api.nvim_set_option_value("scrolloff", scrolloff, { scope = "local", win = winid })
end
local open_split = function(task, horizontal)
local original_window = vim.api.nvim_get_current_win()
if horizontal then
-- horizontal split across all vertical splits
vim.cmd([[botright split]])
else
-- vertical split across all horizontal splits
vim.cmd([[vert botright split]])
end
-- Update tasks buffer options
vim.api.nvim_win_set_buf(0, task:get_bufnr())
vim.api.nvim_set_option_value("number", false, { scope = "local", win = 0 })
vim.api.nvim_set_option_value("relativenumber", false, { scope = "local", win = 0 })
vim.api.nvim_set_option_value("signcolumn", "no", { scope = "local", win = 0 })
scroll_to_end(0)
-- Go back to the original window
vim.api.nvim_set_current_win(original_window)
end
return {
"stevearc/overseer.nvim",
keys = {
{ "<leader>pO", "<CMD>OverseerQuickAction hsplit<CR>", desc = "Open task in a hsplit" },
{
"<leader>pQ",
"<CMD>OverseerQuickAction close win<CR><CMD>OverseerQuickAction dispose<CR>",
desc = "Close and dispose task's windows",
},
{ "<leader>pW", "<CMD>OverseerQuickAction unwatch<CR>", desc = "Unwatch task" },
{ "<leader>pf", "<CMD>OverseerQuickAction open float<CR>", desc = "Open task in a float window" },
{ "<leader>pl", "<CMD>OverseerLoadBundle<CR>", desc = "Load tasks" },
{ "<leader>pm", "<CMD>OverseerTaskAction<CR>", desc = "Manage task" },
{ "<leader>po", "<CMD>OverseerQuickAction vsplit<CR>", desc = "Open task in a vsplit" },
{ "<leader>pp", "<CMD>OverseerRun<CR>", desc = "Run task" },
{
"<leader>pP",
function()
local overseer = require('overseer')
overseer.run_template({}, function(task)
if task then
task:add_components({ "restart_on_save" })
overseer.run_action(task, "hsplit")
end
end)
end,
desc = "Run task and watch it"
},
{ "<leader>pq", "<CMD>OverseerQuickAction close win<CR>", desc = "Close task's windows" },
{ "<leader>ps", "<CMD>OverseerSaveBundle<CR>", desc = "Save tasks" },
{ "<leader>pt", "<CMD>OverseerToggle<CR>", desc = "Toggle tasks list" },
{ "<leader>pw", "<CMD>OverseerQuickAction watch<CR>", desc = "Watch task" },
},
opts = {
templates = {
"cargo",
"cargo-make",
"composer",
"deno",
"just",
"mage",
"make",
"mix",
"npm",
"rake",
"task",
"tox",
"vscode",
},
actions = {
["hsplit"] = {
desc = "open terminal in a horizontal split",
condition = function(task)
local bufnr = task:get_bufnr()
return bufnr and vim.api.nvim_buf_is_valid(bufnr)
end,
run = function(task)
open_split(task, true)
end,
},
["vsplit"] = {
desc = "open terminal in a vertical split",
condition = function(task)
local bufnr = task:get_bufnr()
return bufnr and vim.api.nvim_buf_is_valid(bufnr)
end,
run = function(task)
open_split(task, false)
end,
},
["close win"] = {
desc = "open terminal in a vertical split",
condition = function(task)
local bufnr = task:get_bufnr()
return bufnr and vim.api.nvim_buf_is_valid(bufnr)
end,
run = function(task)
local buf = task:get_bufnr()
-- iterar sobre todas las windows y ver si la window tiene attach el buf que quiero cerrar
for _, win in ipairs(vim.api.nvim_list_wins()) do
if buf == vim.api.nvim_win_get_buf(win) then
vim.api.nvim_win_close(win, false)
end
end
end,
},
},
task_list = {
direction = "bottom",
bindings = {
["?"] = "ShowHelp",
["g?"] = "ShowHelp",
["<CR>"] = "RunAction",
["<C-e>"] = "Edit",
["o"] = "Open",
["<C-v>"] = "OpenVsplit",
["<C-s>"] = "OpenSplit",
["<C-f>"] = "OpenFloat",
["<C-q>"] = "OpenQuickFix",
["<TAB>"] = "TogglePreview",
["p"] = "TogglePreview",
["<C-l>"] = "IncreaseAllDetail",
["<C-h>"] = "DecreaseAllDetail",
["L"] = "IncreaseDetail",
["H"] = "DecreaseDetail",
["["] = "DecreaseWidth",
["]"] = "IncreaseWidth",
["{"] = "PrevTask",
["}"] = "NextTask",
["<C-u>"] = "ScrollOutputUp",
["<C-d>"] = "ScrollOutputDown",
["q"] = "Close",
["d"] = "<CMD>OverseerQuickAction dispose<CR>",
},
},
},
}

View file

@ -1,18 +0,0 @@
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",
},
},
}

View file

@ -15,10 +15,6 @@ return {
},
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" },

View file

@ -18,6 +18,10 @@ return { -- Change colors.none if not using a transparent background
mason = true,
noice = true,
notify = true,
mini = {
enabled = true,
indentscope_color = "",
},
},
custom_highlights = function(colors)
return {

View file

@ -1,20 +1,4 @@
return {
{
"echasnovski/mini.comment",
version = "*",
event = "VeryLazy",
dependencies = {
{ "nvim-treesitter/nvim-treesitter-context" },
},
opts = {
options = {
custom_commentstring = function()
return require("ts_context_commentstring.internal").calculate_commentstring()
or vim.bo.commentstring
end,
},
},
},
{
"LudoPinelli/comment-box.nvim",
opts = {
@ -25,4 +9,19 @@ return {
{ "gcl", function() require("comment-box").llline() end, { desc = "Create a comment line", mode = { "n", "v" }, } },
},
},
{
"danymat/neogen",
opts = { snippet_engine = "nvim" },
dependencies = { "nvim-treesitter/nvim-treesitter" },
version = "*", -- stable releases
keys = {
{
"gcd",
function()
require("neogen").generate()
end,
desc = "Generate comment docstring",
},
},
}
}

View file

@ -0,0 +1,61 @@
return {
"saghen/blink.cmp",
lazy = false,
version = "*",
dependencies = {
"neovim/nvim-lspconfig",
"echasnovski/mini.nvim",
"folke/lazydev.nvim",
{ "saghen/blink.compat", version = "*", },
},
opts = function()
local window_options = {
border = "rounded",
winblend = vim.o.pumblend,
}
---@module 'blink.cmp'
---@type blink.cmp.Config
return {
appearance = {
nerd_font_variant = 'mono'
},
completion = {
accept = { auto_brackets = { enabled = true }, },
-- Show documentation when selecting a completion item
documentation = { auto_show = true, auto_show_delay_ms = 500 },
-- Display a preview of the selected item on the current line
ghost_text = { enabled = true },
},
keymap = {
preset = "enter",
["<C-j>"] = { 'select_next', 'fallback' },
["<C-k>"] = { 'select_prev', 'fallback' },
["<C-u>"] = { 'scroll_documentation_up', 'fallback' },
["<C-d>"] = { 'scroll_documentation_down', 'fallback' },
},
sources = {
providers = {
lazydev = { name = "LazyDev", module = "lazydev.integrations.blink" },
luasnip = {
name = 'luasnip',
module = 'blink.compat.source',
score_offset = -3,
opts = {
use_show_condition = false,
show_autosnippets = true,
},
},
},
default = {
"lsp",
"path",
"snippets",
"buffer",
"lazydev",
},
},
}
end
}

View file

@ -2,16 +2,16 @@ return {
"mikavilpas/yazi.nvim",
keys = {
{
"<leader>e",
"<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",
},
-- {
-- -- 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

View file

@ -3,13 +3,11 @@ return {
event = { "BufWritePre" },
cmd = { "ConformInfo" },
opts = {
-- log_level = vim.log.levels.DEBUG,
-- See aviable formatters in: https://github.com/stevearc/conform.nvim#formatters
-- See available 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 a stop_after_first = true to run only the first available formatters
-- Use the "_" filetype to run formatters on filetypes that don't
-- have other formatters configured.
["_"] = { "trim_whitespace" },
@ -24,17 +22,17 @@ return {
jsonc = { "biome" },
lua = { "stylua" },
markdown = { "markdownlint" },
nim = { "nimpretty" },
php = { "pint" },
python = { "ruff_format", "ruff_organize_imports" },
scss = { "prettierd", "prettier", stop_after_first = true },
rust = { "rustfmt" },
scss = { "biome", "prettierd", "prettier", stop_after_first = true },
sh = { "shfmt" },
sql = { "sleek" },
toml = { "taplo" },
typescript = { "biome" },
typescriptreact = { "biome" },
xml = { "lemminx" },
zsh = { "shfmt" },
sql = { "sleek" }
},
formatters = {
djlint = {
@ -76,7 +74,7 @@ return {
print("Autoformat set to: " .. tostring(not vim.b.disable_autoformat))
end
MAP("n", "<leader>uf", toggleAutoFormat, "Toggle auto format")
vim.keymap.set("n", "<leader>uf", toggleAutoFormat, { desc = "Toggle auto format", silent = true })
vim.api.nvim_create_user_command("Fmt", function(args)
local range = nil

View file

@ -0,0 +1,25 @@
return {
"ibhagwan/fzf-lua",
lazy = false, -- Required to register vim.ui.select() wrapper
dependencies = { "echasnovski/mini.nvim" },
config = function()
require("fzf-lua").setup()
require("fzf-lua").register_ui_select()
end,
keys = {
{ "<leader>ff", function() require("fzf-lua").files() end, desc = "Find files" },
{ "<leader>fb", function() require("fzf-lua").buffers() end, desc = "Find buffers" },
{ "<leader>fw", function() require("fzf-lua").grep_cword() end, desc = "Find word under cursor" },
{ "<leader>fW", function() require("fzf-lua").live_grep_native() end, desc = "Find word (live grep)" },
{ "<leader>fw", function() require("fzf-lua").grep_visual() end, desc = "Find selection", mode = { "v" } },
{ "<leader>fw", function() require("fzf-lua").grep_cword() end, desc = "Find word under cursor" },
{ "<leader>fg", function() require("fzf-lua").git_bcommits() end, desc = "Find commit log for current buffer" },
{ "<leader>fl", function() require("fzf-lua").lsp_document_symbols() end, desc = "Find LSP Symbols" },
{ "<leader>fr", function() require("fzf-lua").registers() end, desc = "Find registers" },
{ "<leader>fk", function() require("fzf-lua").keymaps() end, desc = "Find keymaps" },
{ "<leader>fh", function() require("fzf-lua").helptags() end, desc = "Find help tags" },
}
}

View file

@ -0,0 +1,29 @@
return {
'neovim/nvim-lspconfig',
'tpope/vim-sleuth', -- Detect tabstop and shiftwidth automatically
{
"mason-org/mason.nvim",
opts = { }
},
{ "nvim-tree/nvim-web-devicons", lazy = true },
{
"ckolkey/ts-node-action",
dependencies = { "nvim-treesitter" },
opts = {},
keys = {
{ "<leader>ls", function() require("ts-node-action").node_action() end, desc = "Node Action" }
}
},
{
-- `lazydev` configures Lua LSP for your Neovim config, runtime and plugins
-- used for completion, annotations and signatures of Neovim apis
'folke/lazydev.nvim',
ft = 'lua',
opts = {
library = {
-- Load luvit types when the `vim.uv` word is found
{ path = "${3rd}/luv/library", words = { "vim%.uv" } }
},
},
},
}

View file

@ -14,6 +14,10 @@ return {
NeogitCommitMessage = { "gitlint" },
gitcommit = { "gitlint" },
markdown = { "markdownlint" },
javascript = { "biomejs" },
typescript = { "biomejs" },
javascriptreact = { "biomejs" },
typescriptreact = { "biomejs" },
}
vim.api.nvim_create_autocmd({ "BufWritePost" }, {

View file

@ -0,0 +1,14 @@
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
opts = {
file_types = { 'markdown' },
sign = {
enabled = false,
},
},
},
}

View file

@ -0,0 +1,229 @@
return {
'echasnovski/mini.nvim',
version = '*',
dependencies = {
"rafamadriz/friendly-snippets",
},
config = function()
require('mini.icons').setup()
require('mini.bracketed').setup({
diagnostic = { options = { severity = vim.diagnostic.severity.ERROR } },
})
require("mini.ai").setup({})
require('mini.cursorword').setup() -- Highlight word under cursor
require('mini.extra').setup()
require('mini.jump').setup() -- Extend f, F, t, T
require('mini.surround').setup()
require('mini.operators').setup()
require('mini.pairs').setup()
require('mini.splitjoin').setup()
require("mini.align").setup({})
-- require('mini.animate').setup()
require('mini.notify').setup()
vim.notify = require('mini.notify').make_notify()
vim.keymap.set('n', '<Leader>un', require('mini.notify').show_history, { desc = 'Show notifications', silent = true })
require('mini.statusline').setup({})
require('mini.diff').setup({ view = { style = 'sign' } })
require('mini.git').setup({})
vim.keymap.set({ 'n', 'x' }, '<Leader>gs', '<Cmd>lua MiniGit.show_at_cursor()<CR>',
{ desc = 'Show at cursor', silent = true })
local starter = require('mini.starter')
starter.setup({
footer = '',
evaluate_single = true,
items = {
starter.sections.recent_files(10, true),
starter.sections.sessions(5, true),
starter.sections.pick(),
starter.sections.builtin_actions(),
},
content_hooks = {
starter.gen_hook.adding_bullet(),
starter.gen_hook.indexing('all', { 'Builtin actions' }),
starter.gen_hook.aligning("center", "center"),
},
})
require('mini.indentscope').setup({
draw = {
animation = require('mini.indentscope').gen_animation.none(),
},
})
require('mini.files').setup({
mappings = {
go_in = 'L',
go_in_plus = 'l',
},
windows = {
preview = true,
width_preview = 75,
}
})
vim.keymap.set('n', '<Leader>e', function()
local buf_name = vim.api.nvim_buf_get_name(0)
if string.match(buf_name, "^ministarter:.*") then
MiniFiles.open()
else
MiniFiles.open(buf_name)
end
end,
{ desc = 'Show at cursor', silent = true })
require('mini.move').setup({
mappings = {
-- Move visual selection in Visual mode
left = 'H',
right = 'L',
down = 'J',
up = 'K',
-- Move current line in Normal mode
line_left = '',
line_right = '',
line_down = '',
line_up = '',
},
})
require('mini.comment').setup({
options = {
-- Whether to ignore blank lines when commenting
ignore_blank_line = true,
-- Whether to ignore blank lines in actions and textobject
start_of_line = true,
},
})
local gen_loader = require('mini.snippets').gen_loader
require('mini.snippets').setup({
snippets = {
-- Load custom file with global snippets first (adjust for Windows)
gen_loader.from_file('~/.config/nvim-unstable/snippets/global.json'),
-- Load snippets based on current language by reading files from
-- "snippets/" subdirectories from 'runtimepath' directories.
gen_loader.from_lang(),
},
})
local miniclue = require("mini.clue")
miniclue.setup({
triggers = {
-- Leader triggers
{ mode = "n", keys = "<Leader>" },
{ mode = "v", keys = "<Leader>" },
{ mode = "x", keys = "<Leader>" },
-- Built-in completion
{ mode = "i", keys = "<C-x>" },
-- `g` key
{ mode = "n", keys = "g" },
{ mode = "x", keys = "g" },
-- Marks
{ mode = "n", keys = "'" },
{ mode = "n", keys = "`" },
{ mode = "x", keys = "'" },
{ mode = "x", keys = "`" },
-- Registers
{ mode = "n", keys = '"' },
{ mode = "x", keys = '"' },
{ mode = "i", keys = "<C-r>" },
{ mode = "c", keys = "<C-r>" },
-- Window commands
{ mode = "n", keys = "<C-w>" },
-- `z` key
{ mode = "n", keys = "z" },
{ mode = "x", keys = "z" },
},
-- Add a "postkeys" value to activate those keys after others
clues = {
miniclue.gen_clues.builtin_completion(),
miniclue.gen_clues.g(),
miniclue.gen_clues.marks(),
miniclue.gen_clues.registers(),
miniclue.gen_clues.windows(),
miniclue.gen_clues.z(),
{ mode = "n", keys = "<Leader><Leader>", desc = "+Bookmarks" },
{ mode = "n", keys = "<Leader><Leader>n", postkeys = "<Leader><Leader>" },
{ mode = "n", keys = "<Leader><Leader>N", postkeys = "<Leader><Leader>" },
{ mode = "n", keys = "<Leader>b", desc = "+Buffers" },
{ mode = "n", keys = "<Leader>bh", postkeys = "<Leader>b" },
{ mode = "n", keys = "<Leader>bl", postkeys = "<Leader>b" },
{ mode = "n", keys = "<Leader>f", desc = "+Find" },
{ mode = "n", keys = "<Leader>g", desc = "+Git" },
{ mode = "n", keys = "<Leader>l", desc = "+LSP" },
{ mode = "n", keys = "<Leader>r", desc = "+Replace" },
{ mode = "n", keys = "<Leader>u", desc = "+UI & Config" },
{ mode = "n", keys = "<Leader>w", desc = "+Workspace" },
{ mode = "n", keys = "<Leader>p", desc = "+Run stuff" },
{ mode = "n", keys = "<Leader>z", desc = "+ZK" },
{ mode = "v", keys = "<Leader>z", desc = "+ZK" },
{ mode = "v", keys = "<Leader>a", desc = "+AI" },
{ mode = "n", keys = "<Leader>a", desc = "+AI" },
{ mode = "n", keys = "g?", desc = "+Print Debug" },
},
-- Clue window settings
window = {
-- Floating window config
config = {
width = "auto",
},
-- Delay before showing clue window
delay = 200,
-- Keys to scroll inside the clue window
scroll_down = "<C-d>",
scroll_up = "<C-u>",
},
})
local hipatterns = require('mini.hipatterns')
hipatterns.setup({
highlighters = {
-- Highlight standalone 'FIXME', 'HACK', 'TODO', 'NOTE'
fixme = { pattern = '%f[%w]()FIXME()%f[%W]', group = 'MiniHipatternsFixme' },
hack = { pattern = '%f[%w]()HACK()%f[%W]', group = 'MiniHipatternsHack' },
todo = { pattern = '%f[%w]()TODO()%f[%W]', group = 'MiniHipatternsTodo' },
note = { pattern = '%f[%w]()NOTE()%f[%W]', group = 'MiniHipatternsNote' },
-- Highlight hex color strings (`#rrggbb`) using that color
hex_color = hipatterns.gen_highlighter.hex_color(),
},
})
require('mini.sessions').setup({
autowrite = false
})
vim.keymap.set('n', '<Leader>us', function()
local default_name = require('mini.sessions').get_latest() or "Session.vim"
vim.ui.input({ prompt = "Session name: ", default = default_name }, function(input)
if input == nil then
return
end
require('mini.sessions').write(input)
end)
end,
{ desc = 'Save session', silent = true })
vim.keymap.set('n', '<Leader>uS', function() require('mini.sessions').read() end,
{ desc = 'Load session (latest)', silent = true })
vim.api.nvim_create_user_command("SessionSelect", function()
require('mini.sessions').select('read')
end, {})
vim.api.nvim_create_user_command("SessionDelete", function()
require('mini.sessions').select('delete')
end, {})
end
}

View file

@ -1,6 +1,3 @@
-- Move to windows with Ctrl and hjkl
-- Resize to windows with Alt and hjkl
-- Tmux aware
return {
"mrjones2014/smart-splits.nvim",
lazy = false,

View file

@ -0,0 +1,19 @@
return {
"nvim-treesitter/nvim-treesitter",
event = { "BufReadPost", "BufNewFile", "BufWritePre", "VeryLazy" },
dependencies = {
{
"JoosepAlviste/nvim-ts-context-commentstring",
opts = {
enable_autocmd = false,
},
},
{ "nvim-treesitter/nvim-treesitter-context" },
},
build = ":TSUpdate",
opts = {
auto_install = true,
highlight = { enable = true },
indent = { enable = true },
},
}

View file

@ -2,7 +2,7 @@
return {
"folke/trouble.nvim",
dependencies = { "nvim-tree/nvim-web-devicons" },
dependencies = { "echasnovski/mini.nvim", "ibhagwan/fzf-lua" },
cmd = { "Trouble" },
keys = {
{
@ -32,6 +32,10 @@ return {
},
},
opts = function()
local config = require("fzf-lua.config")
local actions = require("trouble.sources.fzf").actions
config.defaults.actions.files["ctrl-t"] = actions.open
---@type trouble.Window.opts
local win_opts = {
-- size = { width = 30, height = 0.5 },

View file

@ -1,7 +0,0 @@
local M = {}
function M.plugin_should_be_enabled()
print("Plugin should be enabled")
end
return M

View file

@ -0,0 +1,11 @@
{
"Basic": { "prefix": "ba", "body": "T1=$1 T2=$2 T0=$0" },
"Placeholders": { "prefix": "pl", "body": "T1=${1:aa}\nT2=${2:<$1>}" },
"Choices": { "prefix": "ch", "body": "T1=${1|a,b|} T2=${2|c,d|}" },
"Linked": { "prefix": "li", "body": "T1=$1\n\tT1=$1" },
"Variables": { "prefix": "va", "body": "Runtime: $VIMRUNTIME\n" },
"Complex": {
"prefix": "co",
"body": ["T1=${1:$RANDOM}", "T3=${3:$1_${2:$1}}", "T2=$2"]
}
}