This commit is contained in:
Greg 2026-02-26 01:45:57 +02:00
parent c41d70bd6e
commit a552a1e8a7
37 changed files with 937 additions and 1074 deletions

View file

@ -1,5 +1,11 @@
require("options")
require("config.lazy")
require("keymaps")
require("autocmd")
require("snippets")
require("plugins")
-- TODO:
-- Treesitter update + treesitter movements
-- Aerial needs new treesitter, not always showing symbols for lua files
-- Buffers management: delete others, select in picker (keybindings for pickers)
-- Autoclose explorer on file open
-- https://github.com/tduyng/nvim/tree/main

View file

@ -1,35 +0,0 @@
{
"FixCursorHold.nvim": { "branch": "master", "commit": "1900f89dc17c603eec29960f57c00bd9ae696495" },
"LuaSnip": { "branch": "master", "commit": "5a1e39223db9a0498024a77b8441169d260c8c25" },
"aerial.nvim": { "branch": "master", "commit": "7a6a42791eb2b54a7115c7db4488981f93471770" },
"auto-session": { "branch": "main", "commit": "dcbc339a1a0e6505f755d980ad11f892b6a8d492" },
"blink.cmp": { "branch": "main", "commit": "4b18c32adef2898f95cdef6192cbd5796c1a332d" },
"conform.nvim": { "branch": "master", "commit": "c2526f1cde528a66e086ab1668e996d162c75f4f" },
"flash.nvim": { "branch": "main", "commit": "fcea7ff883235d9024dc41e638f164a450c14ca2" },
"friendly-snippets": { "branch": "main", "commit": "6cd7280adead7f586db6fccbd15d2cac7e2188b9" },
"hardtime.nvim": { "branch": "main", "commit": "b4e431934af1fe224a3a801f632c008278cb7628" },
"js-i18n.nvim": { "branch": "main", "commit": "5157a1c1a47b14aa77fa6e50626dc1add4d1a618" },
"lazy.nvim": { "branch": "main", "commit": "306a05526ada86a7b30af95c5cc81ffba93fef97" },
"lazydev.nvim": { "branch": "main", "commit": "5231c62aa83c2f8dc8e7ba957aa77098cda1257d" },
"lualine.nvim": { "branch": "master", "commit": "47f91c416daef12db467145e16bed5bbfe00add8" },
"mason-lspconfig.nvim": { "branch": "main", "commit": "21c2a84ce368e99b18f52ab348c4c02c32c02fcf" },
"mason.nvim": { "branch": "main", "commit": "44d1e90e1f66e077268191e3ee9d2ac97cc18e65" },
"mentor.nvim": { "branch": "main", "commit": "54733a923072d57e50f3acc0d850fbd0b3b95f8a" },
"minuet-ai.nvim": { "branch": "main", "commit": "3d25c24487876676d29d325c01ce108cbdbd0753" },
"neotest": { "branch": "master", "commit": "deadfb1af5ce458742671ad3a013acb9a6b41178" },
"neotest-jest": { "branch": "main", "commit": "3f0cc2cff1ee05394081805c622dc2551b54d8c4" },
"nui.nvim": { "branch": "main", "commit": "de740991c12411b663994b2860f1a4fd0937c130" },
"nvim-autopairs": { "branch": "master", "commit": "59bce2eef357189c3305e25bc6dd2d138c1683f5" },
"nvim-lspconfig": { "branch": "master", "commit": "44acfe887d4056f704ccc4f17513ed41c9e2b2e6" },
"nvim-nio": { "branch": "master", "commit": "21f5324bfac14e22ba26553caf69ec76ae8a7662" },
"nvim-surround": { "branch": "main", "commit": "1098d7b3c34adcfa7feb3289ee434529abd4afd1" },
"nvim-treesitter": { "branch": "master", "commit": "42fc28ba918343ebfd5565147a42a26580579482" },
"nvim-web-devicons": { "branch": "master", "commit": "746ffbb17975ebd6c40142362eee1b0249969c5c" },
"plenary.nvim": { "branch": "master", "commit": "b9fd5226c2f76c951fc8ed5923d85e4de065e509" },
"render-markdown.nvim": { "branch": "main", "commit": "48b4175dbca8439d30c1f52231cbe5a712c8f9d9" },
"smear-cursor.nvim": { "branch": "main", "commit": "c85bdbb25db096fbcf616bc4e1357bd61fe2c199" },
"snacks.nvim": { "branch": "main", "commit": "da230e3ca8146da4b73752daaf0a1d07d343c12d" },
"tokyonight.nvim": { "branch": "main", "commit": "5da1b76e64daf4c5d410f06bcb6b9cb640da7dfd" },
"typescript-tools.nvim": { "branch": "master", "commit": "c2f5910074103705661e9651aa841e0d7eea9932" },
"which-key.nvim": { "branch": "main", "commit": "3aab2147e74890957785941f0c1ad87d0a44c15a" }
}

View file

