Add jj/kitty/nvim/opencode/paru/fish/yazi/jjui

This commit is contained in:
2026-02-19 22:27:46 +00:00
parent 774492f279
commit e55197517c
95 changed files with 10407 additions and 0 deletions

View File

@@ -0,0 +1,4 @@
return {
"tpope/vim-abolish",
enabled = true,
}

View File

@@ -0,0 +1,53 @@
return {
"goolord/alpha-nvim",
dependencies = {
{
"catppuccin/nvim",
name = "catppuccin",
priority = 1000, -- Load colorscheme before other plugins
},
"echasnovski/mini.icons",
"nvim-lua/plenary.nvim",
},
config = function()
local alpha_c = function()
local alpha = require("alpha")
local dashboard = require("alpha.themes.dashboard")
local scan = require("plenary.scandir")
-- Get the runtime path where your headers are stored
local runtime_path = vim.fn.stdpath("config") .. "/lua/plugins/alpha_headers"
-- Scan for all Lua files in the headers directory
local headers = {}
for _, file in ipairs(scan.scan_dir(runtime_path, { search_pattern = "%.lua$" })) do
-- Extract just the filename without extension and path
local header_name = vim.fn.fnamemodify(file, ":t:r")
table.insert(headers, header_name)
end
-- Randomly select a header
math.randomseed(os.time()) -- Initialize random seed
local random_header = headers[math.random(#headers)]
-- Construct the full path and require the header
local header = "plugins.alpha_headers." .. random_header
require(header).setup(dashboard)
dashboard.section.buttons.val = {
dashboard.button("n", " New file", "<Cmd>ene <CR>"),
dashboard.button("SPC p f", " Find file"),
dashboard.button("SPC p v", " Open Oil"),
dashboard.button("SPC w q", " Quit"),
}
for _, a in ipairs(dashboard.section.buttons.val) do
a.opts.width = 49
a.opts.cursor = -2
end
alpha.setup(dashboard.config)
end
alpha_c()
end,
}

View File

@@ -0,0 +1,142 @@
local function getLen(str, start_pos)
local byte = string.byte(str, start_pos)
if not byte then
return nil
end
return (byte < 0x80 and 1) or (byte < 0xE0 and 2) or (byte < 0xF0 and 3) or (byte < 0xF8 and 4) or 1
end
local function colorize(header, header_color_map, colors)
for letter, color in pairs(colors) do
local color_name = "AlphaJemuelKwelKwelWalangTatay" .. letter
vim.api.nvim_set_hl(0, color_name, color)
colors[letter] = color_name
end
local colorized = {}
for i, line in ipairs(header_color_map) do
local colorized_line = {}
local pos = 0
for j = 1, #line do
local start = pos
pos = pos + getLen(header[i], start + 1)
local color_name = colors[line:sub(j, j)]
if color_name then
table.insert(colorized_line, { color_name, start, pos })
end
end
table.insert(colorized, colorized_line)
end
return colorized
end
local M = {}
M.setup = function(dashboard)
local color = require("util.color")
local alpha = require("alpha")
local mocha = require("catppuccin.palettes").get_palette("mocha")
local color_map = {
[[ AAAA]],
[[AAAAAA AAAA]],
[[AA AAAA AAAA KKHHKKHHHH]],
[[AAAA AAAA AA HHBBKKKKKKKKKKKKKK]],
[[ AAAAAA AAKKBBHHKKBBYYBBKKKKHHKKKKKK]],
[[ AAAA BBAAKKHHBBBBKKKKBBYYBBHHHHKKKKKK]],
[[ BBAABBKKYYYYHHKKYYYYKKKKBBBBBBZZZZZZ]],
[[ YYBBYYBBKKYYYYYYYYYYKKKKBBKKAAAAZZOOZZZZ]],
[[ XXXXYYYYBBYYYYYYYYBBBBBBKKKKBBBBAAAAZZZZ]],
[[ XXXXUUUUYYYYBBYYYYYYBBKKBBZZOOAAZZOOAAAAAA]],
[[ ZZZZZZXXUUXXXXYYYYYYYYBBAAAAZZOOOOAAOOZZZZAAAA]],
[[ ZZUUZZXXUUUUXXXXUUXXFFFFFFFFAAAAOOZZAAZZZZ AA]],
[[ RRRRUUUUZZZZZZZZXXOOFFFFOOZZOOAAAAAAZZZZAA]],
[[ CCSSUUUUZZXXXXZZXXOOFFFFOOZZOOOOZZOOAAAA]],
[[ CCCCUUUUUUUUUURRRROOFFFFOOZZOOOOZZOOZZZZ]],
[[ CCCCUUUUUUUUSSCCCCEEQQQQOOZZOOOOZZOOZZZZ]],
[[ CCCCUUGGUUUUCCCCCCEEQQQQOOZZOOOOZZEEZZ]],
[[ RRRRGGGGUUGGCCCCCCOOOOOOOOZZOOEEZZII]],
[[ IIRRGGGGGGCCCCCCOOOOOOOOZZEEII]],
[[ GGRRCCCCCCOOOOEEEEII II]],
[[ RRRRRREEEE IIII]],
[[ II]],
[[]],
}
local yellow = "#FAC87C"
local orange = "#BF854E"
local maroon = "#502E2B"
local brown = "#38291B"
local colors = {
["A"] = { fg = mocha.rosewater },
["Y"] = { fg = yellow },
["B"] = { fg = color.darken(yellow, 5) },
["X"] = { fg = color.darken(yellow, 20) },
["U"] = { fg = color.darken(yellow, 25) },
["F"] = { fg = color.darken(yellow, 35) },
["O"] = { fg = color.darken(yellow, 45) },
["K"] = { fg = maroon },
["H"] = { fg = color.darken(maroon, 10) },
["Z"] = { fg = mocha.crust },
["G"] = { fg = color.darken(yellow, 25) },
["R"] = { fg = orange },
["Q"] = { fg = color.darken(orange, 20) },
["E"] = { fg = color.darken(orange, 35) },
["I"] = { fg = brown },
["C"] = { fg = mocha.mantle },
["S"] = { fg = mocha.subtext1 },
}
local header = {}
for _, line in ipairs(color_map) do
local header_line = [[]]
for i = 1, #line do
if line:sub(i, i) ~= " " then
header_line = header_line .. ""
else
header_line = header_line .. " "
end
end
table.insert(header, header_line)
end
local header_add = [[ N E O B E E ]]
table.insert(header, header_add)
local hl_add = {}
for i = 1, #header_add do
table.insert(hl_add, { "NeoBeeTitle", 1, i })
end
dashboard.section.header.val = header
local colorized = colorize(header, color_map, colors)
table.insert(colorized, hl_add)
dashboard.section.header.opts = {
hl = colorized,
position = "center",
}
dashboard.section.buttons.val = {
dashboard.button("SPC e e", " New file", "<Cmd>ene <CR>"),
dashboard.button("SPC f f", " Find file"),
dashboard.button("SPC s s", " NeoBee config", "<Cmd>Neotree reveal ~/.config/nvim<CR>"),
dashboard.button("SPC q q", " Quit", "<Cmd>qa<CR>"),
}
for _, a in ipairs(dashboard.section.buttons.val) do
a.opts.width = 49
a.opts.cursor = -2
end
alpha.setup(dashboard.config)
end
return M

View File

@@ -0,0 +1,37 @@
local M = {}
M.setup = function(dashboard)
vim.api.nvim_set_hl(0, "AlphaHeaderRed", { fg = _G.matugen_palette.color12, bold = true })
local logo = {
"⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡿⠿⠋⠀⢀⣼⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡇⠀⠈⠉⠉⠙⠛⠛⠻⢿⣿⡿⠟⠁⠀⣀⣴⣿⣿⣿⣿⣿⠟",
"⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠃⠀⠀⢀⣴⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠟⠛⣉⣡⠀⣠⣴⣶⣶⣦⠄⣀⡀⠀⠀⠀⣠⣾⣿⣿⣿⣿⣿⡿⢃⣾",
"⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡏⠀⣾⣤⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠏⣠⣾⡟⢡⣾⣿⣿⣿⡿⢋⣴⣿⡿⢀⣴⣾⣿⣿⣿⣿⣿⣿⣿⢡⣾⣿",
"⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠟⠃⠀⢻⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠃⣼⣿⡟⣰⣿⣿⣿⣿⠏⣰⣿⣿⠟⣠⣿⣿⣿⣿⣿⣿⣿⣿⣿⡇⢚⣛⢿",
"⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠏⠀⣠⣾⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣟⠸⣿⠟⢰⣿⣿⣿⣿⠃⣾⣿⣿⠏⣴⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡿⢋⣾",
"⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠿⠻⠻⠃⠀⣴⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡄⢉⣴⣿⣿⣿⣿⡇⠘⣿⣿⠋⣼⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣧⡘⣿",
"⣿⣿⣿⣿⣿⣿⣿⣿⡿⠿⠿⣿⣿⣿⣿⠁⢀⣀⠀⢀⣾⣿⣿⣿⣿⣿⣿⠟⠉⠉⠉⢿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣦⣤⣤⣾⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣷⣌",
"⣿⣿⣿⣿⣿⣿⡿⠁⣀⣤⡀⠀⠈⠻⢿⠀⣼⣿⣷⣿⣿⣿⣿⣿⣿⡿⠁⠀⠀⠀⠀⠘⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿",
"⣿⣿⣿⠟⠛⠙⠃⠀⣿⣿⣿⠀⠀⠀⠀⠀⠙⠿⣿⣿⣿⣿⣿⣿⣿⠀⠀⠀⠀⠀⠀⠀⣾⣿⣿⡿⠿⠿⠿⠿⢿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠛⠁⠀⠀⠀⠈⠻⣿⣿⣿⣿⣿⣿⣿",
"⣿⠟⠁⢀⣴⣶⣶⣾⣿⣿⣿⣿⣶⡐⢦⣄⠀⠀⠈⠛⢿⣿⣿⣿⣿⡀⠀⠀⠀⠀⢀⣼⡿⢛⣩⣴⣶⣶⣶⣶⣶⣶⣭⣙⠻⣿⣿⣿⣿⣿⠀⠀⠀⠀⠀⠀⠀⠀⠘⣿⣿⣿⣿⣿⣿",
"⠁⠀⣴⣿⣿⣿⣿⠿⠿⣿⣿⣿⣿⣿⣦⡙⠻⣶⣄⡀⠀⠈⠙⢿⣿⣷⣦⣤⣤⣴⣿⡏⣠⢸⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣷⣌⠻⣿⣿⣿⠀⠀⠀⠀⠀⠀⠀⠀⠀⣿⣿⣿⣿⣿⣿",
"⠀⢸⣿⣿⣿⠋⣠⠔⠀⠀⠻⣿⣿⣿⣿⢉⡳⢦⣉⠛⢷⣤⣀⠀⠈⠙⠿⣿⣿⣿⣿⢸⣿⡄⠻⣿⣿⠟⡈⣿⣿⣿⣿⣿⢉⣿⣧⢹⣿⣿⣄⠀⠀⠀⠀⠀⠀⠀⢠⣿⣿⣿⣿⣿⣿",
"⠀⢸⣿⣿⡇⠠⡇⠀⠀⠀⠀⣿⣿⣿⣿⢸⣿⣷⣤⣙⠢⢌⡛⠷⣤⣄⠀⠈⠙⠿⣿⣿⣿⣿⣷⣦⣴⣾⣿⣤⣙⣛⣛⣥⣾⣿⣿⡌⣿⣿⣿⣷⣤⣀⣀⣀⣠⣴⣿⣿⣿⣿⣿⣿⣿",
"⠀⢸⣿⣿⣷⡀⠡⠀⠀⠀⣰⣿⣿⣿⣿⢸⣿⣿⣿⣿⣿⣦⣌⡓⠤⣙⣿⣦⡄⠀⠈⠙⠿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⢡⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿",
"⠀⢸⣿⣿⣿⣿⣶⣤⣴⣾⣿⣿⣿⣿⣿⢸⣿⣿⣿⣿⣿⣿⣿⣿⣷⣾⣿⣿⣷⠀⣶⡄⠀⠈⠙⠿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡿⢃⣾⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿",
"⠀⢸⣿⣿⣿⣿⣿⠟⠻⣿⣿⡏⣉⣭⣭⡘⠻⢿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠀⣿⡇⢸⡇⢠⡀⠈⠙⠋⠉⠉⠉⠉⠛⠫⣴⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿",
"⠀⢸⣿⣿⠛⣿⣿⣀⣀⣾⡿⢀⣿⣿⣿⢻⣷⣦⢈⡙⠻⢿⣿⣿⣿⣿⣿⣿⣿⠀⣿⡇⢸⡇⢸⣿⠀⣦⠀⠀⠶⣶⣦⣀⠀⠘⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿",
"⠀⢸⣿⣿⣦⣈⡛⠿⠟⣋⣤⣾⣿⣿⣿⣸⣿⣿⢸⡇⢰⡆⢈⡙⠻⢿⣿⣿⣿⠀⢿⡇⢸⡇⢸⣿⢠⣿⡇⣿⡆⢈⡙⠻⠧⠀⢹⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿",
"⠀⠀⣝⠛⢿⣿⣿⣿⣿⣿⣿⠟⣁⠀⠀⢈⠛⠿⢸⣇⢸⡇⢸⡇⣶⣦⣌⡙⠻⢄⡀⠁⠘⠇⠘⣿⢸⣿⡇⣿⡇⢸⡛⠷⣦⣄⠀⠹⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿",
}
-- Keep the logo as a single string to preserve formatting
dashboard.section.header.val = logo
dashboard.section.header.opts = {
position = "center",
hl = "AlphaHeaderRed",
shrink_margin = false,
}
end
return M

View File

@@ -0,0 +1,52 @@
local M = {}
M.setup = function(dashboard)
vim.api.nvim_set_hl(0, "AlphaHeaderRed", { fg = _G.matugen_palette.color12, bold = true })
local logo = {
" :h- Nhy` ",
" -mh. h. `Ndho ",
" hmh+ oNm. oNdhh ",
" `Nmhd` /NNmd /NNhhd ",
" -NNhhy `hMNmmm`+NNdhhh ",
" .NNmhhs ```....`..-:/./mNdhhh+ ",
" mNNdhhh- `.-::///+++////++//:--.`-/sd` ",
" oNNNdhhdo..://++//++++++/+++//++///++/-.` ",
" y. `mNNNmhhhdy+/++++//+/////++//+++///++////-` `/oos: ",
" . Nmy: :NNNNmhhhhdy+/++/+++///:.....--:////+++///:.`:s+ ",
" h- dNmNmy oNNNNNdhhhhy:/+/+++/- ---:/+++//++//.` ",
" hd+` -NNNy`./dNNNNNhhhh+-:///// -+oo:` ::-:+////++///:` ",
" /Nmhs+oss-:++/dNNNmhho:--::/// /mmmmmo ../-///++///////. ",
" oNNdhhhhhhhs//osso/:---:::/// /yyyyso ..o+-//////////:/. ",
" /mNNNmdhhhh/://+///:::////// -:::- ..+sy+:////////::/:/. ",
" /hNNNdhhs--:/+++////++/////. ..-/yhhs-/////////::/::/` ",
" .ooo+/-::::/+///////++++//-/ossyyhhhhs/:///////:::/::::/: ",
" -///:::::::////++///+++/////:/+ooo+/::///////.::://::---+` ",
" /////+//++++/////+////-..//////////::-:::--`.:///:---:::/: ",
" //+++//++++++////+++///::-- .::::-------:: ",
" :/++++///////////++++//////. -:/:----::../- ",
" -/++++//++///+////////////// .::::---:::-.+` ",
" `////////////////////////////:. --::-----...-/ ",
" -///://////////////////////::::-.. :-:-:-..-::.`.+` ",
" :/://///:///::://::://::::::/:::::::-:---::-.-....``/- - ",
" ::::://::://::::::::::::::----------..-:....`.../- -+oo/ ",
" -/:::-:::::---://:-::-::::----::---.-.......`-/. ``",
" s-`::--:::------:////----:---.-:::...-.....`./: ",
" yMNy.`::-.--::..-dmmhhhs-..-.-.......`.....-/:` ",
" oMNNNh. `-::--...:NNNdhhh/.--.`..``.......:/- ",
" :dy+:` .-::-..NNNhhd+``..`...````.-::-` ",
" .-:mNdhh:.......--::::-` ",
" yNh/..------..` ",
" ",
}
-- Keep the logo as a single string to preserve formatting
dashboard.section.header.val = logo
dashboard.section.header.opts = {
position = "center",
hl = "AlphaHeaderRed",
shrink_margin = false,
}
end
return M

View File

@@ -0,0 +1,48 @@
local M = {}
M.setup = function(dashboard)
vim.api.nvim_set_hl(0, "AlphaHeaderGreen", { fg = _G.matugen_palette.color12, bold = true })
local logo = [[
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣠⡿⠛⢶⣦⣀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣴⣦⠀⣠⡾⠛⠙⠛⠋⠀⠀⠀⠈⠉⠛⣦⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢾⡇⠙⠛⠋⢀⣤⣀⠀⣀⣤⣤⡀⠀⠀⠀⠈⠻⣦⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣀⡤⠤⠴⠾⠋⠉⠛⢾⡏⠙⠿⠦⠤⢤⣀⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣼⣧⡀⢀⡤⠋⠀⠈⠉⠉⠀⠉⠳⠤⠤⠴⢦⡄⠸⣷⠀⠀⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⡤⢶⣿⠉⢀⣀⡠⠆⠀⠀⠀⠀⠀⠀⠀⢤⣀⣀⠈⢹⣦⢤⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣿⣀⡿⠿⠾⠀⠀⠀⠀⠀⢴⣦⡀⠀⠀⠀⣠⠟⠀⢹⡇⠀⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⠀⢀⣠⣤⣿⣁⡡⣴⡏⠀⠀⠀⢀⠀⢧⣀⠄⠀⠀⠀⣀⣰⠆⢀⠁⠀⠀⢈⣶⡤⣀⢹⣦⣄⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣸⡟⠀⣴⡄⠀⢀⡄⠀⠀⣦⡈⠃⠀⠀⡾⣳⣄⠀⣼⡇⠀⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⣠⢴⠟⢁⡝⠀⠁⠀⠃⠉⠀⠀⠘⣯⠀⡀⠾⣤⣄⣠⢤⠾⠄⠀⣸⠖⠀⠀⠈⠀⠃⠀⠀⠹⡄⠙⣶⢤⡀⠀⠀⠀⠀⠀⠀⠀⣠⡶⠟⠻⠶⣄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⡿⠀⠀⠿⠁⢀⡞⠁⠀⠀⣿⠗⠀⠀⠀⣟⢮⣿⣆⣿⠀⠀⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⣠⠾⡇⠈⣀⡞⠀⠀⠀⠀⡀⠀⢀⣠⣄⣇⠀⣳⠴⠃⠀⠀⠀⠣⢴⠉⣰⣇⣀⣀⠀⠀⡄⠀⠀⠀⢹⣄⡘⠈⡷⣦⠀⠀⠀ ⠀⢸⠏⠀⠀⠀⣰⡏⠀⠀⠀⠀⠀⠀⠀⠀⠀⢰⡇⠀⠀⠀⠰⣯⡀⠀⠀⠀⠀⠀⠀⠀⠀⠪⣳⡵⡿⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀
⠀⢠⠞⠉⢻⡄⠀⠀⠈⠙⠀⠀⠀⠀⠙⣶⣏⣤⣤⠟⠉⠁⠀⠀⠀⠀⠀⠀⠀⠉⠙⢦⣱⣌⣷⠊⠀⠀⠀⠀⠈⠁⠀⠀⠀⡝⠉⠻⣄ ⢸⡀⠀⠀⢰⡟⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠸⣇⠀⣦⣀⠀⠈⠉⢀⣀⣰⣦⡀⠀⠀⠀⠀⠈⠉⣷⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⣴⠛⢀⡠⢼⡇⠀⠀⢀⡄⠀⢀⣀⡽⠚⠁⠀⠀⠀⢠⡀⢠⣀⠠⣔⢁⡀⠀⣄⠀⡄⠀⠀⠀⠈⠑⠺⣄⡀⠀⠠⡀⠀⠀⢠⡧⠄⠀⠘⢧ ⠘⣷⠀⠀⠘⢷⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢿⡆⠻⠦⣌⣉⣉⣁⡤⠔⠻⡇⠀⠀⠀⣀⣠⣼⠏⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⣿⡶⠋⠀⠀⠈⣠⣈⣩⠗⠒⠋⠀⠀⠀⠀⣀⣠⣆⡼⣷⣞⠛⠻⡉⠉⡟⠒⡛⣶⠧⣀⣀⣀⠀⠀⠀⠀⠈⠓⠺⢏⣉⣠⠋⠀⠀⠀⡾⠛⠉⠙⠛⠲⢦⣄⠀⠙⣦⡀⠀⠀⠀⠀⠀⠀⠀⠀⠈⢿⣄⠀⠀⠲⠇⠀⠀⠀⠀⠀⠀⢀⣴⢏⠉⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⣿⠇⠐⠤⠤⠖⠁⣿⣀⣀⠀⠀⠀⠀⠀⠉⠁⠈⠉⠙⠛⢿⣷⡄⢣⡼⠀⣾⣿⠧⠒⠓⠚⠛⠉⠀⠀⠀⠀⠀⢀⣀⣾⡉⠓⠤⡤⠄⣇⣀⣀⣀⡀⠀⠀⠈⣧⠀⠈⣿⣦⣄⡀⠀⠀⠀⠀⠀⠀⢀⣻⣦⣄⠀⠀⠀⠀⠀⠀⡠⠔⣿⠓⢶⣤⣄⣀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⠹⣆⣤⠀⠀⠠⠀⠈⠓⠈⠓⠤⡀⠀⠀⠀⠀⠀⠀⠀⠀⠈⣿⣿⢸⠀⢸⣿⠇⠀⠀⠀⠀⠀⠀⠀⠀⢀⡤⠒⠁⠰⠃⠀⠠⠀⠀⢀⠟⠁⠀⠈⠉⠙⠳⢴⡏⠀⠀⣿⡇⠈⠙⠻⠶⠤⠴⠶⠛⠋⠹⡀⠈⠻⣶⣤⠤⠄⣀⣠⠞⠁⠀⢸⠀⠈⠙⠳⢦⣄⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠉⠓⢲⣄⡈⢀⣠⠀⠀⠀⡸⠶⠂⠀⠀⢀⠀⠀⠤⠞⢻⡇⠀⠀⢘⡟⠑⠤⠄⠀⢀⠀⠀⠐⠲⢿⡀⠀⠀⢤⣀⢈⣀⡴⠖⠋⣧⣤⣤⣤⣤⣀⡀⠀⣷⢀⣼⠃⣿⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠙⢦⣀⠀⠉⠉⠉⠉⠀⠀⢀⣴⠏⠀⠀⠀⠀⠀⠉⠻⣦⣄⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠈⠉⠉⠙⠓⠒⣾⣁⣀⣴⠀⣀⠙⢧⠂⢀⣆⣀⣷⣤⣀⣾⣇⣀⡆⠀⢢⠛⢁⠀⢰⣀⣀⣹⠒⠒⠛⠉⠉⠉⠀⠀⠀⡏⠀⢠⠀⠀⠈⠉⢺⠁⢈⡞⢀⠇⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⠛⠒⢦⠀⠀⠀⢸⠋⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠙⢷⡄⠀⠀
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠉⠁⠈⠉⠉⠛⠉⠙⠉⠀⠀⣿⡟⣿⣿⠀⠀⠈⠉⠉⠙⠋⠉⠉⠀⠉⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠻⣦⣈⠙⠶⠤⠴⢞⣠⠞⢀⡞⠀⠀⠀⠀⠀⠀⠀⠀⢀⣦⠀⠀⠀⠀⠀⠀⢸⠀⠀⠀⠈⡆⠀⠀⠀⢰⠀⠀⠀⠀⠀⠀⠀⠈⠻⣆⠀
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣿⡇⢻⣿⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⠉⠉⠛⠛⠛⠯⢤⣤⣎⣀⠀⠀⠀⢀⣀⣠⣤⣾⠛⠁⠀⠀⠀⠀⠀⠀⠀⡇⠀⠀⠀⢻⠀⠀⠀⠈⡆⠀⠀⡀⠀⠀⠀⠀⠀⠙⣇
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣀⣤⣶⣾⣿⣿⠁⠀⢹⡛⣟⡶⢤⣀⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⠉⠙⠛⠛⠛⠛⠉⠉⠠⣿⠀⠀⠀⠀⠀⠀⠀⠀⠀⢇⠀⠀⠀⠀⡇⠀⠀⠀⡇⠀⣰⠏⠀⠀⠀⠀⠀⠀⡿
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣴⠛⢯⣽⡟⢿⣿⠛⠿⠳⠞⠻⣿⠻⣆⢽⠟⣶⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢿⠀⠀⠀⠀⠀⠀⠀⠀⠀⢸⠀⠀⠀⠀⢃⠀⠀⠀⢸⣰⠁⠀⠀⠀⠀⠀⠀⣸⠇
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠛⠃⠲⠯⠴⣦⣼⣷⣤⣤⣶⣤⣩⡧⠽⠷⠐⠛⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢸⡄⠀⠀⠀⠀⠀⠀⠀⠀⢸⡄⠀⠀⠀⢸⠀⠀⢀⣸⡇⠀⠀⠀⠀⠀⠀⣰⠏⠀
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣿⡇⠀⣿⡆⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢸⠛⠢⣄⡀⠀⠀⠀⠀⠀⢸⡇⠀⠀⠀⠸⣤⠴⠛⠁⣿⠤⢤⡀⠀⢀⡼⠏⠀⠀
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣀⣄⡀⢀⣀⣠⡾⡿⢡⢐██████⣀⣄⡀█████⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀███⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢸⠀⠀⠀⠉⠉⠓⠒⠶⠶⠞⠁⠀⠀⠀⠀⠁⠀⠀⠀⢿⠀⠀⠈⢳⡟⠁⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣤⢴⡏⠁⠀⠝⠉⣡⠟⣰⠃⢸░░██████⠀░░███⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀░░░⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣸⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⡴⢻⠀⠀⣀⡼⠃⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣴⡟⠀⠈⣿⢄⡴⠞⠻⣄⣰⣡⠤⣞⣸░███░███⣶░███⡀⠀█████⠀█████⠀████⠀⠀█████████████⡀⠀⠀⠀⠀⠀⠀⠀⣀⣀⣤⡴⠞⠋⠀⠀⡇⠛⣻⡄⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⢀⣴⣶⡿⠃⠉⢺⠁⠙⠒⠀⠀⣠⡉⠀⠉⠚⠉⠉░███░░███░███⢻░░███⠀░░███⠀░░███⠀░░███░░███░░███⠉⠛⠛⠛⠛⠛⠉⠉⠉⠀⠀⠀⠀⠀⠀⡟⠛⠋⠁⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⣠⣾⣿⣇⠁⢈⡦⠀⡍⠋⠁⡀⠸⡋⠀⠀⠀⢘⠏⠉░███⢉░░██████⠈⢁░███⠀⠀░███⠀ ░███⠀⠀░███⠀░███⠀░███⠀⠀⠀⠀⠀⢰⡖⠀⠀⠀⠀⠀⠀⠀⠀⡇⠀⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠉⣁⠀⠉⠉⠉⠙⠛⠛⠒⠚⠳⠤⢼⣤⣠⠤⣮⣠⣤░███⣿⠤░░█████⠉⠉░░███⠀███⠀⠀ ░███⠀⠀░███⠀░███⠀░███⠀⠀⠀⠀⢠⠏⠀⠀⠀⠀⠀⠀⠀⠀⠀⡇⠀⠀⠀⠀⠀⠀⠀⠀
█████ ░░█████ ░░█████ █████ █████░███ █████
░░░░░ ░░░░░ ░░░░░ ░░░░░ ░░░░░ ░░░ ░░░░░
]]
-- Keep the logo as a single string to preserve formatting
dashboard.section.header.val = vim.split(logo, "\n")
dashboard.section.header.opts = {
position = "center",
hl = "AlphaHeaderGreen",
shrink_margin = false,
}
end
return M

View File

@@ -0,0 +1,124 @@
local function getLen(str, start_pos)
local byte = string.byte(str, start_pos)
if not byte then
return nil
end
return (byte < 0x80 and 1) or (byte < 0xE0 and 2) or (byte < 0xF0 and 3) or (byte < 0xF8 and 4) or 1
end
local function colorize(header, header_color_map, colors)
for letter, color in pairs(colors) do
local color_name = "AlphaJemuelKwelKwelWalangTatay" .. letter
vim.api.nvim_set_hl(0, color_name, color)
colors[letter] = color_name
end
local colorized = {}
for i, line in ipairs(header_color_map) do
local colorized_line = {}
local pos = 0
for j = 1, #line do
local start = pos
pos = pos + getLen(header[i], start + 1)
local color_name = colors[line:sub(j, j)]
if color_name then
table.insert(colorized_line, { color_name, start, pos })
end
end
table.insert(colorized, colorized_line)
end
return colorized
end
local M = {}
M.setup = function(dashboard)
local header = {
[[ ██████████████████████████████████████████████████████████████████████████████████████████████████████ ]],
[[ ██████████████████████████████████████████████████████████████████████████████████████████████████████ ]],
[[ ██████████████████████████████████████████████████████████████████████████████████████████████████████ ]],
[[ ██████████████████████████████████████████████████████████████████████████████████████████████████████ ]],
[[ ██████████████████████████████████████████████████████████████████████████████████████████████████████ ]],
[[ ██████████████████████████████████████████████████████████████████████████████████████████████████████ ]],
[[ ██████████████████████████████████████████████████████████████████████████████████████████████████████ ]],
[[ ██████████████████████████████████████████████████████████████████████████████████████████████████████ ]],
[[ ██████████████████████████████████████████████████████████████████████████████████████████████████████ ]],
[[ ██████████████████████████████████████████████████████████████████████████████████████████████████████ ]],
[[ ██████████████████████████████████████████████████████████████████████████████████████████████████████ ]],
[[ ██████████████████████████████████████████████████████████████████████████████████████████████████████ ]],
[[ ██████████████████████████████████████████████████████████████████████████████████████████████████████ ]],
[[ ██████████████████████████████████████████████████████████████████████████████████████████████████████ ]],
[[ ██████████████████████████████████████████████████████████████████████████████████████████████████████ ]],
[[ ██████████████████████████████████████████████████████████████████████████████████████████████████████ ]],
[[ ██████████████████████████████████████████████████████████████████████████████████████████████████████ ]],
[[ ██████████████████████████████████████████████████████████████████████████████████████████████████████ ]],
[[ ██████████████████████████████████████████████████████████████████████████████████████████████████████ ]],
[[ ██████████████████████████████████████████████████████████████████████████████████████████████████████ ]],
}
local color_map = {
[[ WWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBWWWWWWWWWWWWWW ]],
[[ RRRRWWWWWWWWWWWWWWWWRRRRRRRRRRRRRRRRWWWWWWWWWWWWWWWWBBPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPBBWWWWWWWWWWWW ]],
[[ RRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRBBPPPPPPHHHHHHHHHHHHHHHHHHHHHHHHHHPPPPPPBBWWWWWWWWWW ]],
[[ RRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRBBPPPPHHHHHHHHHHHHFFHHHHFFHHHHHHHHHHPPPPBBWWWWWWWWWW ]],
[[ OOOORRRRRRRRRRRRRRRROOOOOOOOOOOOOOOORRRRRRRRRRRRRRBBPPHHHHFFHHHHHHHHHHHHHHHHHHHHHHHHHHHHPPBBWWWWWWWWWW ]],
[[ OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOBBPPHHHHHHHHHHHHHHHHHHHHBBBBHHHHFFHHHHPPBBWWBBBBWWWW ]],
[[ OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOBBPPHHHHHHHHHHHHHHHHHHBBMMMMBBHHHHHHHHPPBBBBMMMMBBWW ]],
[[ YYYYOOOOOOOOOOOOOOOOYYYYYYYYYYYYYYYYOOBBBBBBBBOOOOBBPPHHHHHHHHHHHHFFHHHHBBMMMMMMBBHHHHHHPPBBMMMMMMBBWW ]],
[[ YYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYBBMMMMBBBBOOBBPPHHHHHHHHHHHHHHHHHHBBMMMMMMMMBBBBBBBBMMMMMMMMBBWW ]],
[[ YYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYBBBBMMMMBBBBBBPPHHHHHHFFHHHHHHHHHHBBMMMMMMMMMMMMMMMMMMMMMMMMBBWW ]],
[[ GGGGYYYYYYYYYYYYYYYYGGGGGGGGGGGGGGGGYYYYBBBBMMMMBBBBPPHHHHHHHHHHHHHHFFBBMMMMMMMMMMMMMMMMMMMMMMMMMMMMBB ]],
[[ GGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGBBBBMMMMBBPPHHFFHHHHHHHHHHHHBBMMMMMMCCBBMMMMMMMMMMCCBBMMMMBB ]],
[[ GGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGBBBBBBBBPPHHHHHHHHHHHHHHHHBBMMMMMMBBBBMMMMMMBBMMBBBBMMMMBB ]],
[[ UUUUGGGGGGGGGGGGGGGGUUUUUUUUUUUUUUUUGGGGGGGGGGGGBBBBPPHHHHHHHHHHFFHHHHBBMMRRRRMMMMMMMMMMMMMMMMMMRRRRBB ]],
[[ UUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUBBPPPPHHFFHHHHHHHHHHBBMMRRRRMMBBMMMMBBMMMMBBMMRRRRBB ]],
[[ UUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUBBPPPPPPHHHHHHHHHHHHHHBBMMMMMMBBBBBBBBBBBBBBMMMMBBWW ]],
[[ VVVVUUUUUUUUUUUUUUUUVVVVVVVVVVVVVVVVUUUUUUUUUUUUBBBBBBPPPPPPPPPPPPPPPPPPPPBBMMMMMMMMMMMMMMMMMMMMBBWWWW ]],
[[ VVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVBBMMMMMMBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBWWWWWW ]],
[[ VVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVBBMMMMBBBBWWBBMMMMBBWWWWWWWWWWBBMMMMBBWWBBMMMMBBWWWWWWWW ]],
[[ WWWWVVVVVVVVVVVVVVVVWWWWWWWWWWWWWWWWVVVVVVVVVVBBBBBBBBWWWWBBBBBBWWWWWWWWWWWWWWBBBBBBWWWWBBBBWWWWWWWWWW ]],
}
local c = {
color0 = "#191724",
color1 = "#eb6f92",
color2 = "#31748f",
color3 = "#f6c177",
color4 = "#9ccfd8",
color5 = "#c4a7e7",
color6 = "#ebbcba",
color7 = "#908caa",
color8 = "#26233a",
color15 = "#e0def4",
}
local colors = {
["W"] = { fg = c.color0 },
["C"] = { fg = c.color15 },
["B"] = { fg = c.color8 },
["R"] = { fg = c.color1 },
["O"] = { fg = c.color6 },
["Y"] = { fg = c.color3 },
["G"] = { fg = c.color4 },
["U"] = { fg = c.color2 },
["P"] = { fg = c.color3 },
["H"] = { fg = c.color5 },
["F"] = { fg = c.color1 },
["M"] = { fg = c.color7 },
["V"] = { fg = c.color5 },
}
dashboard.section.header.val = header
dashboard.section.header.opts = {
hl = colorize(header, color_map, colors),
position = "center",
}
end
return M

View File

@@ -0,0 +1,31 @@
local M = {}
M.setup = function(dashboard)
vim.api.nvim_set_hl(0, "AlphaHeaderColor", { fg = _G.matugen_palette.color12, bold = true })
dashboard.section.header.val = {
"",
"⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢠⡄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀",
"⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣠⣴⣾⣿⣄⠀⠀⠀⠀⠀⠈⢿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡿⠃⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣠⣿⣿⣄⠀⠀⠀⠀⠀⠀⢴⣾⣿⣄⠀⠀⠀⠀⠀⠀⠀⠀",
"⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣤⣶⣿⣿⣿⡿⠛⠉⠀⠀⠀⠀⠀⠀⠈⢿⣿⣿⣟⠛⠛⠛⠛⣻⣿⣿⡿⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣰⣿⣿⣿⣿⣆⠀⠀⠀⠀⠀⠈⢿⣿⣿⣆⠀⠀⠀⠀⠀⠀⠀",
"⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣀⣴⣾⣿⣿⣿⠟⠋⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⢻⣿⣿⣦⠀⠀⣼⣿⣿⡟⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣼⣿⣿⡟⢻⣿⣿⣆⠀⠀⠀⠀⠀⠀⢻⣿⣿⣧⠀⠀⠀⠀⠀⠀",
"⠀⠀⠀⠀⠀⠀⢀⣤⣶⣿⣿⣿⡿⠛⠉⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠹⣿⣿⣷⣼⣿⣿⡟⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣼⣿⣿⡟⠀⠀⠻⣿⣿⣧⡀⠀⠀⠀⠀⠀⢻⣿⣿⣧⠀⠀⠀⠀⠀",
"⠀⠀⠀⣀⣤⣾⣿⣿⣿⠟⠛⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠹⣿⣿⣿⣿⠏⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣾⣿⣿⠏⠀⠀⠀⠀⠙⣿⣿⣷⡀⠀⠀⠀⠀⠀⠹⣿⣿⣷⡀⠀⠀⠀",
"⠀⠀⠀⠙⣿⣿⣿⡍⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢠⣿⣿⣿⣷⡄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠘⣿⣿⣷⡄⠀⠀⠀⠀⠀⠙⣿⣿⣷⡀⠀⠀⠀⠀⢠⣾⣿⣿⠃⠀⠀⠀",
"⠀⠀⠀⠀⠈⢿⣿⣿⣄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢠⣿⣿⣿⢿⣿⣿⣄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⢿⣿⣿⣄⠀⠀⠀⠀⠀⠘⢿⣿⣿⣄⠀⠀⣠⣿⣿⡿⠁⠀⠀⠀⠀",
"⠀⠀⠀⠀⠀⠈⢿⣿⣿⣆⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣰⣿⣿⡿⠁⠈⢿⣿⣿⣆⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⢿⣿⣿⣆⠀⠀⠀⠀⠀⠈⢿⣿⣿⣆⣰⣿⣿⡿⠁⠀⠀⠀⠀⠀",
"⠀⠀⠀⠀⠀⠀⠈⢻⣿⣿⣦⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣴⣿⣿⡟⠁⠀⠀⠈⢻⣿⣿⣦⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⢻⣿⣿⣦⠀⠀⠀⠀⠀⠀⢿⣿⣿⣿⣿⡟⠁⠀⠀⠀⠀⠀⠀",
"⠀⠀⠀⠀⠀⠀⠀⠀⢻⣿⣿⡧⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢼⣿⣿⡟⠀⠀⠀⠀⠀⠀⢻⣿⣿⡧⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢻⣿⣿⡧⠀⠀⠀⠀⠀⠀⢻⣿⣿⡟⠀⠀⠀⠀⠀⠀⠀⠀",
"⠀⠀⠀⠀⠀⠀⠀⠀⠀⠉⠉⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⠋⠀⠀⠀⠀⠀⠀⠀⠀⠉⠉⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠉⠉⠀⠀⠀⠀⠀⠀⠀⠀⠹⠏⠀⠀⠀⠀⠀⠀⠀⠀⠀",
"",
"",
}
dashboard.section.header.opts = {
position = "center",
hl = "AlphaHeaderColor",
shrink_margin = false,
}
end
return M

View File

@@ -0,0 +1,99 @@
return {
-- Autocompletion
"saghen/blink.cmp",
event = "VimEnter",
version = "1.*",
dependencies = {
-- Snippet Engine
{
"L3MON4D3/LuaSnip",
version = "2.*",
build = (function()
-- Build Step is needed for regex support in snippets.
-- This step is not supported in many windows environments.
-- Remove the below condition to re-enable on windows.
if vim.fn.has("win32") == 1 or vim.fn.executable("make") == 0 then
return
end
return "make install_jsregexp"
end)(),
dependencies = {
-- `friendly-snippets` contains a variety of premade snippets.
-- See the README about individual language/framework/plugin snippets:
-- https://github.com/rafamadriz/friendly-snippets
-- {
-- 'rafamadriz/friendly-snippets',
-- config = function()
-- require('luasnip.loaders.from_vscode').lazy_load()
-- end,
-- },
},
opts = {},
},
"folke/lazydev.nvim",
},
--- @module 'blink.cmp'
--- @type blink.cmp.Config
opts = {
keymap = {
-- 'default' (recommended) for mappings similar to built-in completions
-- <c-y> to accept ([y]es) the completion.
-- This will auto-import if your LSP supports it.
-- This will expand snippets if the LSP sent a snippet.
-- 'super-tab' for tab to accept
-- 'enter' for enter to accept
-- 'none' for no mappings
--
-- For an understanding of why the 'default' preset is recommended,
-- you will need to read `:help ins-completion`
--
-- No, but seriously. Please read `:help ins-completion`, it is really good!
--
-- All presets have the following mappings:
-- <tab>/<s-tab>: move to right/left of your snippet expansion
-- <c-space>: Open menu or open docs if already open
-- <c-n>/<c-p> or <up>/<down>: Select next/previous item
-- <c-e>: Hide menu
-- <c-k>: Toggle signature help
--
-- See :h blink-cmp-config-keymap for defining your own keymap
preset = "default",
-- For more advanced Luasnip keymaps (e.g. selecting choice nodes, expansion) see:
-- https://github.com/L3MON4D3/LuaSnip?tab=readme-ov-file#keymaps
},
appearance = {
-- 'mono' (default) for 'Nerd Font Mono' or 'normal' for 'Nerd Font'
-- Adjusts spacing to ensure icons are aligned
nerd_font_variant = "mono",
},
completion = {
-- By default, you may press `<c-space>` to show the documentation.
-- Optionally, set `auto_show = true` to show the documentation after a delay.
documentation = { auto_show = false, auto_show_delay_ms = 500 },
},
sources = {
default = { "lsp", "path", "snippets", "lazydev" },
providers = {
lazydev = { module = "lazydev.integrations.blink", score_offset = 100 },
},
},
snippets = { preset = "luasnip" },
-- Blink.cmp includes an optional, recommended rust fuzzy matcher,
-- which automatically downloads a prebuilt binary when enabled.
--
-- By default, we use the Lua implementation instead, but you may enable
-- the rust implementation via `'prefer_rust_with_warning'`
--
-- See :h blink-cmp-config-fuzzy for more information
fuzzy = { implementation = "lua" },
-- Shows a signature help window while you type arguments for a function
signature = { enabled = true },
},
}

View File

@@ -0,0 +1,19 @@
return {
'xvzc/chezmoi.nvim',
dependencies = { 'nvim-lua/plenary.nvim' },
config = function()
require("chezmoi").setup {
-- e.g. ~/.local/share/chezmoi/*
vim.api.nvim_create_autocmd({ "BufRead", "BufNewFile" }, {
pattern = { os.getenv("HOME") .. "/.local/share/chezmoi/*" },
callback = function(ev)
local bufnr = ev.buf
local edit_watch = function()
require("chezmoi.commands.__edit").watch(bufnr)
end
vim.schedule(edit_watch)
end,
})
}
end
}

View File

@@ -0,0 +1,90 @@
return {
{
"rose-pine/neovim",
name = "rose-pine",
enabled = false,
config = function()
vim.opt.laststatus = 2 -- Or 3 for global statusline
vim.opt.statusline = " %f %m %= %l:%c ♥ "
require("rose-pine").setup({
variant = "moon", -- auto, main, moon, or dawn
dark_variant = "moon", -- main, moon, or dawn
dim_inactive_windows = false,
extend_background_behind_borders = true,
enable = {
terminal = true,
legacy_highlights = true, -- Improve compatibility for previous versions of Neovim
migrations = true, -- Handle deprecated options automatically
},
styles = {
bold = true,
italic = true,
transparency = true,
},
groups = {
border = "muted",
link = "iris",
panel = "surface",
error = "love",
hint = "iris",
info = "foam",
note = "pine",
todo = "rose",
warn = "gold",
git_add = "foam",
git_change = "rose",
git_delete = "love",
git_dirty = "rose",
git_ignore = "muted",
git_merge = "iris",
git_rename = "pine",
git_stage = "iris",
git_text = "rose",
git_untracked = "subtle",
h1 = "iris",
h2 = "foam",
h3 = "rose",
h4 = "gold",
h5 = "pine",
h6 = "foam",
},
highlight_groups = {
-- Comment = { fg = "foam" },
-- VertSplit = { fg = "muted", bg = "muted" },
StatusLine = { fg = "love", bg = "love", blend = 10 },
StatusLineNC = { fg = "subtle", bg = "surface" },
-- Transparent Telescope
TelescopeBorder = { fg = "highlight_high", bg = "none" },
TelescopeNormal = { bg = "none" },
TelescopePromptNormal = { bg = "base" },
TelescopeResultsNormal = { fg = "subtle", bg = "none" },
TelescopeSelection = { fg = "text", bg = "base" },
TelescopeSelectionCaret = { fg = "rose", bg = "rose" },
},
before_highlight = function(group, highlight, palette)
-- Disable all undercurls
-- if highlight.undercurl then
-- highlight.undercurl = false
-- end
--
-- Change palette colour
-- if highlight.fg == palette.pine then
-- highlight.fg = palette.foam
-- end
end,
})
vim.cmd("colorscheme rose-pine")
end,
},
}

View File

@@ -0,0 +1,66 @@
return {
"stevearc/conform.nvim",
event = { "BufReadPre", "BufNewFile" },
config = function()
local conform = require("conform")
conform.setup({
formatters_by_ft = {
javascript = { "prettierd" },
typescript = { "prettierd" },
javascriptreact = { "prettierd" },
typescriptreact = { "prettierd" },
svelte = { "prettierd" },
vue = { "prettierd" },
css = { "prettierd" },
html = { "prettierd" },
json = { "prettierd" },
yaml = { "prettierd" },
markdown = { "prettierd" },
graphql = { "prettierd" },
lua = { "stylua" },
python = { "isort", "black" },
astro = { "prettierd" },
nix = { "alejandra" },
},
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 = 1000, lsp_format = "fallback" }
end,
})
vim.api.nvim_create_user_command("Format", 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
require("conform").format({ async = true, lsp_fallback = true, range = range })
end, { range = true })
vim.api.nvim_create_user_command("FormatDisable", function(args)
if args.bang then
-- FormatDisable! will disable formatting just for this buffer
vim.b.disable_autoformat = true
else
vim.g.disable_autoformat = true
end
end, {
desc = "Disable autoformat-on-save",
bang = true,
})
vim.api.nvim_create_user_command("FormatEnable", function()
vim.b.disable_autoformat = false
vim.g.disable_autoformat = false
end, {
desc = "Re-enable autoformat-on-save",
})
end,
}

View File

@@ -0,0 +1,24 @@
return {
"nvim-treesitter/nvim-treesitter-context",
config = function()
local c = _G.matugen_palette
or {
color0 = "#191724",
color1 = "#eb6f92",
color2 = "#31748f",
color3 = "#f6c177",
color4 = "#9ccfd8",
color5 = "#c4a7e7",
color6 = "#ebbcba",
color7 = "#908caa",
color8 = "#26233a",
color15 = "#e0def4",
}
local color = require("util.color")
vim.api.nvim_set_hl(0, "TreesitterContext", {
bg = color.blend(c.color15, c.color0, 0.8),
ctermbg = "blue",
})
end,
}

View File

@@ -0,0 +1,78 @@
return {
"zbirenbaum/copilot.lua",
cmd = "Copilot",
event = "InsertEnter",
enabled = false,
config = function()
require("copilot").setup({
panel = {
enabled = true,
auto_refresh = false,
keymap = {
jump_prev = "[[",
jump_next = "]]",
accept = "<CR>",
refresh = "gr",
open = "<M-CR>",
},
layout = {
position = "bottom", -- | top | left | right | bottom |
ratio = 0.4,
},
},
suggestion = {
enabled = true,
auto_trigger = false,
hide_during_completion = true,
debounce = 75,
trigger_on_accept = true,
keymap = {
accept = "<C-l>",
accept_word = false,
accept_line = false,
next = "<C-k>",
prev = "<C-j>",
dismiss = "<C-/>",
},
},
nes = {
enabled = false, -- requires copilot-lsp as a dependency
auto_trigger = false,
keymap = {
accept_and_goto = false,
accept = false,
dismiss = false,
},
},
})
end,
-- opts = {
-- suggestion = {
-- enabled = true,
-- auto_trigger = false, -- Don't show suggestions automatically
-- keymap = {
-- accept = "<C-y>",
-- accept_word = "<C-w>",
-- accept_line = "<C-l>",
-- next = "<C-]>", -- Request/cycle suggestions
-- prev = "<C-[>",
-- dismiss = "<C-e>",
-- },
-- },
-- panel = {
-- enabled = true,
-- },
-- },
-- keys = {
-- {
-- "<leader>ct",
-- "<cmd>Copilot toggle<cr>",
-- desc = "Copilot: Toggle auto-suggestions",
-- },
-- {
-- "<leader>cp",
-- "<cmd>Copilot panel<cr>",
-- desc = "Copilot: Open panel",
-- },
-- },
}

View File

@@ -0,0 +1,124 @@
-- Matugen-generated palette for use by other plugins
_G.matugen_palette = {
color0 = "#19120d",
color1 = "#ff7972",
color2 = "#95ff7f",
color3 = "#ffe672",
color4 = "#f2a063",
color5 = "#76380b",
color6 = "#ffb782",
color7 = "#fff6ef",
color8 = "#a59e99",
color9 = "#ffa49f",
color10 = "#b5ffa5",
color11 = "#ffefa5",
color12 = "#ffc194",
color13 = "#ffcca7",
color14 = "#ffdec6",
color15 = "#fffbf8",
}
return {
{
"RRethy/base16-nvim",
priority = 1000,
config = function()
require("base16-colorscheme").setup({
base00 = "#19120d",
base01 = "#19120d",
base02 = "#a59e99",
base03 = "#a59e99",
base04 = "#fff6ef",
base05 = "#fffbf8",
base06 = "#fffbf8",
base07 = "#fffbf8",
base08 = "#ffa49f",
base09 = "#ffa49f",
base0A = "#ffc194",
base0B = "#b5ffa5",
base0C = "#ffdec6",
base0D = "#ffc194",
base0E = "#ffcca7",
base0F = "#ffcca7",
})
vim.api.nvim_set_hl(0, "Visual", {
bg = "#a59e99",
fg = "#fffbf8",
bold = true,
})
vim.api.nvim_set_hl(0, "Statusline", {
bg = "#ffc194",
fg = "#19120d",
})
vim.api.nvim_set_hl(0, "LineNr", { fg = "#a59e99" })
vim.api.nvim_set_hl(0, "CursorLineNr", { fg = "#ffdec6", bold = true })
vim.api.nvim_set_hl(0, "Statement", {
fg = "#ffcca7",
bold = true,
})
vim.api.nvim_set_hl(0, "Keyword", { link = "Statement" })
vim.api.nvim_set_hl(0, "Repeat", { link = "Statement" })
vim.api.nvim_set_hl(0, "Conditional", { link = "Statement" })
vim.api.nvim_set_hl(0, "Function", {
fg = "#ffc194",
bold = true,
})
vim.api.nvim_set_hl(0, "Macro", {
fg = "#ffc194",
italic = true,
})
vim.api.nvim_set_hl(0, "@function.macro", { link = "Macro" })
vim.api.nvim_set_hl(0, "Type", {
fg = "#ffdec6",
bold = true,
italic = true,
})
vim.api.nvim_set_hl(0, "Structure", { link = "Type" })
vim.api.nvim_set_hl(0, "String", {
fg = "#b5ffa5",
italic = true,
})
vim.api.nvim_set_hl(0, "Operator", { fg = "#fff6ef" })
vim.api.nvim_set_hl(0, "Delimiter", { fg = "#fff6ef" })
vim.api.nvim_set_hl(0, "@punctuation.bracket", { link = "Delimiter" })
vim.api.nvim_set_hl(0, "@punctuation.delimiter", { link = "Delimiter" })
vim.api.nvim_set_hl(0, "Comment", {
fg = "#a59e99",
italic = true,
})
-- Transparent background
vim.api.nvim_set_hl(0, "Normal", { bg = "NONE" })
vim.api.nvim_set_hl(0, "NormalNC", { bg = "NONE" })
vim.api.nvim_set_hl(0, "NormalFloat", { bg = "NONE" })
vim.api.nvim_set_hl(0, "SignColumn", { bg = "NONE" })
vim.api.nvim_set_hl(0, "EndOfBuffer", { bg = "NONE" })
-- Emit event for other plugins to react to theme changes
vim.api.nvim_exec_autocmds("User", { pattern = "MatugenReload" })
local current_file_path = vim.fn.stdpath("config") .. "/lua/plugins/dankcolors.lua"
if not _G._matugen_theme_watcher then
local uv = vim.uv or vim.loop
_G._matugen_theme_watcher = uv.new_fs_event()
_G._matugen_theme_watcher:start(
current_file_path,
{},
vim.schedule_wrap(function()
local new_spec = dofile(current_file_path)
if new_spec and new_spec[1] and new_spec[1].config then
new_spec[1].config()
end
end)
)
end
end,
},
}

View File

@@ -0,0 +1,4 @@
return {
"tpope/vim-fugitive",
enabled = true,
}

View File

@@ -0,0 +1,10 @@
return {
"f-person/git-blame.nvim",
-- enabled = false,
config = function()
require("gitblame").setup({ enabled = false })
vim.keymap.set("n", "<leader>gb", ":GitBlameToggle<CR>", {
desc = "Toggle git blame",
})
end,
}

View File

@@ -0,0 +1,51 @@
return {
"lewis6991/gitsigns.nvim",
config = function(bufnr)
require("gitsigns").setup({
on_attach = function(bufnr)
local gitsigns = require("gitsigns")
local function map(mode, l, r, opts)
opts = opts or {}
opts.buffer = bufnr
vim.keymap.set(mode, l, r, opts)
end
-- Navigation
-- map('n', ']c', function()
-- if vim.wo.diff then
-- vim.cmd.normal({ ']c', bang = true })
-- else
-- gitsigns.nav_hunk('next')
-- end
-- end)
-- map('n', '[c', function()
-- if vim.wo.diff then
-- vim.cmd.normal({ '[c', bang = true })
-- else
-- gitsigns.nav_hunk('prev')
-- end
-- end)
-- -- Actions
-- map('n', '<leader>hs', gitsigns.stage_hunk)
-- map('n', '<leader>hr', gitsigns.reset_hunk)
-- map('v', '<leader>hs', function() gitsigns.stage_hunk { vim.fn.line('.'), vim.fn.line('v') } end)
-- map('v', '<leader>hr', function() gitsigns.reset_hunk { vim.fn.line('.'), vim.fn.line('v') } end)
-- map('n', '<leader>hS', gitsigns.stage_buffer)
-- map('n', '<leader>hu', gitsigns.undo_stage_hunk)
-- map('n', '<leader>hR', gitsigns.reset_buffer)
map("n", "<leader>gp", gitsigns.preview_hunk, { desc = "Preview hunk" })
-- map('n', '<leader>hb', function() gitsigns.blame_line { full = true } end)
-- map('n', '<leader>tb', gitsigns.toggle_current_line_blame)
map("n", "<leader>gD", gitsigns.diffthis, { desc = "Diff this" })
-- map('n', '<leader>hD', function() gitsigns.diffthis('~') end)
-- map('n', '<leader>td', gitsigns.toggle_deleted)
-- -- Text object
-- map({ 'o', 'x' }, 'ih', ':<C-U>Gitsigns select_hunk<CR>')
end,
})
end,
}

View File

@@ -0,0 +1,79 @@
return {
"theprimeagen/harpoon",
branch = "harpoon2",
dependencies = { "nvim-lua/plenary.nvim", "nvim-telescope/telescope.nvim" },
config = function()
local harpoon = require("harpoon")
harpoon:setup({
settings = { save_on_toggle = true },
})
vim.keymap.set("n", "<leader>a", function()
harpoon:list():add()
end)
vim.keymap.set("n", "<leader>h", function()
harpoon.ui:toggle_quick_menu(harpoon:list())
end, { desc = "Toggle harpoon quick menu" })
vim.keymap.set("n", "<leader>1", function()
harpoon:list():select(1)
end)
vim.keymap.set("n", "<leader>2", function()
harpoon:list():select(2)
end)
vim.keymap.set("n", "<leader>3", function()
harpoon:list():select(3)
end)
vim.keymap.set("n", "<leader>4", function()
harpoon:list():select(4)
end)
vim.keymap.set("n", "<leader>5", function()
harpoon:list():select(5)
end)
vim.keymap.set("n", "<leader>6", function()
harpoon:list():select(6)
end)
vim.keymap.set("n", "<leader>7", function()
harpoon:list():select(7)
end)
vim.keymap.set("n", "<leader>8", function()
harpoon:list():select(8)
end)
vim.keymap.set("n", "<leader>9", function()
harpoon:list():select(9)
end)
-- Toggle previous & next buffers stored within Harpoon list
vim.keymap.set("n", "<C-S-P>", function()
harpoon:list():prev()
end)
vim.keymap.set("n", "<C-S-N>", function()
harpoon:list():next()
end)
-- basic telescope configuration
local conf = require("telescope.config").values
local function toggle_telescope(harpoon_files)
local file_paths = {}
for _, item in ipairs(harpoon_files.items) do
table.insert(file_paths, item.value)
end
require("telescope.pickers")
.new({}, {
prompt_title = "Harpoon",
finder = require("telescope.finders").new_table({
results = file_paths,
}),
previewer = conf.file_previewer({}),
sorter = conf.generic_sorter({}),
})
:find()
end
vim.keymap.set("n", "<C-e>", function()
toggle_telescope(harpoon:list())
end, { desc = "Open harpoon window" })
end,
}

View File

@@ -0,0 +1,7 @@
return {
"lukas-reineke/indent-blankline.nvim",
enabled = true,
config = function()
require("ibl").setup()
end,
}

View File

@@ -0,0 +1,10 @@
return {
"NMAC427/guess-indent.nvim", -- Detect tabstop and shiftwidth automatically
-- Highlight todo, notes, etc in comments
{
"folke/todo-comments.nvim",
event = "VimEnter",
dependencies = { "nvim-lua/plenary.nvim" },
opts = { signs = false },
},
}

View File

@@ -0,0 +1,22 @@
return {
"HotThoughts/jjui.nvim",
cmd = {
"JJUI",
"JJUICurrentFile",
"JJUIFilter",
"JJUIFilterCurrentFile",
"JJConfig",
},
-- Setting the keybinding here helps lazy-loading
keys = {
{ "<leader>jj", "<cmd>JJUI<cr>", desc = "JJUI" },
{ "<leader>jc", "<cmd>JJUICurrentFile<cr>", desc = "JJUI (current file)" },
{ "<leader>jl", "<cmd>JJUIFilter<cr>", desc = "JJUI Log" },
{ "<leader>jf", "<cmd>JJUIFilterCurrentFile<cr>", desc = "JJUI Log (current file)" },
},
config = function()
require("jjui").setup({
-- configuration options (see below)
})
end,
}

View File

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

@@ -0,0 +1,221 @@
return {
-- Mason for installing LSP servers
{ "mason-org/mason.nvim", opts = {} },
"WhoIsSethDaniel/mason-tool-installer.nvim",
-- Useful status updates for LSP.
{ "j-hui/fidget.nvim", opts = {} },
-- Allows extra capabilities provided by blink.cmp
{
"saghen/blink.cmp",
config = function(_, opts)
require("blink.cmp").setup(opts)
-- Add blink.cmp capabilities to the default LSP client capabilities
vim.lsp.config("*", {
capabilities = require("blink.cmp").get_lsp_capabilities(),
})
end,
},
-- LSP Configuration (using native vim.lsp.config for Neovim 0.11+)
{
"neovim/nvim-lspconfig",
config = function()
-- This function gets run when an LSP attaches to a particular buffer.
vim.api.nvim_create_autocmd("LspAttach", {
group = vim.api.nvim_create_augroup("kickstart-lsp-attach", { clear = true }),
callback = function(event)
local map = function(keys, func, desc, mode)
mode = mode or "n"
vim.keymap.set(mode, keys, func, { buffer = event.buf, desc = "LSP: " .. desc })
end
-- map("gd", require("telescope.builtin").lsp_definitions, "[G]oto [D]efinition")
map("<leader>lr", ":LspRestart<CR>", "Restart LSP")
map("K", function()
vim.lsp.buf.hover({ border = "rounded" })
end, "Show documentation for symbol under cursor")
-- Rename the variable under your cursor.
map("<leader>rn", function()
vim.api.nvim_create_autocmd({ "CmdlineEnter" }, {
callback = function()
local key = vim.api.nvim_replace_termcodes("<C-f>", true, false, true)
vim.api.nvim_feedkeys(key, "c", false)
vim.api.nvim_feedkeys("0", "n", false)
return true
end,
})
vim.lsp.buf.rename()
end, "[R]e[n]ame")
-- Execute a code action
map("<leader>ca", vim.lsp.buf.code_action, "[C]ode [A]ction", { "n", "x" })
-- Find references for the word under your cursor.
map("gtref", require("telescope.builtin").lsp_references, "[G]oto [R]eferences")
-- Jump to the implementation of the word under your cursor.
-- map("gI", require("telescope.builtin").lsp_implementations, "[G]oto [I]mplementation")
-- Goto Declaration (e.g., in C this would take you to the header)
map("gD", vim.lsp.buf.declaration, "[G]oto [D]eclaration")
-- Fuzzy find all the symbols in your current document.
-- map("<leader>ds", require("telescope.builtin").lsp_document_symbols, "[D]ocument [S]ymbols")
-- Fuzzy find all the symbols in your current workspace.
-- map("gW", require("telescope.builtin").lsp_dynamic_workspace_symbols, "Open Workspace Symbols")
-- Jump to the type of the word under your cursor.
-- map("gt", require("telescope.builtin").lsp_type_definitions, "[G]oto [T]ype Definition")
map("<leader>vd", function()
vim.diagnostic.open_float()
end, "[V]iew [D]iagnostics")
map("[d", function()
vim.diagnostic.goto_prev()
end, "Prev Diagnostic")
map("]d", function()
vim.diagnostic.goto_next()
end, "Next Diagnostic")
local client = vim.lsp.get_client_by_id(event.data.client_id)
-- Highlight references of the word under cursor
if
client
and client:supports_method(vim.lsp.protocol.Methods.textDocument_documentHighlight, event.buf)
then
local highlight_augroup =
vim.api.nvim_create_augroup("kickstart-lsp-highlight", { clear = false })
vim.api.nvim_create_autocmd({ "CursorHold", "CursorHoldI" }, {
buffer = event.buf,
group = highlight_augroup,
callback = vim.lsp.buf.document_highlight,
})
vim.api.nvim_create_autocmd({ "CursorMoved", "CursorMovedI" }, {
buffer = event.buf,
group = highlight_augroup,
callback = vim.lsp.buf.clear_references,
})
vim.api.nvim_create_autocmd("LspDetach", {
group = vim.api.nvim_create_augroup("kickstart-lsp-detach", { clear = true }),
callback = function(event2)
vim.lsp.buf.clear_references()
vim.api.nvim_clear_autocmds({ group = "kickstart-lsp-highlight", buffer = event2.buf })
end,
})
end
-- Toggle inlay hints keymap
if
client and client:supports_method(vim.lsp.protocol.Methods.textDocument_inlayHint, event.buf)
then
map("<leader>th", function()
vim.lsp.inlay_hint.enable(not vim.lsp.inlay_hint.is_enabled({ bufnr = event.buf }))
end, "[T]oggle Inlay [H]ints")
end
-- Svelte-specific: notify on TS/JS file changes
-- https://github.com/sveltejs/language-tools/issues/2008#issuecomment-2351976230
if client and client.name == "svelte" then
vim.api.nvim_create_autocmd("BufWritePost", {
pattern = { "*.js", "*.ts" },
group = vim.api.nvim_create_augroup("svelte-on-did-change-ts-or-js-file", { clear = true }),
callback = function(args)
client:notify("$/onDidChangeTsOrJsFile", {
uri = args.match,
})
end,
})
end
end,
})
-- Extra keymaps
vim.keymap.set("n", "<leader>oi", function()
vim.lsp.buf.code_action({
context = {
only = { "source.organizeImports" },
diagnostics = {},
},
apply = true,
})
end, { desc = "Organize Imports" })
-- Diagnostic Config
vim.diagnostic.config({
severity_sort = true,
float = { border = "rounded", source = "if_many" },
underline = { severity = vim.diagnostic.severity.ERROR },
signs = vim.g.have_nerd_font and {
text = {
[vim.diagnostic.severity.ERROR] = "󰅚 ",
[vim.diagnostic.severity.WARN] = "󰀪 ",
[vim.diagnostic.severity.INFO] = "󰋽 ",
[vim.diagnostic.severity.HINT] = "󰌶 ",
},
} or {},
virtual_text = {
source = "if_many",
spacing = 2,
format = function(diagnostic)
local diagnostic_message = {
[vim.diagnostic.severity.ERROR] = diagnostic.message,
[vim.diagnostic.severity.WARN] = diagnostic.message,
[vim.diagnostic.severity.INFO] = diagnostic.message,
[vim.diagnostic.severity.HINT] = diagnostic.message,
}
return diagnostic_message[diagnostic.severity]
end,
},
})
-- Install tools via mason-tool-installer
require("mason-tool-installer").setup({
ensure_installed = {
"stylua",
"lua-language-server",
"pyright",
"css-lsp",
"eslint-lsp",
"vtsls",
"tailwindcss-language-server",
"biome",
},
})
-- Load custom LSP configs from nvim/lsp/*.lua to override nvim-lspconfig defaults
local lsp_path = vim.fn.stdpath("config") .. "/lsp"
for _, file in ipairs(vim.fn.readdir(lsp_path)) do
if file:match("%.lua$") then
local name = file:gsub("%.lua$", "")
local config = dofile(lsp_path .. "/" .. file)
if type(config) == "table" then
vim.lsp.config(name, config)
end
end
end
-- Enable LSP servers (configs are in nvim/lsp/*.lua)
vim.lsp.enable({
"lua_ls",
"pyright",
"cssls",
"eslint",
"gdscript",
-- "vtsls",
"tsgo",
"svelte",
"tailwindcss",
"biome",
})
end,
},
}

View File

@@ -0,0 +1,136 @@
local fallback_palette = {
color0 = "#191724",
color1 = "#eb6f92",
color2 = "#31748f",
color3 = "#f6c177",
color4 = "#9ccfd8",
color5 = "#c4a7e7",
color6 = "#ebbcba",
color7 = "#908caa",
color8 = "#26233a",
color9 = "#eb6f92",
color10 = "#31748f",
color11 = "#f6c177",
color12 = "#9ccfd8",
color13 = "#c4a7e7",
color14 = "#ebbcba",
color15 = "#e0def4",
}
local function build_theme()
local c = _G.matugen_palette or fallback_palette
local bg_base = "NONE"
local dark = "#000000"
local color = require("util.color")
return {
normal = {
a = { bg = c.color4, fg = dark, gui = "bold" },
b = { bg = color.darken(c.color4, 50), fg = c.color15 },
c = { bg = c.color0, fg = c.color15 },
},
insert = {
a = { bg = c.color2, fg = dark, gui = "bold" },
b = { bg = color.darken(c.color2, 50), fg = c.color15 },
},
visual = {
a = { bg = c.color5, fg = dark, gui = "bold" },
b = { bg = color.darken(c.color5, 50), fg = c.color15 },
},
replace = {
a = { bg = c.color3, fg = dark, gui = "bold" },
b = { bg = color.darken(c.color3, 50), fg = c.color15 },
},
command = {
a = { bg = c.color1, fg = dark, gui = "bold" },
b = { bg = color.darken(c.color1, 50), fg = c.color15 },
},
inactive = {
a = { bg = bg_base, fg = c.color7, gui = "bold" },
b = { bg = bg_base, fg = c.color7 },
},
}
end
local function setup_macro_refresh(lualine)
vim.api.nvim_create_autocmd("RecordingEnter", {
callback = function()
lualine.refresh({ place = { "statusline" } })
end,
})
vim.api.nvim_create_autocmd("RecordingLeave", {
callback = function()
local timer = vim.loop.new_timer()
timer:start(
50,
0,
vim.schedule_wrap(function()
lualine.refresh({ place = { "statusline" } })
end)
)
end,
})
end
local function macro_recording_status()
return {
"macro-recording",
fmt = function()
local register = vim.fn.reg_recording()
return register == "" and "" or "RECORDING @" .. register
end,
}
end
local function heart()
return [[♥ ]]
end
return {
"nvim-lualine/lualine.nvim",
event = "VeryLazy",
dependencies = { "nvim-tree/nvim-web-devicons" },
init = function()
vim.opt.laststatus = 0
end,
config = function()
vim.opt.laststatus = 3
local lualine = require("lualine")
setup_macro_refresh(lualine)
local function do_setup()
lualine.setup({
options = {
theme = build_theme(),
component_separators = "",
section_separators = { left = "", right = "" },
disabled_filetypes = { "alpha" },
},
sections = {
lualine_a = {
{ "mode", separator = { left = "", right = "" }, right_padding = 2 },
macro_recording_status(),
},
lualine_b = { "diff", "diagnostics" },
lualine_c = { { "filename", path = 1 } },
lualine_x = { "filetype" },
lualine_y = { "progress" },
lualine_z = {
{ "location", separator = { left = "" }, left_padding = 2 },
{ heart, separator = { right = "" } },
},
},
extensions = { "nvim-tree", "fzf" },
})
end
do_setup()
-- Re-setup lualine when matugen reloads theme
vim.api.nvim_create_autocmd("User", {
pattern = "MatugenReload",
callback = do_setup,
})
end,
}

View File

@@ -0,0 +1,5 @@
return {
"chentoast/marks.nvim",
event = "VeryLazy",
opts = {},
}

View File

@@ -0,0 +1,3 @@
return {
'andymass/vim-matchup',
}

View File

@@ -0,0 +1,6 @@
return {
"davidmh/mdx.nvim",
config = true,
enabled = false,
dependencies = { "nvim-treesitter/nvim-treesitter" },
}

View File

@@ -0,0 +1,450 @@
return {
"echasnovski/mini.nvim",
version = false,
config = function()
require("mini.ai").setup({
-- Table with textobject id as fields, textobject specification as values.
-- Also use this to disable builtin textobjects. See |MiniAi.config|.
custom_textobjects = nil,
-- Module mappings. Use `''` (empty string) to disable one.
mappings = {
-- Main textobject prefixes
around = "a",
inside = "i",
-- Next/last variants
around_next = "an",
inside_next = "in",
around_last = "al",
inside_last = "il",
-- Move cursor to corresponding edge of `a` textobject
goto_left = "g[",
goto_right = "g]",
},
-- Number of lines within which textobject is searched
n_lines = 1000,
-- How to search for object (first inside current line, then inside
-- neighborhood). One of 'cover', 'cover_or_next', 'cover_or_prev',
-- 'cover_or_nearest', 'next', 'previous', 'nearest'.
search_method = "cover_or_next",
-- Whether to disable showing non-error feedback
-- This also affects (purely informational) helper messages shown after
-- idle time if user input is required.
silent = false,
})
require("mini.surround").setup(
-- No need to copy this inside `setup()`. Will be used automatically.
{
-- Add custom surroundings to be used on top of builtin ones. For more
-- information with examples, see `:h MiniSurround.config`.
custom_surroundings = nil,
-- Duration (in ms) of highlight when calling `MiniSurround.highlight()`
highlight_duration = 500,
-- Module mappings. Use `''` (empty string) to disable one.
mappings = {
add = "sa", -- Add surrounding in Normal and Visual modes
delete = "sd", -- Delete surrounding
find = "sf", -- Find surrounding (to the right)
find_left = "sF", -- Find surrounding (to the left)
highlight = "sh", -- Highlight surrounding
replace = "sr", -- Replace surrounding
update_n_lines = "sn", -- Update `n_lines`
suffix_last = "l", -- Suffix to search with "prev" method
suffix_next = "n", -- Suffix to search with "next" method
},
-- Number of lines within which surrounding is searched
n_lines = 1000,
-- Whether to respect selection type:
-- - Place surroundings on separate lines in linewise mode.
-- - Place surroundings on each line in blockwise mode.
respect_selection_type = false,
-- How to search for surrounding (first inside current line, then inside
-- neighborhood). One of 'cover', 'cover_or_next', 'cover_or_prev',
-- 'cover_or_nearest', 'next', 'prev', 'nearest'. For more details,
-- see `:h MiniSurround.config`.
search_method = "cover",
-- Whether to disable showing non-error feedback
-- This also affects (purely informational) helper messages shown after
-- idle time if user input is required.
silent = false,
}
)
-- Create a custom command to wrap double quotes with {[]} at cursor position
vim.api.nvim_create_user_command("WrapQuotesWithBrackets", function()
-- Get cursor position (1-indexed for line, 0-indexed for column)
local cursor = vim.api.nvim_win_get_cursor(0)
local line_num = cursor[1]
local col_num = cursor[2] + 1 -- Convert to 1-indexed for string operations
-- Get the current line
local line = vim.api.nvim_get_current_line()
-- Find all quote pairs in the line
local quote_start, quote_end = nil, nil
local pos = 1
while pos <= #line do
local start_pos = line:find('"', pos)
if not start_pos then
break
end
local end_pos = line:find('"', start_pos + 1)
if not end_pos then
break
end
-- Check if cursor is within or on this quote pair
if col_num >= start_pos and col_num <= end_pos then
quote_start = start_pos
quote_end = end_pos
break
end
pos = end_pos + 1
end
-- If we found quotes surrounding the cursor, wrap them
if quote_start and quote_end then
local before = line:sub(1, quote_start - 1)
local quoted_content = line:sub(quote_start, quote_end)
local after = line:sub(quote_end + 1)
local new_line = before .. "{[" .. quoted_content .. "]}" .. after
-- Replace the line
vim.api.nvim_set_current_line(new_line)
-- Adjust cursor position (move it after the inserted characters)
local new_col = col_num + 2 -- Account for the added '{[' characters
vim.api.nvim_win_set_cursor(0, { line_num, new_col - 1 }) -- Convert back to 0-indexed
else
print("No quotes found at cursor position")
end
end, {
desc = "Wrap double quotes at cursor with {[]}",
})
-- require("mini.pairs").setup({
-- -- In which modes mappings from this `config` should be created
-- modes = { insert = true, command = false, terminal = false },
--
-- -- Global mappings. Each right hand side should be a pair information, a
-- -- table with at least these fields (see more in |MiniPairs.map|):
-- -- - <action> - one of 'open', 'close', 'closeopen'.
-- -- - <pair> - two character string for pair to be used.
-- -- By default pair is not inserted after `\`, quotes are not recognized by
-- -- `<CR>`, `'` does not insert pair after a letter.
-- -- Only parts of tables can be tweaked (others will use these defaults).
-- mappings = {
-- ["("] = { action = "open", pair = "()", neigh_pattern = "[^\\]." },
-- ["["] = { action = "open", pair = "[]", neigh_pattern = "[^\\]." },
-- ["{"] = { action = "open", pair = "{}", neigh_pattern = "[^\\]." },
-- ["<"] = { action = "open", pair = "<>", neigh_pattern = "[^\\]." },
--
-- [")"] = { action = "close", pair = "()", neigh_pattern = "[^\\]." },
-- ["]"] = { action = "close", pair = "[]", neigh_pattern = "[^\\]." },
-- ["}"] = { action = "close", pair = "{}", neigh_pattern = "[^\\]." },
-- [">"] = { action = "close", pair = "<>", neigh_pattern = "[^\\]." },
--
-- ['"'] = { action = "closeopen", pair = '""', neigh_pattern = "[^\\].", register = { cr = false } },
-- ["'"] = { action = "closeopen", pair = "''", neigh_pattern = "[^%a\\].", register = { cr = false } },
-- ["`"] = { action = "closeopen", pair = "``", neigh_pattern = "[^\\].", register = { cr = false } },
-- },
-- })
require("mini.comment").setup({
-- Options which control module behavior
options = {
-- Function to compute custom 'commentstring' (optional)
custom_commentstring = nil,
-- Whether to ignore blank lines when commenting
ignore_blank_line = false,
-- Whether to recognize as comment only lines without indent
start_of_line = false,
-- Whether to force single space inner padding for comment parts
pad_comment_parts = true,
},
-- Module mappings. Use `''` (empty string) to disable one.
mappings = {
-- Toggle comment (like `gcip` - comment inner paragraph) for both
-- Normal and Visual modes
comment = "gc",
-- Toggle comment on current line
comment_line = "gcc",
-- Toggle comment on visual selection
comment_visual = "gc",
-- Define 'comment' textobject (like `dgc` - delete whole comment block)
-- Works also in Visual mode if mapping differs from `comment_visual`
textobject = "gc",
},
-- Hook functions to be executed at certain stage of commenting
hooks = {
-- Before successful commenting. Does nothing by default.
pre = function() end,
-- After successful commenting. Does nothing by default.
post = function() end,
},
})
local miniclue = require("mini.clue")
miniclue.setup({
triggers = {
-- Leader triggers
{ mode = "n", 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" },
},
clues = {
-- Enhance this by adding descriptions for <Leader> mapping groups
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(),
},
})
-- local starter = require("mini.starter")
-- starter.setup({
-- evaluate_single = true,
-- header = "hi",
-- items = {
-- starter.sections.builtin_actions(),
-- starter.sections.telescope(),
-- starter.sections.sessions(5, true),
-- },
-- })
-- local sessions = require("mini.sessions")
-- sessions.setup({
-- autoread = true,
-- })
require("mini.move").setup({
-- Module mappings. Use `''` (empty string) to disable one.
mappings = {
-- Move visual selection in Visual mode. Defaults are Alt (Meta) + hjkl.
left = "<C-S-Left>",
right = "<C-S-Right>",
down = "<C-S-Down>",
up = "<C-S-Up>",
-- Move current line in Normal mode
line_left = "<C-S-Left>",
line_right = "<C-S-Right>",
line_down = "<C-S-Down>",
line_up = "<C-S-Up>",
},
-- Options which control moving behavior
options = {
-- Automatically reindent selection during linewise vertical move
reindent_linewise = true,
},
})
require("mini.icons").setup({
extension = {
["spec.ts"] = { glyph = "", hl = "MiniIconsAzure" },
["test.ts"] = { glyph = "", hl = "MiniIconsAzure" },
["spec.svelte.ts"] = { glyph = "", hl = "MiniIconsAzure" },
["test.svelte.ts"] = { glyph = "", hl = "MiniIconsAzure" },
["svelte.ts"] = { glyph = "", hl = "MiniIconsAzure" },
},
})
require("mini.files").setup({
-- Customization of shown content
content = {
-- Predicate for which file system entries to show
filter = nil,
-- What prefix to show to the left of file system entry
prefix = nil,
-- In which order to show file system entries
sort = nil,
},
-- Module mappings created only inside explorer.
-- Use `''` (empty string) to not create one.
mappings = {
close = "q",
go_in = "<Right>",
go_in_plus = "L",
go_out = "<Left>",
go_out_plus = "H",
mark_goto = "'",
mark_set = "m",
reset = "<BS>",
reveal_cwd = "@",
show_help = "g?",
synchronize = "=",
trim_left = "<",
trim_right = ">",
},
-- General options
options = {
-- Whether to delete permanently or move into module-specific trash
permanent_delete = true,
-- Whether to use for editing directories
use_as_default_explorer = false,
},
-- Customization of explorer windows
windows = {
-- Maximum number of windows to show side by side
max_number = math.huge,
-- Whether to show preview of file/directory under cursor
preview = false,
-- Width of focused window
width_focus = 50,
-- Width of other windows
width_nofocus = 15,
},
})
vim.api.nvim_create_autocmd("User", {
pattern = "MiniFilesActionRename",
callback = function(event)
Snacks.rename.on_rename_file(event.data.from, event.data.to)
end,
})
-- local MiniPick = require("mini.pick")
-- MiniPick.setup({
-- -- Delays (in ms; should be at least 1)
-- delay = {
-- -- Delay between forcing asynchronous behavior
-- async = 10,
--
-- -- Delay between computation start and visual feedback about it
-- busy = 50,
-- },
--
-- -- Keys for performing actions. See `:h MiniPick-actions`.
-- mappings = {
-- caret_left = "<Left>",
-- caret_right = "<Right>",
--
-- choose = "<CR>",
-- choose_in_split = "<C-s>",
-- choose_in_tabpage = "<C-t>",
-- choose_in_vsplit = "<C-v>",
-- choose_marked = "<M-CR>",
--
-- delete_char = "<BS>",
-- delete_char_right = "<Del>",
-- delete_left = "<C-u>",
-- delete_word = "<C-w>",
--
-- mark = "<C-x>",
-- mark_all = "<C-a>",
--
-- move_down = "<C-n>",
-- move_start = "<C-g>",
-- move_up = "<C-p>",
--
-- paste = "<C-r>",
--
-- refine = "<C-Space>",
-- refine_marked = "<M-Space>",
--
-- scroll_down = "<C-f>",
-- scroll_left = "<C-h>",
-- scroll_right = "<C-l>",
-- scroll_up = "<C-b>",
--
-- stop = "<Esc>",
--
-- toggle_info = "<S-Tab>",
-- toggle_preview = "<Tab>",
-- },
--
-- -- General options
-- options = {
-- -- Whether to show content from bottom to top
-- content_from_bottom = false,
--
-- -- Whether to cache matches (more speed and memory on repeated prompts)
-- use_cache = false,
-- },
--
-- -- Source definition. See `:h MiniPick-source`.
-- source = {
-- items = nil,
-- name = nil,
-- cwd = nil,
--
-- match = nil,
-- show = nil,
-- preview = nil,
--
-- choose = nil,
-- choose_marked = nil,
-- },
--
-- -- Window related options
-- window = {
-- -- Float window config (table or callable returning it)
-- config = nil,
--
-- -- String to use as caret in prompt
-- prompt_caret = "▏",
--
-- -- String to use as prefix in prompt
-- prompt_prefix = "> ",
-- },
-- })
--
-- vim.keymap.set("n", "<leader>pf", function()
-- MiniPick.builtin.files({ tool = "git" })
-- end, { desc = "Find [F]iles" })
end,
}

View File

@@ -0,0 +1,61 @@
return {
{
"milanglacier/minuet-ai.nvim",
priority = 1000,
config = function()
require("minuet").setup({
provider = "openai_compatible",
request_timeout = 2.5,
throttle = 1500, -- Increase to reduce costs and avoid rate limits
debounce = 600, -- Increase to reduce costs and avoid rate limits
provider_options = {
openai_compatible = {
api_key = "OPENROUTER_API_KEY",
end_point = "https://openrouter.ai/api/v1/chat/completions",
model = "moonshotai/kimi-k2",
name = "Openrouter",
optional = {
max_tokens = 56,
top_p = 0.9,
provider = {
-- Prioritize throughput for faster completion
sort = "throughput",
},
},
},
},
})
end,
},
{ "nvim-lua/plenary.nvim" },
-- optional, if you are using virtual-text frontend, blink is not required.
{
"Saghen/blink.cmp",
config = function()
require("blink-cmp").setup({
keymap = {
-- Manually invoke minuet completion.
["<A-y>"] = require("minuet").make_blink_map(),
},
sources = {
-- Enable minuet for autocomplete
default = { "lsp", "path", "buffer", "snippets", "minuet" },
-- For manual completion only, remove 'minuet' from default
providers = {
minuet = {
name = "minuet",
module = "minuet.blink",
async = true,
-- Should match minuet.config.request_timeout * 1000,
-- since minuet.config.request_timeout is in seconds
timeout_ms = 3000,
score_offset = 50, -- Gives minuet higher priority among suggestions
},
},
},
-- Recommended to avoid unnecessary request
completion = { trigger = { prefetch_on_insert = false } },
})
end,
},
}

View File

@@ -0,0 +1,85 @@
return {
"jake-stewart/multicursor.nvim",
branch = "1.0",
enabled = true,
config = function()
local mc = require("multicursor-nvim")
mc.setup()
-- Add cursors above/below the main cursor.
vim.keymap.set({ "n", "v" }, "<C-up>", function()
mc.addCursor("k")
end)
vim.keymap.set({ "n", "v" }, "<C-down>", function()
mc.addCursor("j")
end)
-- Add a cursor and jump to the next word under cursor.
vim.keymap.set({ "n", "v" }, "<c-n>", function()
mc.addCursor("*")
end)
-- Jump to the next word under cursor but do not add a cursor.
vim.keymap.set({ "n", "v" }, "<c-s>", function()
mc.skipCursor("*")
end)
-- Rotate the main cursor.
vim.keymap.set({ "n", "v" }, "<C-left>", mc.nextCursor)
vim.keymap.set({ "n", "v" }, "<C-right>", mc.prevCursor)
-- Delete the main cursor.
vim.keymap.set({ "n", "v" }, "<leader>x", mc.deleteCursor)
-- Add and remove cursors with control + left click.
vim.keymap.set("n", "<c-leftmouse>", mc.handleMouse)
vim.keymap.set({ "n", "v" }, "<c-q>", function()
if mc.cursorsEnabled() then
-- Stop other cursors from moving.
-- This allows you to reposition the main cursor.
mc.disableCursors()
else
mc.addCursor()
end
end)
vim.keymap.set("n", "<esc>", function()
if not mc.cursorsEnabled() then
mc.enableCursors()
elseif mc.hasCursors() then
mc.clearCursors()
else
-- Default <esc> handler.
end
end)
-- Align cursor columns.
-- vim.keymap.set("n", "<leader>a", mc.alignCursors)
-- Split visual selections by regex.
vim.keymap.set("v", "S", mc.splitCursors)
-- Append/insert for each line of visual selections.
vim.keymap.set("v", "I", mc.insertVisual)
vim.keymap.set("v", "A", mc.appendVisual)
-- match new cursors within visual selections by regex.
vim.keymap.set("v", "M", mc.matchCursors)
-- Rotate visual selection contents.
vim.keymap.set("v", "<leader>t", function()
mc.transposeCursors(1)
end)
vim.keymap.set("v", "<leader>T", function()
mc.transposeCursors(-1)
end)
-- Customize how cursors look.
vim.api.nvim_set_hl(0, "MultiCursorCursor", { link = "Cursor" })
vim.api.nvim_set_hl(0, "MultiCursorVisual", { link = "Visual" })
vim.api.nvim_set_hl(0, "MultiCursorDisabledCursor", { link = "Visual" })
vim.api.nvim_set_hl(0, "MultiCursorDisabledVisual", { link = "Visual" })
end,
}

View File

@@ -0,0 +1,14 @@
return {
"shortcuts/no-neck-pain.nvim",
opts = {
width = 140,
autocmds = {
enableOnVimEnter = true,
},
integrations = {
dashboard = {
enabled = true,
},
},
},
}

View File

@@ -0,0 +1,210 @@
return {
"stevearc/oil.nvim",
---@module 'oil'
---@type oil.SetupOpts
opts = {
-- Oil will take over directory buffers (e.g. `vim .` or `:e src/`)
-- Set to false if you want some other plugin (e.g. netrw) to open when you edit directories.
default_file_explorer = true,
-- Id is automatically added at the beginning, and name at the end
-- See :help oil-columns
columns = {
"icon",
-- "permissions",
-- "size",
-- "mtime",
},
-- Buffer-local options to use for oil buffers
buf_options = {
buflisted = false,
bufhidden = "hide",
},
-- Window-local options to use for oil buffers
win_options = {
wrap = false,
signcolumn = "no",
cursorcolumn = false,
foldcolumn = "0",
spell = false,
list = false,
conceallevel = 3,
concealcursor = "nvic",
},
-- Send deleted files to the trash instead of permanently deleting them (:help oil-trash)
delete_to_trash = false,
-- Skip the confirmation popup for simple operations (:help oil.skip_confirm_for_simple_edits)
skip_confirm_for_simple_edits = false,
-- Selecting a new/moved/renamed file or directory will prompt you to save changes first
-- (:help prompt_save_on_select_new_entry)
prompt_save_on_select_new_entry = true,
-- Oil will automatically delete hidden buffers after this delay
-- You can set the delay to false to disable cleanup entirely
-- Note that the cleanup process only starts when none of the oil buffers are currently displayed
cleanup_delay_ms = 2000,
lsp_file_methods = {
-- Enable or disable LSP file operations
enabled = true,
-- Time to wait for LSP file operations to complete before skipping
timeout_ms = 1000,
-- Set to true to autosave buffers that are updated with LSP willRenameFiles
-- Set to "unmodified" to only save unmodified buffers
autosave_changes = false,
},
-- Constrain the cursor to the editable parts of the oil buffer
-- Set to `false` to disable, or "name" to keep it on the file names
constrain_cursor = "editable",
-- Set to true to watch the filesystem for changes and reload oil
watch_for_changes = true,
-- Keymaps in oil buffer. Can be any value that `vim.keymap.set` accepts OR a table of keymap
-- options with a `callback` (e.g. { callback = function() ... end, desc = "", mode = "n" })
-- Additionally, if it is a string that matches "actions.<name>",
-- it will use the mapping at require("oil.actions").<name>
-- Set to `false` to remove a keymap
-- See :help oil-actions for a list of all available actions
keymaps = {
["g?"] = "actions.show_help",
["<CR>"] = "actions.select",
["<C-s>"] = { "actions.select", opts = { vertical = true }, desc = "Open the entry in a vertical split" },
["<C-h>"] = {
"actions.select",
opts = { horizontal = true },
desc = "Open the entry in a horizontal split",
},
["<C-t>"] = { "actions.select", opts = { tab = true }, desc = "Open the entry in new tab" },
["<C-p>"] = "actions.preview",
["<C-c>"] = "actions.close",
["<C-l>"] = "actions.refresh",
["-"] = "actions.parent",
["_"] = "actions.open_cwd",
["`"] = "actions.cd",
["~"] = { "actions.cd", opts = { scope = "tab" }, desc = ":tcd to the current oil directory", mode = "n" },
["gs"] = "actions.change_sort",
["gx"] = "actions.open_external",
["g."] = "actions.toggle_hidden",
["g\\"] = "actions.toggle_trash",
["<C-q>"] = "actions.send_to_qflist",
},
-- Set to false to disable all of the above keymaps
use_default_keymaps = true,
view_options = {
-- Show files and directories that start with "."
show_hidden = true,
-- This function defines what is considered a "hidden" file
is_hidden_file = function(name, bufnr)
local m = name:match("^%.")
return m ~= nil
end,
-- This function defines what will never be shown, even when `show_hidden` is set
is_always_hidden = function(name, bufnr)
return false
end,
-- Sort file names with numbers in a more intuitive order for humans.
-- Can be "fast", true, or false. "fast" will turn it off for large directories.
natural_order = "fast",
-- Sort file and directory names case insensitive
case_insensitive = false,
sort = {
-- sort order can be "asc" or "desc"
-- see :help oil-columns to see which columns are sortable
{ "type", "asc" },
{ "name", "asc" },
},
},
-- Extra arguments to pass to SCP when moving/copying files over SSH
extra_scp_args = {},
-- EXPERIMENTAL support for performing file operations with git
git = {
-- Return true to automatically git add/mv/rm files
add = function(path)
return false
end,
mv = function(src_path, dest_path)
return false
end,
rm = function(path)
return false
end,
},
-- Configuration for the floating window in oil.open_float
float = {
-- Padding around the floating window
padding = 2,
max_width = 0,
max_height = 0,
border = "rounded",
win_options = {
winblend = 0,
},
-- optionally override the oil buffers window title with custom function: fun(winid: integer): string
get_win_title = nil,
-- preview_split: Split direction: "auto", "left", "right", "above", "below".
preview_split = "auto",
-- This is the config that will be passed to nvim_open_win.
-- Change values here to customize the layout
override = function(conf)
return conf
end,
},
-- Configuration for the file preview window
preview_win = {
-- Whether the preview window is automatically updated when the cursor is moved
update_on_cursor_moved = true,
-- How to open the preview window "load"|"scratch"|"fast_scratch"
preview_method = "fast_scratch",
-- A function that returns true to disable preview on a file e.g. to avoid lag
disable_preview = function(filename)
return false
end,
-- Window-local options to use for preview window buffers
win_options = {},
},
-- Configuration for the floating action confirmation window
confirmation = {
-- Width dimensions can be integers or a float between 0 and 1 (e.g. 0.4 for 40%)
-- min_width and max_width can be a single value or a list of mixed integer/float types.
-- max_width = {100, 0.8} means "the lesser of 100 columns or 80% of total"
max_width = 0.9,
-- min_width = {40, 0.4} means "the greater of 40 columns or 40% of total"
min_width = { 40, 0.4 },
-- optionally define an integer/float for the exact width of the preview window
width = nil,
-- Height dimensions can be integers or a float between 0 and 1 (e.g. 0.4 for 40%)
-- min_height and max_height can be a single value or a list of mixed integer/float types.
-- max_height = {80, 0.9} means "the lesser of 80 columns or 90% of total"
max_height = 0.9,
-- min_height = {5, 0.1} means "the greater of 5 columns or 10% of total"
min_height = { 5, 0.1 },
-- optionally define an integer/float for the exact height of the preview window
height = nil,
border = "rounded",
win_options = {
winblend = 0,
},
},
-- Configuration for the floating progress window
progress = {
max_width = 0.9,
min_width = { 40, 0.4 },
width = nil,
max_height = { 10, 0.9 },
min_height = { 5, 0.1 },
height = nil,
border = "rounded",
minimized_border = "none",
win_options = {
winblend = 0,
},
},
-- Configuration for the floating SSH window
ssh = {
border = "rounded",
},
-- Configuration for the floating keymaps help window
keymaps_help = {
border = "rounded",
},
},
-- Optional dependencies
dependencies = { { "echasnovski/mini.icons", opts = {} } },
-- dependencies = { "nvim-tree/nvim-web-devicons" }, -- use if prefer nvim-web-devicons
}

View File

@@ -0,0 +1,7 @@
return {
"Ripple-TS/ripple",
config = function(plugin)
vim.opt.rtp:append(plugin.dir .. "/packages/nvim-plugin")
require("ripple").setup(plugin)
end,
}

View File

@@ -0,0 +1,540 @@
return {
"folke/snacks.nvim",
priority = 1000,
lazy = false,
opts = {
-- your configuration comes here
-- or leave it empty to use the default settings
-- refer to the configuration section below
bigfile = { enabled = true },
notifier = { enabled = true },
quickfile = { enabled = true },
statuscolumn = { enabled = true },
words = { enabled = true },
picker = {},
explorer = {},
},
keys = {
{
"<leader>.",
function()
Snacks.scratch()
end,
desc = "Toggle Scratch Buffer",
},
{
"<leader>S",
function()
Snacks.scratch.select()
end,
desc = "Select Scratch Buffer",
},
{
"<leader>n",
function()
Snacks.notifier.show_history()
end,
desc = "Notification History",
},
{
"<leader>gB",
function()
Snacks.gitbrowse()
end,
desc = "Git Browse",
},
-- {
-- "<leader>gb",
-- function()
-- Snacks.git.blame_line()
-- end,
-- desc = "Git Blame Line",
-- },
{
"<leader>gf",
function()
Snacks.lazygit.log_file()
end,
desc = "Lazygit Current File History",
},
{
"<leader>lg",
function()
Snacks.lazygit()
end,
desc = "Lazygit",
},
{
"<leader>gl",
function()
Snacks.lazygit.log()
end,
desc = "Lazygit Log (cwd)",
},
{
"<leader>dn",
function()
Snacks.notifier.hide()
end,
desc = "Dismiss All Notifications",
},
{
"<c-/>",
function()
Snacks.terminal()
end,
desc = "Toggle Terminal",
},
{
"<c-_>",
function()
Snacks.terminal()
end,
desc = "which_key_ignore",
},
{
"]]",
function()
Snacks.words.jump(vim.v.count1)
end,
desc = "Next Reference",
mode = { "n", "t" },
},
{
"[[",
function()
Snacks.words.jump(-vim.v.count1)
end,
desc = "Prev Reference",
mode = { "n", "t" },
},
{
"<leader>N",
desc = "Neovim News",
function()
Snacks.win({
file = vim.api.nvim_get_runtime_file("doc/news.txt", false)[1],
width = 0.6,
height = 0.6,
wo = {
spell = false,
wrap = false,
signcolumn = "yes",
statuscolumn = " ",
conceallevel = 3,
},
})
end,
},
-- Snacks Picker
-- Top Pickers & Explorer
{
"<leader><space>",
function()
Snacks.picker.smart()
end,
desc = "Smart Find Files",
},
{
"<leader>,",
function()
Snacks.picker.buffers()
end,
desc = "Buffers",
},
{
"<leader>/",
function()
Snacks.picker.grep()
end,
desc = "Grep",
},
{
"<leader>:",
function()
Snacks.picker.command_history()
end,
desc = "Command History",
},
{
"<leader>n",
function()
Snacks.picker.notifications()
end,
desc = "Notification History",
},
{
"<leader>e",
function()
Snacks.explorer()
end,
desc = "File Explorer",
},
-- find
{
"<leader>fb",
function()
Snacks.picker.buffers()
end,
desc = "Buffers",
},
{
"<leader>fc",
function()
Snacks.picker.files({ cwd = vim.fn.stdpath("config") })
end,
desc = "Find Config File",
},
{
"<leader>ff",
function()
Snacks.picker.files()
end,
desc = "Find Files",
},
{
"<leader>fg",
function()
Snacks.picker.git_files()
end,
desc = "Find Git Files",
},
{
"<leader>fp",
function()
Snacks.picker.projects()
end,
desc = "Projects",
},
{
"<leader>fr",
function()
Snacks.picker.recent()
end,
desc = "Recent",
},
-- git
{
"<leader>gb",
function()
Snacks.picker.git_branches()
end,
desc = "Git Branches",
},
{
"<leader>gl",
function()
Snacks.picker.git_log()
end,
desc = "Git Log",
},
{
"<leader>gL",
function()
Snacks.picker.git_log_line()
end,
desc = "Git Log Line",
},
{
"<leader>gs",
function()
Snacks.picker.git_status()
end,
desc = "Git Status",
},
{
"<leader>gS",
function()
Snacks.picker.git_stash()
end,
desc = "Git Stash",
},
{
"<leader>gd",
function()
Snacks.picker.git_diff()
end,
desc = "Git Diff (Hunks)",
},
{
"<leader>gf",
function()
Snacks.picker.git_log_file()
end,
desc = "Git Log File",
},
-- gh
{
"<leader>gi",
function()
Snacks.picker.gh_issue()
end,
desc = "GitHub Issues (open)",
},
{
"<leader>gI",
function()
Snacks.picker.gh_issue({ state = "all" })
end,
desc = "GitHub Issues (all)",
},
{
"<leader>gp",
function()
Snacks.picker.gh_pr()
end,
desc = "GitHub Pull Requests (open)",
},
{
"<leader>gP",
function()
Snacks.picker.gh_pr({ state = "all" })
end,
desc = "GitHub Pull Requests (all)",
},
-- Grep
{
"<leader>sb",
function()
Snacks.picker.lines()
end,
desc = "Buffer Lines",
},
{
"<leader>sB",
function()
Snacks.picker.grep_buffers()
end,
desc = "Grep Open Buffers",
},
{
"<leader>sg",
function()
Snacks.picker.grep()
end,
desc = "Grep",
},
{
"<leader>sw",
function()
Snacks.picker.grep_word()
end,
desc = "Visual selection or word",
mode = { "n", "x" },
},
-- search
{
'<leader>s"',
function()
Snacks.picker.registers()
end,
desc = "Registers",
},
{
"<leader>s/",
function()
Snacks.picker.search_history()
end,
desc = "Search History",
},
{
"<leader>sa",
function()
Snacks.picker.autocmds()
end,
desc = "Autocmds",
},
{
"<leader>sb",
function()
Snacks.picker.lines()
end,
desc = "Buffer Lines",
},
{
"<leader>sc",
function()
Snacks.picker.command_history()
end,
desc = "Command History",
},
{
"<leader>sC",
function()
Snacks.picker.commands()
end,
desc = "Commands",
},
{
"<leader>sd",
function()
Snacks.picker.diagnostics()
end,
desc = "Diagnostics",
},
{
"<leader>sD",
function()
Snacks.picker.diagnostics_buffer()
end,
desc = "Buffer Diagnostics",
},
{
"<leader>sh",
function()
Snacks.picker.help()
end,
desc = "Help Pages",
},
{
"<leader>sH",
function()
Snacks.picker.highlights()
end,
desc = "Highlights",
},
{
"<leader>si",
function()
Snacks.picker.icons()
end,
desc = "Icons",
},
{
"<leader>sj",
function()
Snacks.picker.jumps()
end,
desc = "Jumps",
},
{
"<leader>sk",
function()
Snacks.picker.keymaps()
end,
desc = "Keymaps",
},
{
"<leader>sl",
function()
Snacks.picker.loclist()
end,
desc = "Location List",
},
{
"<leader>sm",
function()
Snacks.picker.marks()
end,
desc = "Marks",
},
{
"<leader>sM",
function()
Snacks.picker.man()
end,
desc = "Man Pages",
},
{
"<leader>sp",
function()
Snacks.picker.lazy()
end,
desc = "Search for Plugin Spec",
},
{
"<leader>sq",
function()
Snacks.picker.qflist()
end,
desc = "Quickfix List",
},
{
"<leader>sr",
function()
Snacks.picker.resume()
end,
desc = "Resume",
},
{
"<leader>su",
function()
Snacks.picker.undo()
end,
desc = "Undo History",
},
{
"<leader>uC",
function()
Snacks.picker.colorschemes()
end,
desc = "Colorschemes",
},
-- LSP
{
"gd",
function()
Snacks.picker.lsp_definitions()
end,
desc = "Goto Definition",
},
{
"gD",
function()
Snacks.picker.lsp_declarations()
end,
desc = "Goto Declaration",
},
{
"gref",
function()
Snacks.picker.lsp_references()
end,
nowait = true,
desc = "References",
},
{
"gI",
function()
Snacks.picker.lsp_implementations()
end,
desc = "Goto Implementation",
},
{
"gy",
function()
Snacks.picker.lsp_type_definitions()
end,
desc = "Goto T[y]pe Definition",
},
{
"gai",
function()
Snacks.picker.lsp_incoming_calls()
end,
desc = "C[a]lls Incoming",
},
{
"gao",
function()
Snacks.picker.lsp_outgoing_calls()
end,
desc = "C[a]lls Outgoing",
},
{
"<leader>ss",
function()
Snacks.picker.lsp_symbols()
end,
desc = "LSP Symbols",
},
{
"<leader>sS",
function()
Snacks.picker.lsp_workspace_symbols()
end,
desc = "LSP Workspace Symbols",
},
},
}

View File

@@ -0,0 +1,3 @@
return {
"sQVe/sort.nvim",
}

View File

@@ -0,0 +1,3 @@
return {
'lambdalisue/vim-suda'
}

View File

@@ -0,0 +1,7 @@
return {
"supermaven-inc/supermaven-nvim",
enabled = false,
config = function()
require("supermaven-nvim").setup({})
end,
}

View File

@@ -0,0 +1,8 @@
return {
"nvim-svelte/nvim-svelte-check",
config = function()
require("svelte-check").setup({
command = "pnpm run check", -- Default command for pnpm
})
end,
}

View File

@@ -0,0 +1,124 @@
return { -- Fuzzy Finder (files, lsp, etc)
"nvim-telescope/telescope.nvim",
event = "VimEnter",
dependencies = {
"nvim-lua/plenary.nvim",
{ -- If encountering errors, see telescope-fzf-native README for installation instructions
"nvim-telescope/telescope-fzf-native.nvim",
-- `build` is used to run some command when the plugin is installed/updated.
-- This is only run then, not every time Neovim starts up.
build = "make",
-- `cond` is a condition used to determine whether this plugin should be
-- installed and loaded.
cond = function()
return vim.fn.executable("make") == 1
end,
},
{ "nvim-telescope/telescope-ui-select.nvim" },
-- Useful for getting pretty icons, but requires a Nerd Font.
{ "nvim-tree/nvim-web-devicons", enabled = vim.g.have_nerd_font },
},
config = function()
-- Telescope is a fuzzy finder that comes with a lot of different things that
-- it can fuzzy find! It's more than just a "file finder", it can search
-- many different aspects of Neovim, your workspace, LSP, and more!
--
-- The easiest way to use Telescope, is to start by doing something like:
-- :Telescope help_tags
--
-- After running this command, a window will open up and you're able to
-- type in the prompt window. You'll see a list of `help_tags` options and
-- a corresponding preview of the help.
--
-- Two important keymaps to use while in Telescope are:
-- - Insert mode: <c-/>
-- - Normal mode: ?
--
-- This opens a window that shows you all of the keymaps for the current
-- Telescope picker. This is really useful to discover what Telescope can
-- do as well as how to actually do it!
-- [[ Configure Telescope ]]
-- See `:help telescope` and `:help telescope.setup()`
require("telescope").setup({
-- You can put your default mappings / updates / etc. in here
-- All the info you're looking for is in `:help telescope.setup()`
--
-- defaults = {
-- mappings = {
-- i = { ['<c-enter>'] = 'to_fuzzy_refine' },
-- },
-- },
defaults = {
file_ignore_patterns = { "node_modules", ".git" },
},
pickers = {
find_files = {
hidden = true,
find_command = {
"fd",
"--type",
"f",
"--strip-cwd-prefix",
"--follow",
"--hidden",
"--exclude",
".git",
},
},
},
extensions = {
["ui-select"] = {
require("telescope.themes").get_dropdown(),
},
fzf = {
fuzzy = true,
override_generic_sorter = true,
override_file_sorter = true,
case_mode = "smart_case",
},
},
})
-- Enable Telescope extensions if they are installed
pcall(require("telescope").load_extension, "fzf")
pcall(require("telescope").load_extension, "ui-select")
-- See `:help telescope.builtin`
local builtin = require("telescope.builtin")
-- vim.keymap.set("n", "<leader>t", ":Telescope<CR>", {})
-- vim.keymap.set("n", "<leader>pf", function()
-- builtin.find_files({
-- file_ignore_patterns = { "node%_modules/.*", ".git/.*" },
-- })
-- end, { desc = "Find [F]iles" })
-- vim.keymap.set("n", "<leader>ph", builtin.help_tags, { desc = "Search [H]elp" })
-- vim.keymap.set("n", "<leader>pk", builtin.keymaps, { desc = "Search [K]eymaps" })
-- vim.keymap.set("n", "<leader>ps", builtin.builtin, { desc = "Search [S]elect Telescope" })
-- vim.keymap.set("n", "<leader>ps", function()
-- -- builtin.live_grep()
-- builtin.grep_string({ search = vim.fn.input("Grep > ") })
-- end, { desc = "[P]roject [S]earch" })
-- vim.keymap.set("n", "<leader>pw", builtin.grep_string, { desc = "[S]earch current [W]ord" })
-- vim.keymap.set("n", "<leader>pg", builtin.live_grep, { desc = "Search by [G]rep" })
-- vim.keymap.set("n", "<leader>pd", builtin.diagnostics, { desc = "Search [D]iagnostics" })
-- vim.keymap.set("n", "<leader>pr", builtin.resume, { desc = "Search [R]esume" })
-- vim.keymap.set("n", "<leader>p.", builtin.oldfiles, { desc = 'Search Recent Files ("." for repeat)' })
-- vim.keymap.set("n", "<leader><leader>", builtin.buffers, { desc = "[ ] Find existing buffers" })
-- Slightly advanced example of overriding default behavior and theme
-- vim.keymap.set("n", "<leader>/", function()
-- -- You can pass additional configuration to Telescope to change the theme, layout, etc.
-- builtin.current_buffer_fuzzy_find(require("telescope.themes").get_dropdown({
-- winblend = 10,
-- previewer = false,
-- }))
-- end, { desc = "[/] Fuzzily search in current buffer" })
--
-- vim.keymap.set("n", "<leader>ch", builtin.command_history, { desc = "[C]ommand [H]istory" })
-- vim.keymap.set("n", "<leader>cc", builtin.commands, { desc = "[C]ommands" })
end,
}

View File

@@ -0,0 +1,39 @@
return {
-- Highlight, edit, and navigate code
"nvim-treesitter/nvim-treesitter",
lazy = false,
build = ":TSUpdate",
config = function()
require("nvim-treesitter").setup({
install_dir = vim.fn.stdpath("data") .. "/site",
})
-- Install parsers (async, no-op if already installed)
require("nvim-treesitter").install({
"vimdoc",
"javascript",
"typescript",
"tsx",
"ripple",
"c",
"lua",
"rust",
"jsdoc",
"bash",
"svelte",
"astro",
"vue",
"css",
"scss",
"gdscript",
})
-- Enable treesitter highlighting and indentation
vim.api.nvim_create_autocmd("FileType", {
callback = function()
pcall(vim.treesitter.start)
vim.bo.indentexpr = "v:lua.require'nvim-treesitter'.indentexpr()"
end,
})
end,
}

View File

@@ -0,0 +1,37 @@
return {
"folke/trouble.nvim",
opts = {}, -- for default options, refer to the configuration section for custom setup.
cmd = "Trouble",
keys = {
{
"<leader>xx",
"<cmd>Trouble diagnostics toggle<cr>",
desc = "Diagnostics (Trouble)",
},
{
"<leader>xX",
"<cmd>Trouble diagnostics toggle filter.buf=0<cr>",
desc = "Buffer Diagnostics (Trouble)",
},
{
"<leader>cs",
"<cmd>Trouble symbols toggle focus=false<cr>",
desc = "Symbols (Trouble)",
},
{
"<leader>cl",
"<cmd>Trouble lsp toggle focus=false win.position=right<cr>",
desc = "LSP Definitions / references / ... (Trouble)",
},
{
"<leader>xL",
"<cmd>Trouble loclist toggle<cr>",
desc = "Location List (Trouble)",
},
{
"<leader>xq",
"<cmd>Trouble qflist toggle<cr>",
desc = "Quickfix List (Trouble)",
},
},
}

View File

@@ -0,0 +1,56 @@
return {
"pmizio/typescript-tools.nvim",
enabled = false,
dependencies = { "nvim-lua/plenary.nvim", "neovim/nvim-lspconfig" },
opts = {},
config = function()
require("typescript-tools").setup({
-- on_attach = function() ... end,
-- handlers = { ... },
-- ...
settings = {
-- spawn additional tsserver instance to calculate diagnostics on it
separate_diagnostic_server = true,
-- "change"|"insert_leave" determine when the client asks the server about diagnostic
publish_diagnostic_on = "insert_leave",
-- 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 = {},
-- string|nil - specify a custom path to `tsserver.js` file, if this is nil or file under path
-- not exists then standard path resolution strategy is applied
tsserver_path = nil,
-- specify a list of plugins to load by tsserver, e.g., for support `styled-components`
-- (see 💅 `styled-components` support section)
tsserver_plugins = {},
-- this value is passed to: https://nodejs.org/api/cli.html#--max-old-space-sizesize-in-megabytes
-- memory limit in megabytes or "auto"(basically no limit)
tsserver_max_memory = "auto",
-- described below
tsserver_format_options = {},
tsserver_file_preferences = {},
-- locale of all tsserver messages, supported locales you can find here:
-- https://github.com/microsoft/TypeScript/blob/3c221fc086be52b19801f6e8d82596d04607ede6/src/compiler/utilitiesPublic.ts#L620
tsserver_locale = "en",
-- mirror of VSCode's `typescript.suggest.completeFunctionCalls`
complete_function_calls = false,
include_completions_with_insert_text = true,
-- CodeLens
-- WARNING: Experimental feature also in VSCode, because it might hit performance of server.
-- possible values: ("off"|"all"|"implementations_only"|"references_only")
code_lens = "off",
-- by default code lenses are displayed on all referencable values and for some of you it can
-- be too much this option reduce count of them by removing member references from lenses
disable_member_code_lens = true,
-- JSXCloseTag
-- WARNING: it is disabled by default (maybe you configuration or distro already uses nvim-ts-autotag,
-- that maybe have a conflict if enable this feature. )
jsx_close_tag = {
enable = false,
filetypes = { "javascriptreact", "typescriptreact" },
},
},
})
end,
}

View File

@@ -0,0 +1,7 @@
return {
"mbbill/undotree",
config = function()
vim.keymap.set("n", "<leader>u", vim.cmd.UndotreeToggle)
end
}

View File

@@ -0,0 +1,53 @@
return {
"folke/which-key.nvim",
enabled = false,
event = "VimEnter", -- Sets the loading event to 'VimEnter'
opts = {
-- delay between pressing a key and opening which-key (milliseconds)
-- this setting is independent of vim.o.timeoutlen
delay = 0,
icons = {
-- set icon mappings to true if you have a Nerd Font
mappings = vim.g.have_nerd_font,
-- If you are using a Nerd Font: set icons.keys to an empty table which will use the
-- default which-key.nvim defined Nerd Font icons, otherwise define a string table
keys = vim.g.have_nerd_font and {} or {
Up = "<Up> ",
Down = "<Down> ",
Left = "<Left> ",
Right = "<Right> ",
C = "<C-…> ",
M = "<M-…> ",
D = "<D-…> ",
S = "<S-…> ",
CR = "<CR> ",
Esc = "<Esc> ",
ScrollWheelDown = "<ScrollWheelDown> ",
ScrollWheelUp = "<ScrollWheelUp> ",
NL = "<NL> ",
BS = "<BS> ",
Space = "<Space> ",
Tab = "<Tab> ",
F1 = "<F1>",
F2 = "<F2>",
F3 = "<F3>",
F4 = "<F4>",
F5 = "<F5>",
F6 = "<F6>",
F7 = "<F7>",
F8 = "<F8>",
F9 = "<F9>",
F10 = "<F10>",
F11 = "<F11>",
F12 = "<F12>",
},
},
-- Document existing key chains
spec = {
{ "<leader>s", group = "[S]earch" },
{ "<leader>t", group = "[T]oggle" },
{ "<leader>h", group = "Git [H]unk", mode = { "n", "v" } },
},
},
}

108
nvim/files/lua/remap.lua Normal file
View File

@@ -0,0 +1,108 @@
local map = function(keys, func, desc, mode)
mode = mode or "n"
vim.keymap.set(mode, keys, func, { desc = desc })
end
-- Project view (mini.files)
map("<leader>pv", function()
MiniFiles.open(vim.api.nvim_buf_get_name(0))
end, "Open file explorer")
-- Move lines around
map("J", ":m '>+1<CR>gv=gv", "Move line down", "v")
map("<S-Down>", ":m '>+1<CR>gv=gv", "Move line down", "v")
map("K", ":m '<-2<CR>gv=gv", "Move line up", "v")
map("<S-Up>", ":m '<-2<CR>gv=gv", "Move line up", "v")
-- Keep cursor in center throughout operations
map("J", "mzJ`z", "Join lines and keep cursor")
map("<C-d>", "<C-d>zz", "Scroll down and center")
map("<C-u>", "<C-u>zz", "Scroll up and center")
map("n", "nzzzv", "Next search result and center")
map("N", "Nzzzv", "Previous search result and center")
-- Clipboard operations
map("<leader>p", '"_dP', "Paste without updating register", "x")
map("<leader>pc", '"+p', "Paste from system clipboard")
map("<leader>y", '"+y', "Yank to system clipboard")
map("<leader>y", '"+y', "Yank to system clipboard", "v")
map("<leader>Y", '"+Y', "Yank line to system clipboard")
map("<C-v>", '<Esc>"+pa', "Paste from system clipboard", "i")
-- Delete without register
map("<leader>d", '"_d', "Delete without updating register")
map("<leader>d", '"_d', "Delete without updating register", "v")
-- Disable Q
map("Q", "<nop>", "Disable Q")
-- Formatting
map("<leader>fo", function()
vim.cmd("Format")
vim.notify("Formatted file", vim.log.levels.INFO, { title = "Formatting" })
end, "Format file")
map("<leader>fe", function()
vim.cmd("FormatEnable")
vim.notify("Enabled auto-format", vim.log.levels.INFO, { title = "Formatting" })
end, "Enable auto-format")
map("<leader>fd", function()
vim.cmd("FormatDisable")
vim.notify("Disabled auto-format", vim.log.levels.INFO, { title = "Formatting" })
end, "Disable auto-format")
-- Organize Imports
map("<leader>oi", function()
vim.lsp.buf.code_action({
context = {
only = { "source.organizeImports" },
diagnostics = vim.diagnostic.get(0),
},
apply = true,
})
end, "Organize Imports")
-- map("<leader>l", function()
-- local lint = require("lint")
-- lint.try_lint()
-- end, "Lint file")
map("<leader>esf", function()
vim.cmd("EslintFixAll")
end, "Fix ESLint issues")
-- Window management
map("<leader>ws", "<C-w>s", "Split window horizontally")
map("<leader>wv", "<C-w>v", "Split window vertically")
map("<leader>wh", "<C-w>h", "Move to left window")
map("<leader>w<Left>", "<C-w>h", "Move to left window")
map("<leader>wj", "<C-w>j", "Move to bottom window")
map("<leader>w<Down>", "<C-w>j", "Move to bottom window")
map("<leader>wk", "<C-w>k", "Move to top window")
map("<leader>w<Up>", "<C-w>k", "Move to top window")
map("<leader>wl", "<C-w>l", "Move to right window")
map("<leader>w<Right>", "<C-w>l", "Move to right window")
map("<leader>wq", "<C-w>q", "Close window")
map("<leader>wf", "<C-w>f <C-w>L", "Open file under cursor in new window")
-- Buffer operations
map("<leader>rf", ":e<CR>", "Refresh buffer")
map("<leader>sf", ":w<CR>", "Save file")
-- Terminal
map("<Esc>", [[<C-\><C-n>]], "Exit terminal insert mode", "t")
-- Close quickfix menu after selecting choice
vim.api.nvim_create_autocmd("FileType", {
pattern = { "qf" },
command = [[nnoremap <buffer> <CR> <CR>:cclose<CR>]],
})
vim.api.nvim_create_user_command("Cppath", function()
local path = vim.fn.expand("%:p")
vim.fn.setreg("+", path)
vim.notify('Copied "' .. path .. '" to the clipboard!')
end, {})
-- Kickstart keymaps
vim.keymap.set("n", "<leader>q", vim.diagnostic.setloclist, { desc = "Open diagnostic [Q]uickfix list" })

97
nvim/files/lua/set.lua Normal file
View File

@@ -0,0 +1,97 @@
vim.g.mapleader = " "
vim.g.maplocalleader = " "
vim.opt.nu = true
vim.opt.relativenumber = true
vim.opt.tabstop = 2
vim.opt.softtabstop = 2
vim.opt.shiftwidth = 2
vim.opt.expandtab = false
vim.opt.smartindent = true
vim.opt.swapfile = false
vim.opt.backup = false
vim.opt.undodir = os.getenv("HOME") .. "/.vim/undodir"
vim.opt.undofile = true
vim.opt.hlsearch = false
vim.opt.incsearch = true
vim.opt.termguicolors = true
vim.opt.scrolloff = 8
vim.opt.updatetime = 50
vim.opt.ignorecase = true
vim.opt.smartcase = true
-- vim.opt.colorcolumn = "80"
vim.opt.inccommand = "nosplit"
vim.opt.cursorline = true
vim.g.have_nerd_font = true
-- Enable mouse mode, can be useful for resizing splits for example!
vim.o.mouse = "a"
-- Don't show the mode, since it's already in the status line
vim.o.showmode = false
-- Enable break indent
vim.o.breakindent = true
-- Save undo history
vim.o.undofile = true
-- Keep signcolumn on by default
vim.o.signcolumn = "yes"
-- Decrease update time
-- vim.o.updatetime = 250
-- Decrease mapped sequence wait time
vim.o.timeoutlen = 300
-- Configure how new splits should be opened
vim.o.splitright = true
vim.o.splitbelow = true
-- Sets how neovim will display certain whitespace characters in the editor.
-- See `:help 'list'`
-- and `:help 'listchars'`
--
-- Notice listchars is set using `vim.opt` instead of `vim.o`.
-- It is very similar to `vim.o` but offers an interface for conveniently interacting with tables.
-- See `:help lua-options`
-- and `:help lua-options-guide`
vim.o.list = true
vim.opt.listchars = { tab = "» ", trail = "·", nbsp = "" }
-- Preview substitutions live, as you type!
vim.o.inccommand = "split"
-- Show which line your cursor is on
vim.o.cursorline = true
-- Minimal number of screen lines to keep above and below the cursor.
vim.o.scrolloff = 10
-- if performing an operation that would fail due to unsaved changes in the buffer (like `:q`),
-- instead raise a dialog asking if you wish to save the current file(s)
-- See `:help 'confirm'`
vim.o.confirm = true
-- vim.o.winborder = "rounded"
-- Highlight text on yank
vim.api.nvim_create_autocmd("TextYankPost", {
callback = function()
vim.highlight.on_yank({ timeout = 100 })
end,
})

View File

@@ -0,0 +1,72 @@
local M = {}
-- Convert hex color to RGB values
local function hex_to_rgb(hex)
hex = hex:gsub("#", "")
return tonumber("0x" .. hex:sub(1, 2)), tonumber("0x" .. hex:sub(3, 4)), tonumber("0x" .. hex:sub(5, 6))
end
-- Convert RGB values to hex color
local function rgb_to_hex(r, g, b)
return string.format("#%02X%02X%02X", r, g, b)
end
-- Clamp a value between min and max
local function clamp(value, min, max)
return math.min(math.max(value, min), max)
end
-- Darken a color by a percentage (0-100)
function M.darken(hex, percent)
if not hex or not percent then
return hex
end
local r, g, b = hex_to_rgb(hex)
local factor = (100 - percent) / 100
r = clamp(math.floor(r * factor), 0, 255)
g = clamp(math.floor(g * factor), 0, 255)
b = clamp(math.floor(b * factor), 0, 255)
return rgb_to_hex(r, g, b)
end
-- Lighten a color by a percentage (0-100)
function M.lighten(hex, percent)
if not hex or not percent then
return hex
end
local r, g, b = hex_to_rgb(hex)
local factor = 1 + (percent / 100)
r = clamp(math.floor(r * factor), 0, 255)
g = clamp(math.floor(g * factor), 0, 255)
b = clamp(math.floor(b * factor), 0, 255)
return rgb_to_hex(r, g, b)
end
-- Blend two colors with a given weight (0-1)
function M.blend(color1, color2, weight)
weight = weight or 0.5
local r1, g1, b1 = hex_to_rgb(color1)
local r2, g2, b2 = hex_to_rgb(color2)
local r = math.floor(r1 * (1 - weight) + r2 * weight)
local g = math.floor(g1 * (1 - weight) + g2 * weight)
local b = math.floor(b1 * (1 - weight) + b2 * weight)
return rgb_to_hex(r, g, b)
end
-- Check if a color is light or dark
function M.is_light(hex)
local r, g, b = hex_to_rgb(hex)
-- Using relative luminance formula
local luminance = (0.299 * r + 0.587 * g + 0.114 * b) / 255
return luminance > 0.5
end
return M