Compare commits

...
6 Commits
Author SHA1 Message Date
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 499 additions and 300 deletions
-8
View File
@@ -1,8 +0,0 @@
tt.*
.tests
doc/tags
debug
.repro
foo.*
*.log
data
+24 -1
View File
@@ -1 +1,24 @@
require("config.lazy")
-- Modules =====================================================================
vim.loader.enable()
vim.opt.runtimepath:remove("/usr/share/nvim/site")
vim.opt.runtimepath:remove("/usr/share/nvim/site/after")
for _, m in ipairs({ "netrw", "netrwPlugin", "gzip", "tarPlugin", "zipPlugin", "tutor_mode_plugin" }) do
vim.g["loaded_" .. m] = 1 -- Block unused built-in modules
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,
on_event = function(ev, f) misc.safely("event:" .. ev, f) end,
on_filetype = function(ft, f) misc.safely("filetype:" .. ft, f) end,
autocmd = function(event, pattern, callback, desc)
vim.api.nvim_create_autocmd(event, { group = gr, pattern = pattern, callback = callback, desc = desc })
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"
+39
View File
@@ -0,0 +1,39 @@
local function run_task(cmd)
local buf = vim.api.nvim_create_buf(true, true)
vim.api.nvim_buf_set_name(buf, "just://" .. cmd)
vim.notify("󰑮 Running: " .. cmd)
vim.api.nvim_buf_call(buf, function()
vim.fn.jobstart(cmd, {
term = true,
on_exit = function(_, code)
if code == 0 then
vim.notify("󰄬 " .. cmd .. " success")
vim.schedule(function()
pcall(vim.api.nvim_buf_delete, buf, { force = true })
end)
else
vim.notify("󰅚 " .. cmd .. " failed (" .. code .. ")", 4)
end
end,
})
end)
end
function pick_just_task()
local obj = vim.system({ "just", "--summary" }, { text = true }):wait()
if obj.code ~= 0 or not obj.stdout or obj.stdout == "" then
return vim.notify("No recipes or justfile found", 3)
end
local recipes = vim.split(vim.trim(obj.stdout), "%s+")
require("mini.pick").start({
source = {
items = recipes,
name = "󱁤 Just Tasks",
choose = function(choice)
run_task("just " .. choice)
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",
},
},
},
},
}
+13
View File
@@ -0,0 +1,13 @@
local M = {}
--- Opens a TUI application in a new scratch buffer and deletes the buffer on exit.
function M.open_terminal_app(cmd)
vim.cmd("enew")
vim.fn.termopen(cmd, {
on_exit = function()
vim.cmd("bdelete!")
end,
})
end
return M
+36
View File
@@ -0,0 +1,36 @@
{
"plugins": {
"arborist.nvim": {
"rev": "fdeef56c2840c6772b9f68c5774ed87e9340ec7d",
"src": "https://github.com/arborist-ts/arborist.nvim"
},
"codecompanion.nvim": {
"rev": "635f001598d811c6ea256bc863b3d503c3a88d43",
"src": "https://github.com/olimorris/codecompanion.nvim"
},
"conform.nvim": {
"rev": "619363c30309d29ffa631e67c8183f2a72caa373",
"src": "https://github.com/stevearc/conform.nvim"
},
"kanagawa.nvim": {
"rev": "bb85e4bfc8d89b0e62c8fa53ccdd13d12e2f77b3",
"src": "https://github.com/rebelot/kanagawa.nvim"
},
"mason.nvim": {
"rev": "2a6940af80375532e5e9e7c1f2fc6319a1b7a69d",
"src": "https://github.com/mason-org/mason.nvim"
},
"mini.nvim": {
"rev": "c594be5b095204e99473825ec2dee872e7409a4d",
"src": "https://github.com/nvim-mini/mini.nvim"
},
"nvim-lspconfig": {
"rev": "bfcc0171a43f22afa61d927ffe9fcb6cb85dc99e",
"src": "https://github.com/neovim/nvim-lspconfig"
},
"plenary.nvim": {
"rev": "74b06c6c75e4eeb3108ec01852001636d85a932b",
"src": "https://github.com/nvim-lua/plenary.nvim"
}
}
}
+57
View File
@@ -0,0 +1,57 @@
-- General =====================================================================
vim.g.mapleader = ' ' -- Use `<Space>` as <Leader> key
vim.o.undofile = true -- Enable persistent undo
-- 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.number = true -- Show line numbers
vim.o.pumheight = 10 -- Make popup menu smaller
vim.o.pummaxwidth = 100 -- Make popup menu not too wide
vim.o.shortmess = 'CFOSWaco' -- 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 (toggle with \w)
vim.o.cmdheight = 0 -- Hide the command line when not in use.
-- 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
-- Pattern for a start of numbered list (used in `gw`).
vim.o.formatlistpat = [[^\s*[0-9\-\+\*]\+[\.\)]*\s\+]]
-- Built-in completion
vim.o.complete = '.,w,b,kspell' -- Use less sources
vim.o.completeopt = 'menuone,noselect,fuzzy,nosort' -- Use custom behavior
vim.o.completetimeout = 100 -- Limit sources delay
-- 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')
-- Diagnostics =================================================================
Config.later(function()
vim.diagnostic.config({
signs = { priority = 9999, severity = { min = 'WARN', max = 'ERROR' } },
underline = { severity = { min = 'HINT', max = 'ERROR' } },
virtual_lines = false,
virtual_text = {
current_line = true,
severity = { min = 'ERROR', max = 'ERROR' },
},
update_in_insert = false,
})
end)
+109
View File
@@ -0,0 +1,109 @@
-- Clues =======================================================================
Config.leader_group_clues = {
{ mode = "n", keys = "<Leader>a", desc = "+AI" },
{ 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>h", desc = "+Http" },
{ mode = "n", keys = "<Leader>l", desc = "+Language" },
{ mode = "n", keys = "<Leader>r", desc = "+Run" },
{ mode = "n", keys = "<Leader>s", desc = "+Session" },
{ mode = "n", keys = "<Leader>t", desc = "+Terminal" },
{ mode = "x", keys = "<Leader>g", desc = "+Git" },
{ mode = "x", keys = "<Leader>l", desc = "+Language" },
}
-- Helpers =====================================================================
local nmap = function(lhs, rhs, desc) vim.keymap.set("n", lhs, rhs, { desc = desc }) end
local nmap_leader = function(suffix, rhs, desc) vim.keymap.set("n", "<Leader>" .. suffix, rhs, { desc = desc }) end
local xmap_leader = function(suffix, rhs, desc) vim.keymap.set("x", "<Leader>" .. suffix, rhs, { desc = desc }) end
local function lazy_setup(name, action)
return function()
if Config and type(Config["setup_" .. name]) == "function" then
Config["setup_" .. name]()
end
action()
end
end
-- AI =====================================================================
nmap_leader("aa", lazy_setup("codecompanion", function() require("codecompanion").toggle_chat() end),
"Open CodeCompanion")
-- Buffers =====================================================================
nmap_leader("bd", function() vim.cmd("bd") end, "Delete")
nmap_leader("bD", function() vim.cmd("bd!") end, "Delete!")
nmap_leader("bw", function() vim.cmd("bw") end, "Wipeout")
nmap_leader("bW", function() vim.cmd("bw!") end, "Wipeout!")
nmap_leader("bo", function() vim.cmd("%bd|e#") end, "Close all but current")
-- Debug =====================================================================
nmap_leader("db", lazy_setup("dap", function() require("dap").toggle_breakpoint() end), "Toggle Breakpoint")
nmap_leader("dc", lazy_setup("dap", function() require("dap").continue() end), "Run/Continue")
nmap_leader("dC", lazy_setup("dap", function() require("dap").run_to_cursor() end), "Run to Cursor")
nmap_leader("de", lazy_setup("dap", function() require("dap.ui.widgets").hover() end), "Inspect")
nmap_leader("dt", lazy_setup("dap", function() require("dap").terminate() end), "Terminate")
-- Explore =====================================================================
nmap_leader("ed", function() MiniFiles.open() end, "Directory")
nmap_leader("ef", function() MiniFiles.open(vim.api.nvim_buf_get_name(0)) end, "File directory")
nmap_leader("en", function() MiniNotify.show_history() end, "Notifications")
-- Find =====================================================================
nmap_leader("f/", function() MiniPick.builtin.history({ scope = "/" }) end, '"/" history')
nmap_leader("f:", function() MiniPick.builtin.history({ scope = ":" }) end, '":" history')
nmap_leader("fb", function() MiniPick.builtin.buffers() end, "Buffers")
nmap_leader("fc", function() MiniPick.builtin.git_commits() end, "Commits (all)")
nmap_leader("fC", function() MiniPick.builtin.git_commits({ path = "%" }) end, "Commits (buf)")
nmap_leader("fd", function() MiniPick.builtin.diagnostic({ scope = "all" }) end, "Diagnostic workspace")
nmap_leader("fD", function() MiniPick.builtin.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 current word")
nmap_leader("fh", function() MiniPick.builtin.help() end, "Help tags")
nmap_leader("fl", function() MiniPick.builtin.buf_lines({ scope = "all" }) end, "Lines (all)")
nmap_leader("fL", function() MiniPick.builtin.buf_lines({ scope = "current" }) end, "Lines (buf)")
nmap_leader("fr", function() MiniPick.builtin.resume() end, "Resume")
nmap_leader("fs", function() MiniPick.builtin.lsp({ scope = "workspace_symbol_live" }) end, "Symbols workspace (live)")
nmap_leader("fS", function() MiniPick.builtin.lsp({ scope = "document_symbol" }) end, "Symbols document")
-- Git =====================================================================
nmap_leader("go", function() MiniDiff.toggle_overlay() end, "Toggle overlay")
-- HTTP =====================================================================
nmap_leader("hr", lazy_setup("kulala", function() require("kulala").run() end), "Send HTTP request")
-- Language =====================================================================
nmap_leader("la", vim.lsp.buf.code_action, "Actions")
nmap_leader("ld", vim.diagnostic.open_float, "Diagnostic popup")
nmap_leader("lf", function() require("conform").format() end, "Format")
nmap_leader("li", vim.lsp.buf.implementation, "Implementation")
nmap_leader("lh", vim.lsp.buf.hover, "Hover")
nmap_leader("ll", vim.lsp.codelens.run, "Lens")
nmap_leader("lr", vim.lsp.buf.rename, "Rename")
nmap_leader("lR", vim.lsp.buf.references, "References")
nmap_leader("ls", vim.lsp.buf.definition, "Source definition")
nmap_leader("lt", vim.lsp.buf.type_definition, "Type definition")
xmap_leader("lf", function() require("conform").format() end, "Format selection")
-- Run =====================================================================
nmap_leader("r", function() require("just").pick_just_task() end, "Run Just Task")
-- Session =====================================================================
nmap_leader("sd", function() MiniSessions.select("delete") end, "Delete")
nmap_leader("sn", function() vim.ui.input({ prompt = "Session name: " }, MiniSessions.write) end, "New")
nmap_leader("sr", function() MiniSessions.select("read") end, "Read")
nmap_leader("sR", function() MiniSessions.restart() end, "Restart")
nmap_leader("sw", function() MiniSessions.write() end, "Write current")
-- Terminal =====================================================================
nmap_leader("tT", function() vim.cmd("horizontal term") end, "Terminal (horizontal)")
nmap_leader("tt", function() vim.cmd("vertical term") end, "Terminal (vertical)")
nmap_leader("tg", function() require("terminal").open_terminal_app("lazygit") end, "LazyGit")
nmap_leader("ts", function() require("terminal").open_terminal_app("lazysql") end, "LazySQL")
-- Overwrites =====================================================================
nmap("<Esc>", function() vim.cmd("nohlsearch") end, "Clear search highlights")
+122
View File
@@ -0,0 +1,122 @@
-- UI ==========================================================================
Config.now(function()
-- Global icon provider.
require('mini.icons').setup()
Config.later(MiniIcons.tweak_lsp_kind)
-- Notifications.
require('mini.notify').setup()
-- Start screen.
require('mini.starter').setup()
-- Statusline.
require('mini.statusline').setup()
end)
Config.later(function()
-- Git diff indicators.
require('mini.diff').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>' }, -- Leader triggers
{ mode = 'n', keys = '\\' }, -- mini.basics
{ mode = { 'n', 'x' }, keys = '[' }, -- mini.bracketed
{ mode = { 'n', 'x' }, keys = ']' },
{ mode = 'i', keys = '<C-x>' }, -- Built-in completion
{ mode = { 'n', 'x' }, keys = 'g' }, -- `g` key
{ mode = { 'n', 'x' }, keys = "'" }, -- Marks
{ mode = { 'n', 'x' }, keys = '`' },
{ mode = { 'n', 'x' }, keys = '"' }, -- Registers
{ mode = { 'i', 'c' }, keys = '<C-r>' },
{ mode = 'n', keys = '<C-w>' }, -- Window commands
{ mode = { 'n', 'x' }, keys = 's' }, -- `s` key (mini.surround, etc.)
{ mode = { 'n', 'x' }, keys = 'z' }, -- `z` key
},
})
end)
-- Editing =====================================================================
Config.later(function()
-- Enhanced text objects (a/i).
require('mini.ai').setup()
-- Auto-close brackets and quotes.
require('mini.pairs').setup()
-- Surround functionality (add/delete/replace).
require('mini.surround').setup()
end)
-- Navigation ==================================================================
Config.now_if_args(function()
-- File system explorer.
require('mini.files').setup()
local add_marks = function()
MiniFiles.set_bookmark('c', vim.fn.stdpath('config'), { desc = 'Config' })
MiniFiles.set_bookmark('w', vim.fn.getcwd, { desc = 'Working directory' })
end
Config.autocmd('User', 'MiniFilesExplorerOpen', add_marks, 'Add default marks')
end)
Config.later(function()
-- Fuzzy picker.
require('mini.pick').setup()
-- Square bracket navigation.
require('mini.bracketed').setup()
end)
-- Completion ==================================================================
Config.now_if_args(function()
-- Autocompletion and signature help.
require('mini.completion').setup({
lsp_completion = {
source_func = 'omnifunc',
auto_setup = false,
process_items = function(items, base)
return MiniCompletion.default_process_items(items, base, { kind_priority = { Text = -1 } })
end,
},
})
-- Set 'omnifunc' for LSP completion only when needed.
local on_attach = function(ev)
vim.bo[ev.buf].omnifunc = 'v:lua.MiniCompletion.completefunc_lsp'
end
Config.autocmd('LspAttach', nil, on_attach, "Set 'omnifunc'")
-- Advertise to servers that Neovim supports certain set of completion features.
vim.lsp.config('*', { capabilities = MiniCompletion.get_lsp_capabilities() })
end)
-- Workspace & Utilities =======================================================
Config.now(function()
-- Session management.
require('mini.sessions').setup()
end)
Config.now_if_args(function()
-- Miscellaneous utility functions.
require('mini.misc').setup()
MiniMisc.setup_auto_root()
MiniMisc.setup_restore_cursor()
end)
Config.later(function()
-- Extra functionality (pickers, clues).
require('mini.extra').setup()
end)
+99
View File
@@ -0,0 +1,99 @@
-- Colortheme ==================================================================
Config.now(function()
vim.pack.add({ "https://github.com/rebelot/kanagawa.nvim" })
require("kanagawa").setup({ compile = true })
vim.cmd("colo kanagawa")
end)
-- Mason ====================================================================
Config.now_if_args(function()
vim.pack.add({ "https://github.com/mason-org/mason.nvim" })
require("mason").setup()
end)
-- Treesitter ==================================================================
Config.now_if_args(function()
vim.pack.add({ "https://github.com/arborist-ts/arborist.nvim" })
require("arborist").setup()
end)
-- LSP =========================================================================
Config.now_if_args(function()
vim.pack.add({ "https://github.com/neovim/nvim-lspconfig" })
vim.lsp.enable({
"ansiblels",
"gopls",
"intelephense",
"lua_ls",
"tailwindcss",
"vtsls",
})
end)
-- Conform =====================================================================
Config.now_if_args(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 = 500,
},
formatters_by_ft = {
go = { "gofumpt", "goimports" },
php = { "php_cs_fixer" },
},
})
end)
-- DAP =========================================================================
function Config.setup_dap()
if package.loaded["dap"] then
return
end
vim.pack.add({ "https://github.com/mfussenegger/nvim-dap" })
local dap = require("dap")
dap.adapters.php = {
type = "executable",
command = "node",
args = { vim.fn.stdpath("data") .. "/mason/packages/php-debug-adapter/extension/out/phpDebug.js" },
}
dap.adapters.go = {
type = "server",
host = "127.0.0.1",
port = "${port}",
}
end
-- Kulala ======================================================================
function Config.setup_kulala()
if package.loaded["kulala"] then
return
end
vim.pack.add({ "https://github.com/mistweaverco/kulala.nvim" })
require("kulala").setup({ default_env = "dev" })
end
-- CodeCompanion ===============================================================
function Config.setup_codecompanion()
if package.loaded["codecompanion"] then
return
end
vim.pack.add({
"https://github.com/nvim-lua/plenary.nvim",
"https://github.com/olimorris/codecompanion.nvim"
})
require("codecompanion").setup({
completion = {
provider = "native"
}
})
end