@ -46,10 +46,25 @@ vim.api.nvim_create_autocmd("BufReadPost", {
end,
})
local group = vim.api.nvim_create_augroup("AutoRestartOnConfigChange", { clear = true })
local notify_file = vim.fn.stdpath("cache") .. "/.restart_notify"
vim.api.nvim_create_autocmd("VimEnter", {
desc = "Clear jump list when vim starts",
group = vim.api.nvim_create_augroup("clear-jumps", { clear = true }),
group = group,
callback = function()
vim.cmd.clearjumps()
if vim.fn.filereadable(notify_file) == 1 then
vim.notify("Neovim restarted successfully!", vim.log.levels.INFO)
os.remove(notify_file)
end
end,
})
vim.api.nvim_create_autocmd("BufWritePost", {
group = group,
pattern = vim.fn.stdpath("config") .. "/**",
callback = function()
vim.fn.writefile({}, notify_file)
vim.cmd("AutoSession save")
vim.cmd("restart")
end,
})

View file

@ -1,23 +0,0 @@
-- [[ Install `lazy.nvim` plugin manager ]]
-- See `:help lazy.nvim.txt` or https://github.com/folke/lazy.nvim for more info
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
if not (vim.uv or vim.loop).fs_stat(lazypath) then
local lazyrepo = "https://github.com/folke/lazy.nvim.git"
local out = vim.fn.system({
"git",
"clone",
"--filter=blob:none",
"--branch=stable",
lazyrepo,
lazypath,
})
if vim.v.shell_error ~= 0 then
error("Error cloning lazy.nvim:\n" .. out)
end
end
vim.opt.rtp:prepend(lazypath)
require("lazy").setup({ import = "plugins" }, { install = { colorscheme = { "tokyonight-storm" } } })

View file

