Compare commits

...
72 Commits
Author SHA1 Message Date
Job Jobse cf28a408eb chore: remove unused keymaps 2026-09-17 14:20:06 +02:00
Job79 0feb2c324e chore: disable italic text 2026-09-15 20:48:46 +02:00
Job79 3b18b6c7c0 feat: add some more options for git diff 2026-09-15 20:20:00 +02:00
Job79 1203d6be6c fix: colors of mini.diff 2026-09-15 19:49:31 +02:00
Job79 9853ec0dbb chore: use lua as much as possible 2026-09-14 21:02:46 +02:00
Job79 987a52e779 chore: fix formatting 2026-09-14 20:43:47 +02:00
Job79 f6ed9c992c fix: always load nvim-treesitter 2026-09-14 20:38:03 +02:00
Job79 10406758d8 fix: make ai shortcut generic 2026-09-11 21:38:35 +02:00
Job79 2616b14b9f chore: update deps 2026-09-11 21:34:48 +02:00
Job79 1cf3eef5e9 fix: small improvements 2026-09-11 21:32:43 +02:00
Job79 8292ff741d fix: improve picker registration 2026-09-11 20:55:00 +02:00
Job79 6dadd015bf fix: improve git workflow 2026-09-11 20:41:09 +02:00
Job79 887ade2cd7 fix: syntax highlighting on added code 2026-09-10 21:02:08 +02:00
Job Jobse 88467bfe52 feat: use biome as lsp 2026-09-08 21:19:40 +02:00
Job79 3b27bbca7b refactor: simplify diagnostics 2026-09-08 21:00:11 +02:00
Job79 d8b6f1515f feat: add shortcuts for tabs 2026-09-08 20:43:32 +02:00
Job79 2b6c4bc548 refactor: replace mini.sessions with project dirs on homepage 2026-09-08 20:43:25 +02:00
Job Jobse 76ffa507c0 fix: shortcuts 2026-09-08 19:44:45 +02:00
Job79 a28d4d2d8d fix: do not use deprecated options for bracket nagivation 2026-09-07 22:17:54 +02:00
Job79 1960b27077 chore: update deps 2026-09-07 22:14:22 +02:00
Job79 1d514baa0a refactor: lets try without mini.completion 2026-09-07 22:03:42 +02:00
Job Jobse 9af07644cd feat: switch php lsp and do use sorting 2026-09-06 21:14:04 +02:00
Job Jobse 72a7ff5949 fix: treesitter 2026-09-06 20:18:24 +02:00
Job79 5becb7c8b5 fix: quotes 2026-09-06 20:11:38 +02:00
Job79 37440d88e1 feat: use mini.safely for file events 2026-09-06 11:33:18 +02:00
Job79 4e03b0e297 refactor: small changes 2026-09-05 16:53:39 +02:00
Job79 0fffee1c1a feat: add popup terminal shortcut 2026-09-05 15:23:53 +02:00
Job79 51b5279d2e feat: disable some messages 2026-09-05 15:23:44 +02:00
Job Jobse 098457b5d4 fix: collection of small fixes 2026-09-04 20:56:21 +02:00
Job79 d1cd00d93b fix: size of popups 2026-09-03 22:32:22 +02:00
Job79 60f2639971 fix: lsp icons 2026-09-03 22:31:07 +02:00
Job79 53893986ec refactor: remove just helper 2026-09-03 22:03:23 +02:00
Job79 5eb228750d refactor: simplify 2026-09-03 20:55:37 +02:00
Job79 71434f947b refactor: remove unused optimalisations 2026-09-03 19:52:20 +02:00
Job79 29d7fd98c8 refactor: simplify 2026-09-03 19:50:47 +02:00
Job79 11edf1e7d1 fix: remove laravel 2026-09-03 19:06:10 +02:00
Job79 b26c0b1390 fix: remove mini.basics reference in clue 2026-09-02 22:26:44 +02:00
Job79 b78d3bafb7 fix: use later for lsp and formatting 2026-09-02 22:21:40 +02:00
Job79 6f427d791c feat: add svelte 2026-09-02 21:49:04 +02:00
Job79 097e8d194b chore: remove mason and nvim-treesitter-textobjects 2026-09-02 21:07:45 +02:00
Job79 1446912895 chore: remove mini.pairs 2026-09-02 20:22:43 +02:00
Job79 13a6236164 feat: add shortcut for claude 2026-09-02 20:10:19 +02:00
Job79 91107348ad feat: use popups for git / sql 2026-09-02 20:08:32 +02:00
Job79 f097f4d3e0 feat: use rounded borders around popups 2026-09-02 20:08:15 +02:00
Job Jobse 1e4d97df8f chore: change http keymap 2026-09-01 21:37:09 +02:00
Job Jobse d7c6096095 fix: do not open terminal when running just 2026-09-01 21:35:01 +02:00
Job Jobse 2c429163b8 fix: add biome back for typescript and jq for json 2026-09-01 21:34:17 +02:00
Job Jobse 241c2074d3 fix: rose pine theme name 2026-09-01 21:34:00 +02:00
Job79 b8ab1caf20 fix: bo closing other visible buffers 2026-08-29 21:49:36 +02:00
Job79 271e15370c refactor: remove unneeded spaces 2026-08-29 21:44:39 +02:00
Job79 f1937680b5 refactor: remove statuscolumn 2026-08-29 21:44:29 +02:00
Job79 2424162450 refactor: remove auto cursor restore 2026-08-29 21:24:29 +02:00
Job79 8beb8f7933 feat: add extra debugger shortcuts 2026-08-29 17:33:07 +02:00
Job79 a1acbdf63c feat: add icons for sidebar 2026-08-29 17:26:30 +02:00
Job79 a9c376c8f8 feat: add sh parser 2026-08-29 17:02:42 +02:00
Job79 3a41727764 feat: add terminal shortcuts 2026-08-29 17:02:35 +02:00
Job Jobse adc75d1e7f fix: remove notifications 2026-08-29 16:44:07 +02:00
Job79 a6f5ee48d2 fix: limit shada file 2026-08-29 15:57:18 +02:00
Job79 c4d76c9025 fix: small fixes 2026-08-29 15:54:35 +02:00
Job79 93ba68bb33 fix: messages removing the bar 2026-08-29 15:47:54 +02:00
Job79 47a5c1e9af chore: cleanup nvim-pack-lock.json 2026-08-29 15:44:24 +02:00
Job79 d84545fdaf feat: use new ui 2026-08-29 15:36:37 +02:00
Job79 ddf69f9ba4 Merge pull request 'Minimax' (#1) from minimax into main
Reviewed-on: #1
2026-08-29 12:33:29 +00:00
Job Jobse 4e10963615 feat: add statuscolumn 2026-08-29 14:15:21 +02:00
Job Jobse 9f74d7a7a1 refactor: small fixes 2026-08-29 13:03:23 +02:00
Job79 1bb7c08186 fix: add laravel and switch back to standard treesitter 2026-08-18 20:15:09 +02:00
Job79 0b90092ff8 refactor: temp 2026-06-24 20:34:11 +02:00
Job79 e7e37c8dc8 refactor: options 2026-06-24 19:47:32 +02:00
Job79 4609901269 refactor: update plugins 2026-06-24 19:46:16 +02:00
Job79 8a78482519 refactor: remove after 2026-06-24 19:46:16 +02:00
Job79 60d4cf6d26 refactor: init.lua 2026-06-24 19:46:16 +02:00
Job79 d0bb6d84ba refactor: switch to minimax 2026-06-01 21:34:45 +02:00
17 changed files with 522 additions and 300 deletions
-8
View File
@@ -1,8 +0,0 @@
tt.*
.tests
doc/tags
debug
.repro
foo.*
*.log
data
+33 -1
View File
@@ -1 +1,33 @@
require("config.lazy")
-- Modules
vim.loader.enable()
vim.opt.runtimepath:remove('/usr/share/nvim/site')
for _, m in ipairs({
'netrw', 'netrwPlugin',
'gzip', 'tarPlugin',
'tutor_mode_plugin',
'remote_plugins',
'nvim_zip_plugin',
'nvim_net_plugin',
'spellfile_plugin',
}) do
vim.g['loaded_' .. m] = 1
end
for _, p in ipairs({ 'node', 'python3', 'perl', 'ruby' }) do
vim.g['loaded_' .. p .. '_provider'] = 0
end
-- Config Global
vim.pack.add({ 'https://github.com/nvim-mini/mini.nvim' })
local misc = require('mini.misc')
local gr = vim.api.nvim_create_augroup('custom-config', {})
_G.Config = {
now = function(f) misc.safely('now', f) end,
later = function(f) misc.safely('later', f) end,
autocmd = function(event, pattern, callback, desc, once)
vim.api.nvim_create_autocmd(event, { group = gr, pattern = pattern, callback = callback, desc = desc, once = once })
end
}
Config.now_if_args = vim.fn.argc(-1) > 0 and Config.now or Config.later
-34
View File
@@ -1,34 +0,0 @@
{
"LazyVim": { "branch": "main", "commit": "fca0af57cc3851b14f96a795a9c9bfafc5096dd1" },
"blink.cmp": { "branch": "main", "commit": "451168851e8e2466bc97ee3e026c3dcb9141ce07" },
"catppuccin": { "branch": "main", "commit": "c4d475e4b5684747cde9b3f849186af7837d4397" },
"codecompanion.nvim": { "branch": "main", "commit": "d5551b1aac60e164fb569eba422ea9b65cd2d6f4" },
"conform.nvim": { "branch": "master", "commit": "086a40dc7ed8242c03be9f47fbcee68699cc2395" },
"friendly-snippets": { "branch": "main", "commit": "6cd7280adead7f586db6fccbd15d2cac7e2188b9" },
"gitsigns.nvim": { "branch": "main", "commit": "7c4faa3540d0781a28588cafbd4dd187a28ac6e3" },
"laravel.nvim": { "branch": "main", "commit": "ef06a69137ed09a72addc0c6f967aaea7d891a63" },
"lazy.nvim": { "branch": "main", "commit": "85c7ff3711b730b4030d03144f6db6375044ae82" },
"lazydev.nvim": { "branch": "main", "commit": "ff2cbcba459b637ec3fd165a2be59b7bbaeedf0d" },
"lualine.nvim": { "branch": "master", "commit": "47f91c416daef12db467145e16bed5bbfe00add8" },
"mason-lspconfig.nvim": { "branch": "main", "commit": "a979821a975897b88493843301950c456a725982" },
"mason.nvim": { "branch": "main", "commit": "44d1e90e1f66e077268191e3ee9d2ac97cc18e65" },
"mini.ai": { "branch": "main", "commit": "4b0a6207341d895b6cfe9bcb1e4d3e8607bfe4f4" },
"mini.icons": { "branch": "main", "commit": "5b9076dae1bfbe47ba4a14bc8b967cde0ab5d77e" },
"mini.pairs": { "branch": "main", "commit": "b7fde3719340946feb75017ef9d75edebdeb0566" },
"noice.nvim": { "branch": "main", "commit": "7bfd942445fb63089b59f97ca487d605e715f155" },
"nui.nvim": { "branch": "main", "commit": "de740991c12411b663994b2860f1a4fd0937c130" },
"nvim-lint": { "branch": "master", "commit": "606b823a57b027502a9ae00978ebf4f5d5158098" },
"nvim-lspconfig": { "branch": "master", "commit": "841c6d4139aedb8a3f2baf30cef5327371385b93" },
"nvim-nio": { "branch": "master", "commit": "21f5324bfac14e22ba26553caf69ec76ae8a7662" },
"nvim-treesitter": { "branch": "main", "commit": "e5f65e31a5ec0e8526b2311ff8c7aaea4a581c82" },
"nvim-treesitter-textobjects": { "branch": "main", "commit": "93d60a475f0b08a8eceb99255863977d3a25f310" },
"nvim-ts-autotag": { "branch": "main", "commit": "8e1c0a389f20bf7f5b0dd0e00306c1247bda2595" },
"persistence.nvim": { "branch": "main", "commit": "b20b2a7887bd39c1a356980b45e03250f3dce49c" },
"plenary.nvim": { "branch": "master", "commit": "b9fd5226c2f76c951fc8ed5923d85e4de065e509" },
"rose-pine": { "branch": "main", "commit": "cf2a288696b03d0934da713d66c6d71557b5c997" },
"snacks.nvim": { "branch": "main", "commit": "ad9ede6a9cddf16cedbd31b8932d6dcdee9b716e" },
"tokyonight.nvim": { "branch": "main", "commit": "5da1b76e64daf4c5d410f06bcb6b9cb640da7dfd" },
"trouble.nvim": { "branch": "main", "commit": "bd67efe408d4816e25e8491cc5ad4088e708a69a" },
"ts-comments.nvim": { "branch": "main", "commit": "123a9fb12e7229342f807ec9e6de478b1102b041" },
"which-key.nvim": { "branch": "main", "commit": "3aab2147e74890957785941f0c1ad87d0a44c15a" }
}
-10
View File
@@ -1,10 +0,0 @@
{
"extras": [
],
"install_version": 8,
"news": {
"NEWS.md": "11866"
},
"version": 8
}
-43
View File
@@ -1,43 +0,0 @@
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
if not (vim.uv or vim.loop).fs_stat(lazypath) then
local lazyrepo = "https://github.com/folke/lazy.nvim.git"
local out = vim.fn.system({ "git", "clone", "--filter=blob:none", "--branch=stable", lazyrepo, lazypath })
if vim.v.shell_error ~= 0 then
vim.api.nvim_echo({
{ "Failed to clone lazy.nvim:\n", "ErrorMsg" },
{ out, "WarningMsg" },
{ "\nPress any key to exit..." },
}, true, {})
vim.fn.getchar()
os.exit(1)
end
end
vim.opt.rtp:prepend(lazypath)
require("lazy").setup({
spec = {
{ "LazyVim/LazyVim", import = "lazyvim.plugins" },
{ import = "plugins" },
},
defaults = {
lazy = false,
version = false,
},
install = {},
checker = {
enabled = true,
notify = true,
},
performance = {
rtp = {
disabled_plugins = {
"gzip",
"netrwPlugin",
"tarPlugin",
"tohtml",
"tutor",
"zipPlugin",
},
},
},
})
-4
View File
@@ -1,4 +0,0 @@
vim.o.tw = 60
vim.o.clipboard = ""
vim.g.snacks_animate = false
vim.g.lazyvim_php_lsp = "intelephense"
+48
View File
@@ -0,0 +1,48 @@
local ns = vim.api.nvim_create_namespace('git_status')
local hls = { M = 'DiagnosticWarn', ['?'] = 'DiagnosticInfo', A = 'DiagnosticOk', D = 'DiagnosticError', R = 'DiagnosticWarn' }
local function show(buf_id, items, query)
MiniPick.default_show(buf_id, items, query)
vim.api.nvim_buf_clear_namespace(buf_id, ns, 0, -1)
for i, item in ipairs(items) do
if item.hl then
vim.api.nvim_buf_set_extmark(buf_id, ns, i - 1, 1, { end_col = 3, hl_group = item.hl, priority = 202, hl_mode = 'combine' })
end
end
end
return {
status = function()
local lines = vim.fn.systemlist('git status -s -u')
if vim.v.shell_error ~= 0 then
return vim.notify('Not a git repository', vim.log.levels.WARN)
end
local items = {}
for _, l in ipairs(lines) do
local s = l:sub(1, 2):match('%S+')
local p = l:sub(4):gsub('.* %-> ', ''):gsub('^"(.*)"$', '%1')
local hl = l:sub(1, 1) ~= ' ' and l:sub(1, 1) ~= '?' and 'DiagnosticOk' or hls[s:sub(1, 1)]
items[#items + 1] = {
text = string.format(' %-2s %s', s == '??' and '?' or s, p),
path = p,
hl = hl,
}
end
if #items == 0 then return vim.notify('No changes', vim.log.levels.INFO) end
MiniPick.start({
source = { items = items, name = 'Git Status', show = show },
mappings = {
quickfix = {
char = '<C-q>',
func = function()
local m = MiniPick.get_picker_matches()
MiniPick.default_choose_marked(#m.marked > 0 and m.marked or m.all)
return true
end,
},
},
})
end,
}
-32
View File
@@ -1,32 +0,0 @@
return {
{
"olimorris/codecompanion.nvim",
dependencies = {
"nvim-lua/plenary.nvim",
"nvim-treesitter/nvim-treesitter",
},
opts = {},
keys = {
{ "<leader>aa", "<cmd>CodeCompanionChat<cr>", mode = { "n", "v" }, desc = "Toggle Chat" },
{
"<leader>ap",
function()
local mode = vim.api.nvim_get_mode().mode
vim.ui.input({ prompt = "AI Prompt: " }, function(input)
if not input or input == "" then
return
end
if mode:match("[vV]") then
vim.cmd("'<,'>CodeCompanion " .. input)
else
vim.cmd("CodeCompanion #{buffer} " .. input)
end
end)
end,
mode = { "n", "v" },
desc = "AI Prompt",
},
},
},
}
-7
View File
@@ -1,7 +0,0 @@
return {
{ "rose-pine/neovim", name = "rose-pine" },
{
"LazyVim/LazyVim",
opts = { colorscheme = "rose-pine" },
},
}
-25
View File
@@ -1,25 +0,0 @@
return {
{
"folke/snacks.nvim",
opts = {
dashboard = { enabled = false },
explorer = { trash = false },
},
},
{
"neovim/nvim-lspconfig",
opts = {
inlay_hints = { enabled = false },
},
},
{ "akinsho/bufferline.nvim", enabled = false },
{ "folke/flash.nvim", enabled = false },
{ "rafamadriz/friendly-snippets", enabled = false },
{ "catppuccin/nvim", enabled = false },
{ "folke/tokyonight.nvim", enabled = false },
{ "folke/todo-comments.nvim", enabled = false },
{ "folke/ts-comments.nvim", enabled = false },
{ "MagicDuck/grug-far.nvim", enabled = false },
}
-136
View File
@@ -1,136 +0,0 @@
return {
{
-- Set Laravel Pint as the default PHP formatter with PHP CS Fixer as a fall back.
"stevearc/conform.nvim",
optional = true,
opts = {
formatters_by_ft = {
php = { { "pint", "php_cs_fixer" } },
},
},
},
{
-- Remove phpcs linter.
"mfussenegger/nvim-lint",
optional = true,
opts = {
linters_by_ft = {
php = {},
},
},
},
{
"adalessa/laravel.nvim",
dependencies = {
"MunifTanjim/nui.nvim",
"nvim-lua/plenary.nvim",
"nvim-neotest/nvim-nio",
},
ft = { "php", "blade" },
event = {
"BufEnter composer.json",
},
keys = {
{
"<leader>ll",
function()
Laravel.pickers.laravel()
end,
desc = "Laravel: Open Laravel Picker",
},
{
"<c-g>",
function()
Laravel.commands.run("view:finder")
end,
desc = "Laravel: Open View Finder",
},
{
"<leader>la",
function()
Laravel.pickers.artisan()
end,
desc = "Laravel: Open Artisan Picker",
},
{
"<leader>lt",
function()
Laravel.commands.run("actions")
end,
desc = "Laravel: Open Actions Picker",
},
{
"<leader>lr",
function()
Laravel.pickers.routes()
end,
desc = "Laravel: Open Routes Picker",
},
{
"<leader>lh",
function()
Laravel.run("artisan docs")
end,
desc = "Laravel: Open Documentation",
},
{
"<leader>lm",
function()
Laravel.pickers.make()
end,
desc = "Laravel: Open Make Picker",
},
{
"<leader>lc",
function()
Laravel.pickers.commands()
end,
desc = "Laravel: Open Commands Picker",
},
{
"<leader>lo",
function()
Laravel.pickers.resources()
end,
desc = "Laravel: Open Resources Picker",
},
{
"<leader>lp",
function()
Laravel.commands.run("command_center")
end,
desc = "Laravel: Open Command Center",
},
{
"<leader>lu",
function()
Laravel.commands.run("hub")
end,
desc = "Laravel Artisan hub",
},
{
"gf",
function()
local ok, res = pcall(function()
if Laravel.app("gf").cursorOnResource() then
return "<cmd>lua Laravel.commands.run('gf')<cr>"
end
end)
if not ok or not res then
return "gf"
end
return res
end,
expr = true,
noremap = true,
},
},
opts = {
features = {
pickers = {
provider = "snacks",
},
},
},
},
}
+19
View File
@@ -0,0 +1,19 @@
local function open(cmd)
local lines = vim.o.lines - vim.o.cmdheight - (vim.o.laststatus > 0 and 1 or 0)
local w, h = math.floor(vim.o.columns * 0.95), math.floor(lines * 0.95)
local buf = vim.api.nvim_create_buf(false, true)
vim.bo[buf].bufhidden = 'wipe'
local win = vim.api.nvim_open_win(buf, true, {
relative = 'editor',
width = w,
height = h,
row = math.floor((lines - h) / 2),
col = math.floor((vim.o.columns - w) / 2),
border = 'rounded',
})
vim.fn.termopen(cmd, { on_exit = function() pcall(vim.api.nvim_win_close, win, true) end })
end
return { open = open }
+28
View File
@@ -0,0 +1,28 @@
{
"plugins": {
"conform.nvim": {
"rev": "016802de402556da54c36bd7359b441266b01cdd",
"src": "https://github.com/stevearc/conform.nvim"
},
"mini.nvim": {
"rev": "ac5dffcc52b8378fbb15efeb0497a83e57a0b01c",
"src": "https://github.com/nvim-mini/mini.nvim"
},
"nvim-dap": {
"rev": "cfa2d58f4537aca6ca83e2de1a0d9f1491121264",
"src": "https://github.com/mfussenegger/nvim-dap"
},
"nvim-lspconfig": {
"rev": "ac9d2f7c4757db6320cab6697fe73e5e8adb2457",
"src": "https://github.com/neovim/nvim-lspconfig"
},
"nvim-treesitter": {
"rev": "9a168f6357ed21c3a636e1727bc7d382abc451b8",
"src": "https://github.com/nvim-treesitter/nvim-treesitter"
},
"rose-pine": {
"rev": "ff483051a47e27d84bdef47703538df1ed9f4a47",
"src": "https://github.com/rose-pine/neovim"
}
}
}
+64
View File
@@ -0,0 +1,64 @@
-- General
vim.g.mapleader = ' ' -- Use `<Space>` as <Leader> key
vim.o.undofile = true -- Enable persistent undo
vim.o.shada = "'50,<20,s10,:100,/50,@50,h" -- Limit ShaDa file (for startup)
-- UI
vim.o.breakindent = true -- Indent wrapped lines to match line start
vim.o.breakindentopt = 'list:-1' -- Add padding for lists (if 'wrap' is set)
vim.o.cursorline = true -- Enable current line highlighting
vim.o.linebreak = true -- Wrap lines at 'breakat' (if 'wrap' is set)
vim.o.list = true -- Show helpful text indicators
vim.o.listchars = 'tab:→ ,trail:·,nbsp:␣' -- Characters for list mode
vim.o.number = true -- Show line numbers
vim.o.pumheight = 10 -- Make popup menu smaller
vim.o.pummaxwidth = 80 -- Make popup menu not too wide
vim.o.shortmess = 'CFOSWacou' -- Disable some built-in completion messages
vim.o.signcolumn = 'yes' -- Always show signcolumn (less flicker)
vim.o.splitbelow = true -- Horizontal splits will be below
vim.o.splitkeep = 'screen' -- Reduce scroll during window split
vim.o.splitright = true -- Vertical splits will be to the right
vim.o.wrap = false -- Don't visually wrap lines
vim.o.winborder = 'rounded' -- Use border in floating windows
vim.o.pumborder = 'rounded' -- Use border in popup menu
vim.o.cmdheight = 0 -- Hide the command line when not in use
vim.cmd('syntax off') -- Disable legacy syntax highlighting
require('vim._core.ui2').enable({ -- Enable new ui (requires nightly)
msg = { targets = 'msg' }
})
-- Editing
vim.o.expandtab = true -- Convert tabs to spaces
vim.o.formatoptions = 'rqnl1j' -- Improve comment editing
vim.o.ignorecase = true -- Ignore case during search
vim.o.infercase = true -- Infer case in built-in completion
vim.o.shiftwidth = 2 -- Use this number of spaces for indentation
vim.o.smartcase = true -- Respect case if search pattern has upper case
vim.o.spelloptions = 'camel' -- Treat camelCase word parts as separate words
vim.o.tabstop = 2 -- Show tab as this number of spaces
vim.o.virtualedit = 'block' -- Allow going past end of line in blockwise mode
vim.o.complete = '.,w,b,kspell' -- Use less sources
vim.o.completeopt = 'menuone,noselect,fuzzy' -- Use custom behavior
-- Autocommands
Config.autocmd('TextYankPost', '*', function() vim.hl.hl_op() end, 'Highlight yanked text')
Config.autocmd('TermOpen', '*', function() vim.cmd('startinsert') end, 'Start insert mode when terminal opens')
Config.autocmd('LspAttach', '*', function(ev) vim.bo[ev.buf].complete = 'o' end, 'Use lsp completions')
-- Diagnostics
Config.later(function()
vim.diagnostic.config({
jump = { on_jump = vim.diagnostic.open_float },
signs = {
priority = 9999,
severity = { min = vim.diagnostic.severity.INFO },
text = {
[vim.diagnostic.severity.ERROR] = '',
[vim.diagnostic.severity.WARN] = '',
[vim.diagnostic.severity.INFO] = '',
},
},
virtual_text = false,
})
end)
+134
View File
@@ -0,0 +1,134 @@
-- Clues
Config.leader_group_clues = {
{ mode = 'n', keys = '<Leader>b', desc = '+Buffer' },
{ mode = 'n', keys = '<Leader>d', desc = '+Debug' },
{ mode = 'n', keys = '<Leader>e', desc = '+Explore' },
{ mode = 'n', keys = '<Leader>f', desc = '+Find' },
{ mode = 'n', keys = '<Leader>g', desc = '+Git' },
{ mode = 'n', keys = '<Leader>l', desc = '+Language' },
{ mode = 'n', keys = '<Leader>r', desc = '+Request' },
{ mode = 'n', keys = '<Leader>t', desc = '+Terminal' },
{ mode = 'n', keys = '<Leader><Tab>', desc = '+Tab' },
{ mode = 'x', keys = '<Leader>g', desc = '+Git' },
{ mode = 'x', keys = '<Leader>l', desc = '+Language' },
}
-- Keymap Helpers
local nmap_leader = function(suffix, rhs, desc)
vim.keymap.set('n', '<Leader>' .. suffix, rhs, { desc = desc, silent = true })
end
local xmap_leader = function(suffix, rhs, desc)
vim.keymap.set('x', '<Leader>' .. suffix, rhs, { desc = desc, silent = true })
end
-- Buffers
local new_scratch_buffer = function()
vim.api.nvim_win_set_buf(0, vim.api.nvim_create_buf(true, true))
end
local close_invisible_buffers = function()
local visible = vim.iter(vim.api.nvim_list_wins()):map(vim.api.nvim_win_get_buf):totable()
vim.iter(vim.api.nvim_list_bufs())
:filter(function(buf) return not vim.list_contains(visible, buf) end)
:each(function(buf) pcall(vim.api.nvim_buf_delete, buf, { force = false }) end)
end
nmap_leader('bd', vim.cmd.bdelete, 'Delete')
nmap_leader('bs', new_scratch_buffer, 'Scratch')
nmap_leader('bw', vim.cmd.bwipeout, 'Wipeout')
nmap_leader('bo', close_invisible_buffers, 'Close invisible buffers')
-- Debug
nmap_leader('db', function() require('dap').toggle_breakpoint() end, 'Toggle Breakpoint')
nmap_leader('dl', function() require('dap').set_breakpoint(nil, nil, vim.fn.input('Log point: ')) end, 'Log point')
nmap_leader('dc', function() require('dap').continue() end, 'Run/Continue')
nmap_leader('dC', function() require('dap').run_to_cursor() end, 'Run to Cursor')
nmap_leader('de', function() require('dap.ui.widgets').hover() end, 'Inspect')
nmap_leader('dr', function() require('dap').repl.open() end, 'Open REPL')
nmap_leader('dt', function() require('dap').terminate() end, 'Terminate')
-- Explore
local explore_at_file = function()
local file = vim.api.nvim_buf_get_name(0)
MiniFiles.open(vim.uv.fs_stat(file) and file or nil)
end
nmap_leader('ed', function() MiniFiles.open() end, 'Directory')
nmap_leader('ef', explore_at_file, 'File directory')
nmap_leader('ey', function() vim.fn.setreg('+', vim.fn.fnamemodify(vim.api.nvim_buf_get_name(0), ':.')) end, 'Yank relative path')
nmap_leader('eY', function() vim.fn.setreg('+', vim.api.nvim_buf_get_name(0)) end, 'Yank absolute path')
nmap_leader('en', vim.cmd.messages, 'Notifications')
-- Find
nmap_leader('fb', function() MiniPick.builtin.buffers() end, 'Buffers')
nmap_leader('fc', function() MiniExtra.pickers.git_commits() end, 'Commits (all)')
nmap_leader('fC', function() MiniExtra.pickers.git_commits({ path = vim.fn.expand('%') }) end, 'Commits (buf)')
nmap_leader('fd', function() MiniExtra.pickers.diagnostic({ scope = 'all' }) end, 'Diagnostic workspace')
nmap_leader('fD', function() MiniExtra.pickers.diagnostic({ scope = 'current' }) end, 'Diagnostic buffer')
nmap_leader('ff', function() MiniPick.builtin.files() end, 'Files')
nmap_leader('fg', function() MiniPick.builtin.grep_live() end, 'Grep live')
nmap_leader('fG', function() MiniPick.builtin.grep({ pattern = vim.fn.expand('<cword>') }) end, 'Grep word')
nmap_leader('fh', function() MiniPick.builtin.help() end, 'Help tags')
nmap_leader('fl', function() MiniExtra.pickers.buf_lines({ scope = 'all' }) end, 'Lines (all)')
nmap_leader('fL', function() MiniExtra.pickers.buf_lines({ scope = 'current' }) end, 'Lines (buf)')
nmap_leader('fm', function() require('git').status() end, 'Modified / changed files')
nmap_leader('fo', function() MiniExtra.pickers.oldfiles() end, 'Old / recent files')
nmap_leader('fr', function() MiniPick.builtin.resume() end, 'Resume')
nmap_leader('fs', function() MiniExtra.pickers.lsp({ scope = 'workspace_symbol_live' }) end, 'Symbols workspace')
nmap_leader('fS', function() MiniExtra.pickers.lsp({ scope = 'document_symbol' }) end, 'Symbols document')
nmap_leader('f:', function() MiniExtra.pickers.history({ scope = ':' }) end, 'Command history')
-- Git
local diff_unstaged = function()
vim.cmd.diffthis()
vim.cmd('vert Git show :./%')
vim.cmd.diffthis()
end
nmap_leader('ga', function() vim.cmd('Git add %') end, 'Add current file')
nmap_leader('gd', diff_unstaged, 'Diff unstaged')
nmap_leader('gs', function() MiniGit.show_at_cursor() end, 'Show at cursor')
xmap_leader('gs', function() MiniGit.show_at_cursor() end, 'Show at selection')
-- Language
nmap_leader('la', function() vim.lsp.buf.code_action() end, 'Actions')
nmap_leader('ld', function() vim.diagnostic.open_float() end, 'Diagnostic popup')
nmap_leader('lf', function() require('conform').format({ async = true }) end, 'Format')
xmap_leader('lf', function() require('conform').format({ async = true }) end, 'Format selection')
nmap_leader('li', function() vim.lsp.buf.implementation() end, 'Implementation')
nmap_leader('lh', function() vim.lsp.buf.hover() end, 'Hover')
nmap_leader('ll', function() vim.lsp.codelens.run() end, 'Lens')
nmap_leader('lr', function() vim.lsp.buf.rename() end, 'Rename')
nmap_leader('lR', function() vim.lsp.buf.references() end, 'References')
nmap_leader('ls', function() vim.lsp.buf.definition() end, 'Source definition')
nmap_leader('lt', function() vim.lsp.buf.type_definition() end, 'Type definition')
-- Request
nmap_leader('rs', function() require('kulala').run() end, 'Send HTTP request')
-- Terminal
local open_ai = function()
vim.cmd('vertical term ' .. (vim.fn.executable('pi') == 1 and 'pi' or 'claude'))
end
nmap_leader('tT', function() vim.cmd('horizontal term') end, 'Terminal (horizontal)')
nmap_leader('tt', function() vim.cmd('vertical term') end, 'Terminal (vertical)')
nmap_leader('ta', open_ai, 'AI')
nmap_leader('tf', function() require('terminal').open(vim.o.shell) end, 'Terminal (popup)')
nmap_leader('tg', function() require('terminal').open('lazygit') end, 'LazyGit')
nmap_leader('ts', function() require('terminal').open('lazysql') end, 'LazySQL')
-- Tabs
nmap_leader('<Tab><Tab>', vim.cmd.tabnew, 'New tab')
nmap_leader('<Tab>d', vim.cmd.tabclose, 'Close tab')
nmap_leader('<Tab>]', vim.cmd.tabnext, 'Next tab')
nmap_leader('<Tab>[', vim.cmd.tabprevious, 'Previous tab')
-- Brackets
vim.keymap.set('n', ']d', function() vim.diagnostic.jump({ count = 1 }) end, { desc = 'Next diagnostic' })
vim.keymap.set('n', '[d', function() vim.diagnostic.jump({ count = -1 }) end, { desc = 'Previous diagnostic' })
-- Overwrites
vim.keymap.set('n', '<Esc>', vim.cmd.nohlsearch, { desc = 'Clear highlights', silent = true })
vim.keymap.set('t', '<C-w>', '<C-\\><C-n><C-w>', { desc = 'Terminal window navigation', silent = true })
+90
View File
@@ -0,0 +1,90 @@
-- UI
Config.now(function()
-- Global icon provider
require('mini.icons').setup()
Config.later(MiniIcons.tweak_lsp_kind)
require('mini.statusline').setup()
local starter = require('mini.starter')
starter.setup({
items = {
function()
return vim.iter({ vim.fn.glob('~/Code/*', 0, 1), vim.fn.glob('~/Documents/*/*', 0, 1) })
:flatten()
:filter(function(p) return vim.fn.isdirectory(p) == 1 end)
:map(function(p)
return {
name = vim.fn.fnamemodify(p, ':t'),
action = function()
vim.fn.chdir(p)
require('mini.files').open(p)
end,
section = 'Projects',
}
end)
:totable()
end,
starter.sections.builtin_actions(),
},
})
end)
Config.later(function()
-- Git diff indicators
require('mini.diff').setup()
require('mini.git').setup()
-- Keymap hints
local miniclue = require('mini.clue')
miniclue.setup({
clues = {
Config.leader_group_clues,
miniclue.gen_clues.builtin_completion(),
miniclue.gen_clues.g(),
miniclue.gen_clues.marks(),
miniclue.gen_clues.registers(),
miniclue.gen_clues.square_brackets(),
miniclue.gen_clues.windows({ submode_resize = true }),
miniclue.gen_clues.z(),
},
triggers = {
{ mode = { 'n', 'x' }, keys = '<Leader>' },
{ mode = { 'n', 'x' }, keys = '[' },
{ mode = { 'n', 'x' }, keys = ']' },
{ mode = 'i', keys = '<C-x>' },
{ mode = { 'n', 'x' }, keys = 'g' },
{ mode = { 'n', 'x' }, keys = "'" },
{ mode = { 'n', 'x' }, keys = '`' },
{ mode = { 'n', 'x' }, keys = '"' },
{ mode = { 'i', 'c' }, keys = '<C-r>' },
{ mode = 'n', keys = '<C-w>' },
{ mode = { 'n', 'x' }, keys = 's' },
{ mode = { 'n', 'x' }, keys = 'z' },
},
})
end)
-- Editing & Navigation
Config.later(function()
require('mini.ai').setup()
require('mini.pairs').setup()
require('mini.pick').setup()
require('mini.extra').setup()
MiniPick.registry.git_status = function() require('git').status() end
end)
-- File Explorer
Config.now_if_args(function()
require('mini.files').setup()
Config.autocmd('User', 'MiniFilesExplorerOpen', function()
MiniFiles.set_bookmark('c', vim.fn.stdpath('config'), { desc = 'Config' })
MiniFiles.set_bookmark('w', vim.fn.getcwd, { desc = 'Working directory' })
end, 'Add default marks')
end)
-- Utilities
Config.now_if_args(function()
require('mini.misc').setup()
MiniMisc.setup_auto_root()
end)
+106
View File
@@ -0,0 +1,106 @@
-- Colortheme
Config.now(function()
vim.pack.add({ { src = 'https://github.com/rose-pine/neovim', name = 'rose-pine' } })
require('rose-pine').setup({
enable = { terminal = false, legacy_highlights = false, migrations = false, },
styles = { italic = false },
highlight_groups = {
MiniDiffOverAdd = { fg = 'NONE', bg = 'foam', blend = 20 },
MiniDiffOverChangeBuf = { bg = 'rose', blend = 20 },
},
})
vim.cmd.colorscheme('rose-pine')
end)
-- Treesitter
Config.now_if_args(function()
vim.pack.add({ 'https://github.com/nvim-treesitter/nvim-treesitter' })
vim.treesitter.language.register('bash', 'sh')
vim.treesitter.language.register('tsx', 'typescriptreact')
local filetypes = {
'html', 'css', 'lua', 'go', 'php', 'blade', 'sql', 'javascript',
'typescript', 'typescriptreact', 'svelte', 'dockerfile', 'yaml', 'markdown', 'dart',
'json', 'xml', 'toml', 'sh', 'zsh', 'just', 'gitcommit', 'diff', 'regex', 'http'
}
Config.autocmd('FileType', filetypes, function(ev)
if pcall(vim.treesitter.start, ev.buf) and vim.bo[ev.buf].filetype == 'php' then
vim.bo[ev.buf].indentexpr = "v:lua.require'nvim-treesitter'.indentexpr()"
end
end, 'Start tree-sitter')
Config.later(function()
local missing = {}
for _, ft in ipairs(filetypes) do
local lang = vim.treesitter.language.get_lang(ft) or ft
if #vim.api.nvim_get_runtime_file('parser/' .. lang .. '.so', false) == 0 then
table.insert(missing, lang)
end
end
if #missing > 0 then
require('nvim-treesitter').install(missing)
end
end)
end)
-- LSP
Config.now_if_args(function()
vim.pack.add({ 'https://github.com/neovim/nvim-lspconfig' })
vim.lsp.enable({ 'ansiblels', 'gopls', 'phpantom_lsp', 'svelte', 'tailwindcss', 'tsc', 'biome' })
end)
-- Formatting
Config.later(function()
vim.pack.add({ 'https://github.com/stevearc/conform.nvim' })
require('conform').setup({
default_format_opts = { lsp_format = 'fallback' },
format_on_save = { lsp_format = 'fallback', timeout_ms = 1000 },
formatters_by_ft = {
go = { 'gofumpt', 'goimports' },
php = { 'php_cs_fixer' },
json = { 'jq' },
javascript = { 'biome' },
typescript = { 'biome' },
javascriptreact = { 'biome' },
typescriptreact = { 'biome' },
svelte = { 'biome' },
},
})
end)
-- DAP
Config.later(function()
vim.pack.add({ 'https://github.com/mfussenegger/nvim-dap' })
local dap_signs = {
DapBreakpoint = { text = '', texthl = 'DapBreakpoint' },
DapBreakpointCondition = { text = '', texthl = 'DapBreakpointCondition' },
DapLogPoint = { text = '', texthl = 'DapLogPoint' },
DapStopped = { text = '', texthl = 'DapStopped', linehl = 'DapStoppedLine' },
DapBreakpointRejected = { text = '', texthl = 'DapBreakpointRejected' },
}
for name, sign in pairs(dap_signs) do
vim.fn.sign_define(name, sign)
end
require('dap').adapters.go = { type = 'server', host = '127.0.0.1', port = '${port}' }
end)
-- Kulala
Config.autocmd('FileType', 'http', function()
vim.pack.add({ 'https://github.com/mistweaverco/kulala.nvim' })
require('kulala').setup({ default_env = 'dev' })
end, 'Setup Kulala', true)
-- Flutter
Config.autocmd('FileType', 'dart', function()
vim.pack.add({
'https://github.com/nvim-lua/plenary.nvim',
'https://github.com/nvim-flutter/flutter-tools.nvim',
})
require('flutter-tools').setup({ lsp = { color_capabilities = true } })
end, 'Setup flutter', true)