@ -18,10 +18,10 @@ vim.keymap.set("v", "p", '"_dP', { desc = "do not overwrite 0 register when past
vim.keymap.set("t", "<Esc><Esc>", "<C-\\><C-n>", { desc = "Exit terminal mode" })
-- TIP: Disable arrow keys in normal mode
vim.keymap.set("n", "<left>", '<cmd>echo "Use h to move!!"<CR>')
vim.keymap.set("n", "<right>", '<cmd>echo "Use l to move!!"<CR>')
vim.keymap.set("n", "<up>", '<cmd>echo "Use k to move!!"<CR>')
vim.keymap.set("n", "<down>", '<cmd>echo "Use j to move!!"<CR>')
vim.keymap.set("n", "<left>", function() vim.notify("Use h to move!!") end)
vim.keymap.set("n", "<right>", function() vim.notify("Use l to move!!") end)
vim.keymap.set("n", "<up>", function() vim.notify("Use k to move!!") end)
vim.keymap.set("n", "<down>", function() vim.notify("Use j to move!!") end)
vim.keymap.set("n", "<X1Mouse>", "<C-O>", { silent = true, desc = "go back with mouse" })
vim.keymap.set("n", "<X2Mouse>", "<C-I>", { silent = true, desc = "go forward with mouse" })

View file

@ -86,6 +86,8 @@ vim.opt.cmdheight = 0
-- do not unload closed buffer from jumplist
vim.opt.jumpoptions = ""
vim.diagnostic.config({ virtual_text = true, underline = false })
vim.diagnostic.config({ virtual_text = true, underline = true })
vim.opt.sessionoptions = "blank,buffers,curdir,folds,help,tabpages,winsize,winpos,terminal,localoptions"
vim.cmd.packadd("cfilter")

View file

@ -1,10 +1,13 @@
return {
"stevearc/aerial.nvim",
opts = {
vim.pack.add({ "https://github.com/stevearc/aerial.nvim" })
local Aerial = require("aerial")
Aerial.setup({
highlight_on_hover = true,
highlight_on_jump = 300,
autojump = true,
post_jump_cmd = "normal! zzl",
backends = { lua = { "lsp" } },
filter_kind = {
"Array",
"Boolean",
@ -33,23 +36,12 @@ return {
"TypeParameter",
"Variable",
},
},
-- Optional dependencies
dependencies = {
"nvim-treesitter/nvim-treesitter",
"nvim-tree/nvim-web-devicons",
},
keys = {
{
"<leader>ss",
function()
require("aerial").snacks_picker({
layout = {
cycle = true,
},
})
end,
desc = "Symbols",
},
},
}
vim.keymap.set("n", "<leader>ss", function()
Aerial.snacks_picker({ attach_mode = "window" })
end, { desc = "Symbols" })
vim.keymap.set("n", "<leader>sw", function()
Aerial.snacks_picker({ attach_mode = "global" })
end, { desc = "Workspace Symbols" })

View file

@ -1,6 +1,8 @@
return {
"windwp/nvim-autopairs",
event = "InsertEnter",
config = true,
}
vim.pack.add({ "https://github.com/windwp/nvim-autopairs" })
local Autopairs = require("nvim-autopairs")
Autopairs.setup()

View file

@ -1,19 +1,18 @@
return {
"saghen/blink.cmp",
dependencies = {
{ "L3MON4D3/LuaSnip", version = "v2.*" },
},
version = "1.*",
config = function()
require("blink.cmp").setup({
vim.pack.add({ "https://github.com/saghen/blink.cmp" })
local Blink = require("blink.cmp")
Blink.setup({
fuzzy = {
implementation = "prefer_rust",
prebuilt_binaries = { force_version = "1.*" },
frecency = {
enabled = true,
unsafe_no_lock = false,
},
use_proximity = true,
sorts = {
-- "exact",
"exact",
"score",
"sort_text",
"label",
@ -22,7 +21,6 @@ return {
keymap = {
preset = "enter",
["<C-space>"] = { "hide", "show", "fallback" },
["<A-y>"] = require("minuet").make_blink_map(),
},
completion = {
trigger = {
@ -35,7 +33,7 @@ return {
-- Controls whether the documentation window will automatically show when selecting a completion item
documentation = {
auto_show = true,
auto_show_delay_ms = 500,
auto_show_delay_ms = 0,
window = {
border = "rounded",
scrollbar = false,
@ -58,18 +56,7 @@ return {
-- make lazydev completions top priority (see `:h blink.cmp`)
score_offset = 100,
},
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
},
},
},
signature = { enabled = true },
})
end,
}

View file

@ -1,43 +1,22 @@
-- Autoformat
return {
"stevearc/conform.nvim",
event = { "BufWritePre" },
cmd = { "ConformInfo" },
keys = {
{
"<leader>f",
function()
require("conform").format({ async = true, lsp_format = "fallback" })
end,
mode = "",
desc = "[F]ormat buffer",
},
},
opts = {
vim.pack.add({ "https://github.com/stevearc/conform.nvim" })
local Conform = require("conform")
Conform.setup({
notify_on_error = false,
format_on_save = function(bufnr)
-- Disable "format_on_save lsp_fallback" for languages that don't
-- have a well standardized coding style. You can add additional
-- languages here or re-enable it for the disabled ones.
local disable_filetypes = { c = true, cpp = true }
local lsp_format_opt
if disable_filetypes[vim.bo[bufnr].filetype] then
lsp_format_opt = "never"
end
return {
format_on_save = {
-- These options will be passed to conform.format()
timeout_ms = 500,
lsp_format = lsp_format_opt,
}
end,
lsp_format = "fallback",
},
formatters_by_ft = {
lua = { "stylua" },
javascript = { "biome", "biome-organize-imports" },
javascriptreact = { "biome", "biome-organize-imports" },
typescript = { "biome", "biome-organize-imports" },
typescriptreact = { "biome", "biome-organize-imports" },
javascript = { "biome" },
javascriptreact = { "biome" },
typescript = { "biome" },
typescriptreact = { "biome" },
-- You can use 'stop_after_first' to run the first available formatter from the list
-- javascript = { "prettierd", "prettier", stop_after_first = true },
},
},
}
})

View file

@ -0,0 +1,3 @@
vim.pack.add({ "https://github.com/sphamba/smear-cursor.nvim" })
require("smear_cursor").setup()

View file

@ -1,12 +1,12 @@
return {
"folke/flash.nvim",
event = "VeryLazy",
opts = {
vim.pack.add({ "https://github.com/folke/flash.nvim" })
local Flash = require("flash")
Flash.setup({
jump = {
autojump = true,
},
label = {
-- before = true,
after = true,
min_pattern_length = 1,
style = "overlay",
@ -14,31 +14,8 @@ return {
search = {
mode = "search",
},
},
keys = {
{
"s",
mode = { "n", "x", "o" },
function()
require("flash").jump()
end,
desc = "Flash",
},
-- {
-- "S",
-- mode = { "n", "x", "o" },
-- function()
-- require("flash").treesitter()
-- end,
-- desc = "Flash Treesitter",
-- },
{
"R",
mode = { "o", "x" },
function()
require("flash").treesitter_search()
end,
desc = "Treesitter Search",
},
},
}
})
vim.keymap.set({ "n", "x", "o" }, "s", function() require("flash").jump() end, { desc = "Flash" })
-- TODO: use treesitter objects for vim motions
-- vim.keymap.set({ "o", "x" }, "R", function() require("flash").treesitter_search() end, { desc = "Treesitter Search" })

View file

@ -1,14 +0,0 @@
return {
"m4xshen/hardtime.nvim",
lazy = false,
dependencies = { "MunifTanjim/nui.nvim" },
opts = {
disable_mouse = false,
disabled_keys = {
["<Up>"] = false,
["<Down>"] = false,
["<Left>"] = false,
["<Right>"] = false,
},
},
}

View file

@ -1,14 +1,26 @@
return {
"nabekou29/js-i18n.nvim",
dependencies = {
"neovim/nvim-lspconfig",
"nvim-treesitter/nvim-treesitter",
"nvim-lua/plenary.nvim",
},
event = { "BufReadPre", "BufNewFile" },
opts = {
vim.pack.add({
{ src = "https://github.com/nabekou29/js-i18n.nvim", version = "v0.5.4" },
"https://github.com/nvim-lua/plenary.nvim",
})
local I18n = require("js-i18n")
vim.opt.conceallevel = 2
I18n.setup({
primary_language = { "en" }, -- The default language to display (initial setting for displaying virtual text, etc.)
translation_source = { "**/{messages}/*.json" }, -- Pattern for translation resources
respect_gitignore = true, -- Whether to respect .gitignore when retrieving translation resources and implementation files. Setting to false may improve performance.
-- detect_language = ..., -- Function to detect the language. By default, a function that detects the language heuristically from the file name is used.
key_separator = ".", -- Key separator
virt_text = {
enabled = false, -- Enable virtual text display
enabled = true, -- Enable virtual text display
conceal_key = true, -- Hide keys and display only translations
max_length = 20, -- Maximum length of virtual text. 0 means unlimited.
max_width = 0, -- Maximum width of virtual text. 0 means unlimited. (`max_length` takes precedence.)
},
diagnostic = {
enabled = true, -- Enable the display of diagnostic information
severity = vim.diagnostic.severity.WARN, -- Severity level of diagnostic information
},
}
})

View file

@ -0,0 +1,18 @@
require("plugins.nord")
require("plugins.mason")
require("plugins.lspconfig")
require("plugins.lazydev")
require("plugins.luasnip")
require("plugins.surround")
require("plugins.conform")
require("plugins.flash")
require("plugins.autopairs")
require("plugins.treesitter")
require("plugins.lualine")
require("plugins.whichkey")
require("plugins.cursor")
require("plugins.snacks")
require("plugins.aerial")
require("plugins.i18n")
require("plugins.blink")
require("plugins.session")

View file

@ -0,0 +1,3 @@
vim.pack.add({ "https://github.com/rebelot/kanagawa.nvim" })
vim.cmd("colorscheme kanagawa-dragon")

View file

@ -1,15 +1,10 @@
-- lazydev.nvim is a plugin that properly configures LuaLS for editing your Neovim config by
-- lazily updating your workspace libraries.
return {
'folke/lazydev.nvim',
ft = 'lua',
opts = {
vim.pack.add({ "https://github.com/folke/lazydev.nvim" })
local Lazydev = require("lazydev")
Lazydev.setup({
library = {
-- See the configuration section for more details
-- Load luvit types when the `vim.uv` word is found
vim.env.VIMRUNTIME,
{ path = "${3rd}/luv/library", words = { "vim%.uv" } },
'~/.local/share/nvim/lazy/',
{ path = "snacks.nvim", words = { "Snacks", "snacks" } },
},
}
}
})

View file

@ -0,0 +1,35 @@
vim.pack.add({ "https://github.com/neovim/nvim-lspconfig" })
vim.lsp.config("lua_ls", {
settings = {
Lua = {
workspace = {
checkThirdParty = false,
library = {
vim.api.nvim_get_runtime_file("", true),
"${3rd}/luv/library",
},
},
runtime = {
version = "LuaJIT",
},
format = { enable = false },
telemetry = { enable = false },
-- NOTE: toggle below to ignore Lua_LS's noisy `missing-fields` warnings
diagnostics = { disable = { "missing-fields" }, globals = { "vim", "require" } },
hint = { enable = true },
},
},
})
vim.lsp.enable({
"stylua",
"biome",
"tailwindcss",
"html",
"cssls",
"emmet_language_server",
"lua_ls",
"tsgo",
"codebook",
})

View file

@ -1,7 +1,8 @@
return {
"nvim-lualine/lualine.nvim",
dependencies = { "nvim-tree/nvim-web-devicons" },
opts = {
vim.pack.add({ "https://github.com/nvim-lualine/lualine.nvim", "https://github.com/nvim-lualine/lualine.nvim" })
local Lualine = require("lualine")
Lualine.setup({
options = {
icons_enabled = true,
theme = "auto",
@ -41,5 +42,4 @@ return {
winbar = {},
inactive_winbar = {},
extensions = {},
},
}
})

View file

@ -1,57 +1,12 @@
return {
"L3MON4D3/LuaSnip",
-- follow latest release.
version = "v2.*", -- Replace <CurrentMajor> by the latest released major (first number of latest release)
-- install jsregexp (optional!).
build = "make install_jsregexp",
dependencies = {
"rafamadriz/friendly-snippets",
},
config = function()
require("luasnip").setup({
update_events = "TextChanged,TextChangedI",
vim.pack.add({
{ src = "https://github.com/L3MON4D3/LuaSnip", version = "v2.4.1" },
"https://github.com/rafamadriz/friendly-snippets",
})
require("luasnip.loaders.from_vscode").lazy_load()
local Luasnip = require("luasnip")
Luasnip.setup({ update_events = "TextChanged,TextChangedI" })
require("luasnip.loaders.from_vscode").lazy_load()
require("luasnip").filetype_extend("typescript", { "javascript" })
require("luasnip").filetype_extend("typescriptreact", { "javascript" })
end,
-- keys = {
-- {
-- "<leader>rs",
-- ":source ~/.config/nvim/lua/snippets.lua<CR>",
-- desc = "[R]eload [s]nippets",
-- },
-- {
-- "<Tab>",
-- function()
-- if require("luasnip").locally_jumpable(1) then
-- require("luasnip").jump(1)
-- end
-- end,
-- mode = { "i", "s" },
-- desc = "next snippet placeholder",
-- },
-- {
-- "<S-Tab>",
-- function()
-- if require("luasnip").locally_jumpable(-1) then
-- require("luasnip").jump(-1)
-- end
-- end,
-- mode = { "i", "s" },
-- desc = "prev snippet placeholder",
-- },
-- {
-- "<C-e>",
-- function()
-- if require("luasnip").choice_active() then
-- require("luasnip").change_choice(1)
-- end
-- end,
-- mode = { "i", "s" },
-- desc = "prev snippet placeholder",
-- },
-- },
}

View file

@ -1,4 +0,0 @@
return {
"MeanderingProgrammer/render-markdown.nvim",
ft = { "markdown", "codecompanion" },
}

View file

@ -1,112 +1,22 @@
-- Automatically install LSPs and related tools to stdpath for neovim
return {
"williamboman/mason.nvim",
dependencies = {
"neovim/nvim-lspconfig",
"williamboman/mason-lspconfig.nvim",
},
config = function()
local servers = {
harper_ls = {
settings = {
["harper-ls"] = {
userDictPath = vim.fn.stdpath("config") .. "/spell/en.utf-8.add",
},
},
},
marksman = {},
-- vtsls = {
-- settings = {
-- complete_function_calls = true,
-- vtsls = {
-- enableMoveToFileCodeAction = true,
-- autoUseWorkspaceTsdk = true,
-- experimental = {
-- completion = {
-- enableServerSideFuzzyMatch = true,
-- },
-- },
-- },
-- javascript = {
-- updateImportsOnFileMove = { enabled = "always" },
-- suggest = {
-- completeFunctionCalls = true,
-- },
-- inlayHints = {
-- enumMemberValues = { enabled = true },
-- functionLikeReturnTypes = { enabled = true },
-- parameterNames = { enabled = "literals" },
-- parameterTypes = { enabled = true },
-- propertyDeclarationTypes = { enabled = true },
-- variableTypes = { enabled = true },
-- },
-- },
-- typescript = {
-- updateImportsOnFileMove = { enabled = "always" },
-- suggest = {
-- completeFunctionCalls = true,
-- },
-- inlayHints = {
-- enumMemberValues = { enabled = true },
-- functionLikeReturnTypes = { enabled = true },
-- parameterNames = { enabled = "literals" },
-- parameterTypes = { enabled = true },
-- propertyDeclarationTypes = { enabled = true },
-- variableTypes = { enabled = true },
-- },
-- },
-- },
-- },
lua_ls = {
settings = {
Lua = {
telemetry = { enable = false },
-- NOTE: toggle below to ignore Lua_LS's noisy `missing-fields` warnings
diagnostics = { disable = { "missing-fields" } },
hint = { enable = true },
},
},
},
tailwindcss = {},
html = {},
cssls = {},
emmet_language_server = {},
vim.pack.add({ "https://github.com/mason-org/mason.nvim" })
local Mason = require("mason")
Mason.setup()
local lsps = {
"stylua",
"biome",
"tailwindcss-language-server",
"html-lsp",
"css-lsp",
"emmet-language-server",
"lua-language-server",
"codebook",
}
-- Special formatted fields cannot be set above
-- servers.vtsls.settings["js/ts"] = { implicitProjectConfig = { checkJs = true } }
require("mason").setup()
require("mason-lspconfig").setup({
ensure_installed = vim.tbl_keys(servers or {}),
automatic_installation = false,
handlers = {
function(server_name)
local server = servers[server_name] or {}
-- This handles overriding only values explicitly passed
-- by the server configuration above. Useful when disabling
-- certain features of an LSP (for example, turning off formatting for ts_ls)
server.capabilities = vim.tbl_deep_extend("force", {}, server.capabilities or {})
require("lspconfig")[server_name].setup(server)
end,
},
})
-- TODO: move to native lsp configs when
-- lspconfig plugin will be merged into core
-- for server, settings in pairs(servers) do
-- vim.lsp.config(server, settings)
-- vim.lsp.enable(server)
-- end
-- Linters
local linters = { "stylua", "biome" }
for _, linter in ipairs(linters) do
if not require("mason-registry").is_installed(linter) then
vim.cmd("MasonInstall " .. linter)
for _, lsp in ipairs(lsps) do
if not require("mason-registry").is_installed(lsp) then
vim.cmd("MasonInstall " .. lsp)
end
end
end,
}

View file

@ -1,9 +0,0 @@
return {
"cksidharthan/mentor.nvim",
opts = {
tips = {
"You can use shift+a to jump to end of line in insert mode.",
"Shift+p to paste in visual mode multiple times",
},
},
}

View file

@ -1,58 +0,0 @@
return {
{
"milanglacier/minuet-ai.nvim",
config = function()
require("minuet").setup({
provider = "gemini",
provider_options = {
claude = {
max_tokens = 512,
model = "claude-haiku-4-5",
},
codestral = {
optional = {
max_tokens = 256,
stop = { "\n\n" },
},
},
gemini = {
model = "gemini-2.0-flash",
optional = {
generationConfig = {
maxOutputTokens = 256,
-- When using `gemini-2.5-flash`, it is recommended to entirely
-- disable thinking for faster completion retrieval.
thinkingConfig = {
thinkingBudget = 0,
},
},
safetySettings = {
{
-- HARM_CATEGORY_HATE_SPEECH,
-- HARM_CATEGORY_HARASSMENT
-- HARM_CATEGORY_SEXUALLY_EXPLICIT
category = "HARM_CATEGORY_DANGEROUS_CONTENT",
-- BLOCK_NONE
threshold = "BLOCK_ONLY_HIGH",
},
},
},
},
},
virtualtext = {
auto_trigger_ft = { "lua", "typescript", "typescriptreact", "javascript" },
keymap = {
accept = "<A-CR>",
accept_line = "<A-S>CR",
accept_n_lines = "<A-z>",
prev = "<A-j>",
next = "<A-k>",
dismiss = "<A-e>",
},
show_on_completion_menu = true,
},
})
end,
},
{ "nvim-lua/plenary.nvim" },
}

View file

@ -1,58 +0,0 @@
return {
"nvim-neotest/neotest",
dependencies = {
"nvim-neotest/nvim-nio",
"nvim-lua/plenary.nvim",
"antoinemadec/FixCursorHold.nvim",
"nvim-treesitter/nvim-treesitter",
"nvim-neotest/neotest-jest",
},
keys = {
{
"<leader>tt",
function()
require("neotest").run.run()
end,
mode = "",
desc = "[T]est run under cursor",
},
{
"<leader>ts",
function()
require("neotest").summary.toggle()
end,
mode = "",
desc = "[T]est [s]tatus",
},
{
"<leader>tf",
function()
require("neotest").run.run(vim.fn.expand("%"))
end,
mode = "",
desc = "[T]est [f]ile",
},
{
"<leader>tw",
function()
require("neotest").watch.watch()
end,
mode = "",
desc = "[T]est [w]atch under cursor",
},
},
config = function()
require("neotest").setup({
discovery = {
enabled = false,
},
adapters = {
require("neotest-jest")({
cwd = function(path)
return vim.fn.getcwd()
end,
}),
},
})
end,
}

View file

@ -0,0 +1,5 @@
vim.pack.add({ "https://github.com/gbprod/nord.nvim" })
require("nord").setup({})
vim.cmd.colorscheme("nord")

View file

@ -1,12 +1,7 @@
return {
"rmagatti/auto-session",
lazy = false,
vim.pack.add({ "https://github.com/rmagatti/auto-session" })
---enables autocomplete for opts
---@module "auto-session"
---@type AutoSession.Config
opts = {
require("auto-session").setup({
suppressed_dirs = { "~/", "~/Projects", "~/Downloads", "/" },
-- log_level = 'debug',
},
}
auto_restore = true,
auto_save = true,
})

View file

@ -1,4 +0,0 @@
return {
"sphamba/smear-cursor.nvim",
opts = {},
}

View file

@ -1,12 +1,41 @@
return {
"folke/snacks.nvim",
tag = "v2.23.0",
priority = 1000,
lazy = false,
---@type snacks.Config
opts = {
vim.pack.add({ "https://github.com/folke/snacks.nvim" })
local Snacks = require("snacks")
local exclude = {
"**/.git/*",
"**/.next/*",
"**/.cursor/*",
"**/node_modules/*",
"**/.yarn/cache/*",
"**/.yarn/install*",
"**/.yarn/releases/*",
"**/.pnpm-store/*",
"**/.idea/*",
"**/.DS_Store",
"build/*",
"coverage/*",
"dist/*",
"hodor-types/*",
"**/target/*",
"**/.node-gyp/**",
"**/claude/debug",
"**/claude/file-history",
"**/claude/plans",
"**/claude/plugins",
"**/claude/projects",
"**/claude/session-env",
"**/claude/shell-snapshots",
"**/claude/statsig",
"**/claude/telemetry",
"**/claude/todos",
"**/claude/history.jsonl",
}
local files = { ignored = true, hidden = true, exclude = exclude }
Snacks.setup({
bigfile = { enabled = true },
explorer = { enabled = true, replace_netrw = true },
indent = { enabled = true },
input = { enabled = true },
notifier = {
@ -18,6 +47,24 @@ return {
image = { enabled = false },
picker = {
layout = { fullscreen = true },
sources = {
select = { layout = { fullscreen = false } },
files = vim.tbl_deep_extend("force", { layout = { preset = "select", fullscreen = false } }, files),
grep = files,
lsp_symbols = files,
explorer = {
ignored = true,
hidden = true,
exclude = exclude,
replace_netrw = true,
supports_live = true,
auto_close = true,
follow_file = true,
jump = { close = true },
focus = "list",
layout = { preset = "sidebar", fullscreen = false },
},
},
matcher = {
fuzzy = true, -- use fuzzy matching
smartcase = true, -- use smartcase
@ -39,20 +86,21 @@ return {
styles = {
notification = {},
},
},
keys = {
})
local keys = {
-- Top Pickers & Explorer
{
"<leader><space>",
function()
Snacks.picker.buffers({ matcher = { frecency = true } })
Snacks.picker.buffers()
end,
desc = "Buffers",
},
{
"<leader>e",
function()
Snacks.explorer({ layout = { fullscreen = false } })
Snacks.explorer()
end,
desc = "File Explorer",
},
@ -68,15 +116,12 @@ return {
{
"<leader>sf",
function()
Snacks.picker.files({
matcher = { frecency = true },
layout = { preset = "select" },
})
Snacks.picker.files()
end,
desc = "Find Files",
},
{
"<leader>/",
"/",
function()
Snacks.picker.lines()
end,
@ -114,7 +159,19 @@ return {
"<leader>sd",
function()
Snacks.picker.diagnostics_buffer({
matcher = { smartcase = true },
layout = {
layout = {
backdrop = false,
box = "vertical",
border = true,
title = "{title} {live} {flags}",
title_pos = "center",
{ win = "input", height = 1, border = "bottom" },
{ win = "list", border = "none" },
{ win = "preview", title = "{preview}", height = 0.7, border = "top" },
},
},
matcher = { fuzzy = false },
})
end,
desc = "Buffer Diagnostics",
@ -226,17 +283,10 @@ return {
end,
desc = "Goto T[y]pe Definition",
},
{
"<leader>sw",
function()
Snacks.picker.lsp_workspace_symbols()
end,
desc = "LSP Workspace Symbols",
},
{
"<leader>ca",
function()
vim.lsp.buf.code_action()
vim.lsp.buf.code_action({ apply = true })
end,
desc = "Code actions",
},
@ -338,10 +388,28 @@ return {
})
end,
},
},
init = function()
}
for _, map in ipairs(keys) do
local opts = { desc = map.desc }
if map.silent ~= nil then
opts.silent = map.silent
end
if map.noremap ~= nil then
opts.noremap = map.noremap
else
opts.noremap = true
end
if map.expr ~= nil then
opts.expr = map.expr
end
local mode = map.mode or "n"
vim.keymap.set(mode, map[1], map[2], opts)
end
-- TODO: toggles are not registered
vim.api.nvim_create_autocmd("User", {
pattern = "VeryLazy",
callback = function()
-- Setup some globals for debugging (lazy-loaded)
_G.dd = function(...)
@ -362,13 +430,9 @@ return {
.option("conceallevel", { off = 0, on = vim.o.conceallevel > 0 and vim.o.conceallevel or 2 })
:map("<leader>uc")
Snacks.toggle.treesitter():map("<leader>uT")
Snacks.toggle
.option("background", { off = "light", on = "dark", name = "Dark Background" })
:map("<leader>ub")
Snacks.toggle.option("background", { off = "light", on = "dark", name = "Dark Background" }):map("<leader>ub")
Snacks.toggle.inlay_hints():map("<leader>uh")
Snacks.toggle.indent():map("<leader>ug")
Snacks.toggle.dim():map("<leader>uD")
end,
})
end,
}

View file

@ -1,8 +1,3 @@
return {
"kylechui/nvim-surround",
version = "*", -- Use for stability; omit to use `main` branch for the latest features
event = "VeryLazy",
config = function()
vim.pack.add({ "https://github.com/kylechui/nvim-surround" })
require("nvim-surround").setup({})
end,
}

View file

@ -1,13 +1,3 @@
return {
"folke/tokyonight.nvim",
priority = 1000, -- Make sure to load this before all the other start plugins.
init = function()
-- Load the colorscheme here.
-- Like many other themes, this one has different styles, and you could load
-- any other, such as 'tokyonight-storm', 'tokyonight-moon', or 'tokyonight-day'.
vim.cmd.colorscheme("tokyonight-night")
vim.pack.add({ "https://github.com/folke/tokyonight.nvim" })
-- You can configure highlights by doing something like:
-- vim.cmd.hi("Comment gui=none")
end,
}
-- vim.cmd.colorscheme("tokyonight-night")

View file

@ -1,27 +1,51 @@
-- Highlight, edit, and navigate code
return {
"nvim-treesitter/nvim-treesitter",
build = ":TSUpdate",
config = function()
vim.pack.add({ { src = "https://github.com/nvim-treesitter/nvim-treesitter", version = "master" } })
local configs = require("nvim-treesitter.configs")
configs.setup({
ensure_installed = {
"bash",
"blade",
"c",
"comment",
"css",
"diff",
"dockerfile",
"fish",
"gitcommit",
"gitignore",
"go",
"gomod",
"gosum",
"gowork",
"html",
"ini",
"javascript",
"jsdoc",
"json",
"lua",
"luadoc",
"luap",
"make",
"markdown",
"markdown_inline",
"nginx",
"nix",
"proto",
"python",
"query",
"regex",
"rust",
"scss",
"sql",
"toml",
"tsx",
"typescript",
"vim",
"vimdoc",
"go",
"typescript",
"javascript",
"tsx",
"xml",
"yaml",
"zig",
},
auto_install = true,
sync_install = true,
@ -37,5 +61,18 @@ return {
},
},
})
vim.api.nvim_create_autocmd("PackChanged", {
desc = "Handle nvim-treesitter updates",
group = vim.api.nvim_create_augroup("nvim-treesitter-pack-changed-update-handler", { clear = true }),
callback = function(event)
if event.data.kind == "update" then
local ok = pcall(vim.cmd, "TSUpdate")
if ok then
vim.notify("TSUpdate completed successfully!", vim.log.levels.INFO)
else
vim.notify("TSUpdate command not available yet, skipping", vim.log.levels.WARN)
end
end
end,
}
})

View file

@ -1,5 +0,0 @@
return {
"pmizio/typescript-tools.nvim",
dependencies = { "nvim-lua/plenary.nvim", "neovim/nvim-lspconfig" },
opts = {},
}

View file

@ -1,8 +1,8 @@
-- Useful plugin to show you pending keybinds.
return {
"folke/which-key.nvim",
event = "VimEnter", -- Sets the loading event to 'VimEnter'
opts = {
vim.pack.add({ "https://github.com/folke/which-key.nvim" })
local WK = require("which-key")
WK.setup({
icons = {
-- set icon mappings to true if you have a Nerd Font
mappings = vim.g.have_nerd_font,
@ -49,5 +49,5 @@ return {
{ "<leader>w", group = "[W]orkspace" },
{ "<leader>h", group = "Git [H]unk", mode = { "n", "v" } },
},
},
}
})

View file

@ -0,0 +1,103 @@
{
"plugins": {
"LuaSnip": {
"rev": "5a1e39223db9a0498024a77b8441169d260c8c25",
"src": "https://github.com/L3MON4D3/LuaSnip",
"version": "'v2.4.1'"
},
"aerial.nvim": {
"rev": "645d108a5242ec7b378cbe643eb6d04d4223f034",
"src": "https://github.com/stevearc/aerial.nvim"
},
"auto-session": {
"rev": "62437532b38495551410b3f377bcf4aaac574ebe",
"src": "https://github.com/rmagatti/auto-session"
},
"blink.cmp": {
"rev": "b650e976a927be6b46487a0a610b75af111376c5",
"src": "https://github.com/saghen/blink.cmp"
},
"conform.nvim": {
"rev": "e969e302bced7ffb9a0a0323629f31feb0ca35a6",
"src": "https://github.com/stevearc/conform.nvim"
},
"flash.nvim": {
"rev": "fcea7ff883235d9024dc41e638f164a450c14ca2",
"src": "https://github.com/folke/flash.nvim"
},
"friendly-snippets": {
"rev": "6cd7280adead7f586db6fccbd15d2cac7e2188b9",
"src": "https://github.com/rafamadriz/friendly-snippets"
},
"i18n.nvim": {
"rev": "128959499a9425bb4f1a5574fd92a23be00cb442",
"src": "https://github.com/yelog/i18n.nvim"
},
"js-i18n.nvim": {
"rev": "124f22f91d51e85641ba10e9a32f3b858394c2dd",
"src": "https://github.com/nabekou29/js-i18n.nvim",
"version": "'v0.5.4'"
},
"kanagawa.nvim": {
"rev": "aef7f5cec0a40dbe7f3304214850c472e2264b10",
"src": "https://github.com/rebelot/kanagawa.nvim"
},
"lazydev.nvim": {
"rev": "5231c62aa83c2f8dc8e7ba957aa77098cda1257d",
"src": "https://github.com/folke/lazydev.nvim"
},
"lualine.nvim": {
"rev": "47f91c416daef12db467145e16bed5bbfe00add8",
"src": "https://github.com/nvim-lualine/lualine.nvim"
},
"mason.nvim": {
"rev": "44d1e90e1f66e077268191e3ee9d2ac97cc18e65",
"src": "https://github.com/mason-org/mason.nvim"
},
"nord.nvim": {
"rev": "07647ad23e5b7fc1599a841dcd8f173b9aeb0419",
"src": "https://github.com/gbprod/nord.nvim"
},
"nvim-autopairs": {
"rev": "59bce2eef357189c3305e25bc6dd2d138c1683f5",
"src": "https://github.com/windwp/nvim-autopairs"
},
"nvim-lspconfig": {
"rev": "a40d22e75d951ad2fcf236ceb013d88f81d2cc9a",
"src": "https://github.com/neovim/nvim-lspconfig"
},
"nvim-surround": {
"rev": "5553dd1fbb3559abb176a8227a12e8f1cab07e93",
"src": "https://github.com/kylechui/nvim-surround"
},
"nvim-treesitter": {
"rev": "42fc28ba918343ebfd5565147a42a26580579482",
"src": "https://github.com/nvim-treesitter/nvim-treesitter",
"version": "'master'"
},
"nvim-web-devicons": {
"rev": "737cf6c657898d0c697311d79d361288a1343d50",
"src": "https://github.com/nvim-tree/nvim-web-devicons"
},
"plenary.nvim": {
"rev": "b9fd5226c2f76c951fc8ed5923d85e4de065e509",
"src": "https://github.com/nvim-lua/plenary.nvim"
},
"smear-cursor.nvim": {
"rev": "c85bdbb25db096fbcf616bc4e1357bd61fe2c199",
"src": "https://github.com/sphamba/smear-cursor.nvim"
},
"snacks.nvim": {
"rev": "fe7cfe9800a182274d0f868a74b7263b8c0c020b",
"src": "https://github.com/folke/snacks.nvim"
},
"tokyonight.nvim": {
"rev": "5da1b76e64daf4c5d410f06bcb6b9cb640da7dfd",
"src": "https://github.com/folke/tokyonight.nvim"
},
"which-key.nvim": {
"rev": "3aab2147e74890957785941f0c1ad87d0a44c15a",
"src": "https://github.com/folke/which-key.nvim"
}
}
}

View file

@ -1,7 +0,0 @@
neovim
stdpath
tmux
formik
TODO
Autoformat
CTRL

View file

@ -6,7 +6,7 @@ local act = wezterm.action
local config = wezterm.config_builder()
-- For example, changing the color scheme:
config.color_scheme = "tokyonight_night"
config.color_scheme = "nord"
config.alternate_buffer_wheel_scroll_speed = 10
-- Change mouse scroll amount
config.mouse_bindings = {
@ -22,7 +22,7 @@ config.mouse_bindings = {
},
}
config.font = wezterm.font({ family = "Iosevka Nerd Font", weight = "Regular", style = "Italic" })
config.font_size = 11
config.font_size = 13
config.use_fancy_tab_bar = false
config.hide_tab_bar_if_only_one_tab = true