Compare commits

..

4 Commits

Author SHA1 Message Date
b1b6351bd8 feat: add shortcuts to codecompanion 2026-03-21 16:36:43 +01:00
d3a7651606 feat: add ai.lua 2026-03-19 21:07:01 +01:00
add6e87c26 refactor: simplify config 2026-03-06 20:08:42 +01:00
cebe4d190c add php 2026-02-23 20:49:51 +01:00
9 changed files with 218 additions and 73 deletions

View File

@@ -1,2 +1 @@
-- bootstrap lazy.nvim, LazyVim and your plugins
require("config.lazy") require("config.lazy")

View File

@@ -1,33 +1,34 @@
{ {
"LazyVim": { "branch": "main", "commit": "0329bc0e508eb48f7cee7fe57975c364584f8738" }, "LazyVim": { "branch": "main", "commit": "fca0af57cc3851b14f96a795a9c9bfafc5096dd1" },
"blink.cmp": { "branch": "main", "commit": "327fff91fe6af358e990be7be1ec8b78037d2138" }, "blink.cmp": { "branch": "main", "commit": "451168851e8e2466bc97ee3e026c3dcb9141ce07" },
"catppuccin": { "branch": "main", "commit": "af58927c55c9f3272c940ff02b3cee94a1249f26" }, "catppuccin": { "branch": "main", "commit": "c4d475e4b5684747cde9b3f849186af7837d4397" },
"conform.nvim": { "branch": "master", "commit": "9fd3d5e0b689ec1bf400c53cbbec72c6fdf24081" }, "codecompanion.nvim": { "branch": "main", "commit": "d5551b1aac60e164fb569eba422ea9b65cd2d6f4" },
"friendly-snippets": { "branch": "main", "commit": "572f5660cf05f8cd8834e096d7b4c921ba18e175" }, "conform.nvim": { "branch": "master", "commit": "086a40dc7ed8242c03be9f47fbcee68699cc2395" },
"fzf-lua": { "branch": "main", "commit": "3ec1ffb25365a6b3d87e510b1175342a61bf91a2" }, "friendly-snippets": { "branch": "main", "commit": "6cd7280adead7f586db6fccbd15d2cac7e2188b9" },
"gitsigns.nvim": { "branch": "main", "commit": "20ad4419564d6e22b189f6738116b38871082332" }, "gitsigns.nvim": { "branch": "main", "commit": "7c4faa3540d0781a28588cafbd4dd187a28ac6e3" },
"gruvbox-material": { "branch": "master", "commit": "834dbf21836862300ced7444db4262b796330ab7" }, "laravel.nvim": { "branch": "main", "commit": "ef06a69137ed09a72addc0c6f967aaea7d891a63" },
"lazy.nvim": { "branch": "main", "commit": "db067881fff0fd4be8c00e5bde7492e0e1c77a2f" }, "lazy.nvim": { "branch": "main", "commit": "85c7ff3711b730b4030d03144f6db6375044ae82" },
"lazydev.nvim": { "branch": "main", "commit": "01bc2aacd51cf9021eb19d048e70ce3dd09f7f93" }, "lazydev.nvim": { "branch": "main", "commit": "ff2cbcba459b637ec3fd165a2be59b7bbaeedf0d" },
"lualine.nvim": { "branch": "master", "commit": "3946f0122255bc377d14a59b27b609fb3ab25768" }, "lualine.nvim": { "branch": "master", "commit": "47f91c416daef12db467145e16bed5bbfe00add8" },
"mason-lspconfig.nvim": { "branch": "main", "commit": "83db0174efbac2d69fd45afef269b47dfedadbe1" }, "mason-lspconfig.nvim": { "branch": "main", "commit": "a979821a975897b88493843301950c456a725982" },
"mason.nvim": { "branch": "main", "commit": "ad7146aa61dcaeb54fa900144d768f040090bff0" }, "mason.nvim": { "branch": "main", "commit": "44d1e90e1f66e077268191e3ee9d2ac97cc18e65" },
"mini.ai": { "branch": "main", "commit": "11c57180bc9084089206e211ac7aa598bedc9673" }, "mini.ai": { "branch": "main", "commit": "4b0a6207341d895b6cfe9bcb1e4d3e8607bfe4f4" },
"mini.icons": { "branch": "main", "commit": "284798619aed9f4c1ac1b9417b9a5e3b4b85ef3a" }, "mini.icons": { "branch": "main", "commit": "5b9076dae1bfbe47ba4a14bc8b967cde0ab5d77e" },
"mini.pairs": { "branch": "main", "commit": "b9aada8c0e59f2b938e98fbf4eae0799eba96ad9" }, "mini.pairs": { "branch": "main", "commit": "b7fde3719340946feb75017ef9d75edebdeb0566" },
"neo-tree.nvim": { "branch": "main", "commit": "0d0b29a529216d41173c9c5c8a8f484db5b891ba" }, "noice.nvim": { "branch": "main", "commit": "7bfd942445fb63089b59f97ca487d605e715f155" },
"noice.nvim": { "branch": "main", "commit": "c86aea584d98be7ee1167ce4d4ef946fbd7f3ae0" },
"nui.nvim": { "branch": "main", "commit": "de740991c12411b663994b2860f1a4fd0937c130" }, "nui.nvim": { "branch": "main", "commit": "de740991c12411b663994b2860f1a4fd0937c130" },
"nvim-lint": { "branch": "master", "commit": "9da1fb942dd0668d5182f9c8dee801b9c190e2bb" }, "nvim-lint": { "branch": "master", "commit": "606b823a57b027502a9ae00978ebf4f5d5158098" },
"nvim-lspconfig": { "branch": "master", "commit": "a9b2fb560c4ab22c10728fd5149dbd7b62aa4f69" }, "nvim-lspconfig": { "branch": "master", "commit": "841c6d4139aedb8a3f2baf30cef5327371385b93" },
"nvim-treesitter": { "branch": "main", "commit": "9ee023538e072163cc541f29bc74214f7b0b90f6" }, "nvim-nio": { "branch": "master", "commit": "21f5324bfac14e22ba26553caf69ec76ae8a7662" },
"nvim-treesitter-textobjects": { "branch": "main", "commit": "1b2d85d3de6114c4bcea89ffb2cd1ce9e3a19931" }, "nvim-treesitter": { "branch": "main", "commit": "e5f65e31a5ec0e8526b2311ff8c7aaea4a581c82" },
"nvim-ts-autotag": { "branch": "main", "commit": "c4ca798ab95b316a768d51eaaaee48f64a4a46bc" }, "nvim-treesitter-textobjects": { "branch": "main", "commit": "93d60a475f0b08a8eceb99255863977d3a25f310" },
"persistence.nvim": { "branch": "main", "commit": "51eef57272742b773468949f6bd0503ec3f83874" }, "nvim-ts-autotag": { "branch": "main", "commit": "8e1c0a389f20bf7f5b0dd0e00306c1247bda2595" },
"persistence.nvim": { "branch": "main", "commit": "b20b2a7887bd39c1a356980b45e03250f3dce49c" },
"plenary.nvim": { "branch": "master", "commit": "b9fd5226c2f76c951fc8ed5923d85e4de065e509" }, "plenary.nvim": { "branch": "master", "commit": "b9fd5226c2f76c951fc8ed5923d85e4de065e509" },
"rose-pine": { "branch": "main", "commit": "72a04c4065345b51b56aed4859ea1d884f734097" }, "rose-pine": { "branch": "main", "commit": "cf2a288696b03d0934da713d66c6d71557b5c997" },
"snacks.nvim": { "branch": "main", "commit": "d569072b2e39e0078b55ea56b133fb9a30d78bad" }, "snacks.nvim": { "branch": "main", "commit": "ad9ede6a9cddf16cedbd31b8932d6dcdee9b716e" },
"tokyonight.nvim": { "branch": "main", "commit": "4fe1b0c44f5d6ee769cdfbdffc7ccb703f53feda" }, "tokyonight.nvim": { "branch": "main", "commit": "5da1b76e64daf4c5d410f06bcb6b9cb640da7dfd" },
"ts-comments.nvim": { "branch": "main", "commit": "217ab9cc137fceb6659b53790bd25e608219abe1" }, "trouble.nvim": { "branch": "main", "commit": "bd67efe408d4816e25e8491cc5ad4088e708a69a" },
"which-key.nvim": { "branch": "main", "commit": "b4177e3eaf15fe5eb8357ebac2286d488be1ed00" } "ts-comments.nvim": { "branch": "main", "commit": "123a9fb12e7229342f807ec9e6de478b1102b041" },
"which-key.nvim": { "branch": "main", "commit": "3aab2147e74890957785941f0c1ad87d0a44c15a" }
} }

View File

@@ -1,6 +1,8 @@
{ {
"extras": [], "extras": [
"install_version": 7,
],
"install_version": 8,
"news": { "news": {
"NEWS.md": "11866" "NEWS.md": "11866"
}, },

View File

@@ -1,12 +0,0 @@
-- Configure custom keymaps.
local keymap = vim.keymap.set
local delkeymap = vim.keymap.del
local opts = { noremap = true, silent = true }
-- Improved escape
keymap("n", "<ESC>", "<ESC>:noh<CR>", opts)
keymap("t", "<ESC><ESC>", "<C-\\><C-n>", opts)
-- Disable alt j/k to move lines (conflict with default vim motions)
delkeymap({ "i", "v" }, "<A-j>")
delkeymap({ "i", "v" }, "<A-k>")

View File

@@ -1,15 +1,4 @@
-- Set some custom options. vim.o.tw = 60
local opt = vim.o vim.o.clipboard = ""
local global = vim.g vim.g.snacks_animate = false
vim.g.lazyvim_php_lsp = "intelephense"
-- Set target text width for gww to 60.
opt.tw = 60
-- Use the internal clipboard.
opt.clipboard = ""
-- Use original gruvbox theme.
global.gruvbox_material_foreground = "original"
-- Disable snack animations.
global.snacks_animate = false

32
lua/plugins/ai.lua Normal file
View File

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

View File

@@ -1,9 +1,7 @@
-- Configure rose-pine and gruvbox-material colorschemes.
return { return {
{ "rose-pine/neovim", name = "rose-pine" }, { "rose-pine/neovim", name = "rose-pine" },
{ "sainnhe/gruvbox-material" },
{ {
"LazyVim/LazyVim", "LazyVim/LazyVim",
opts = { colorscheme = "gruvbox-material" }, opts = { colorscheme = "rose-pine" },
}, },
} }

View File

@@ -1,25 +1,25 @@
-- Disable unused plugins and functionality.
return { return {
{ {
-- Disable the dashboard.
"folke/snacks.nvim", "folke/snacks.nvim",
opts = { opts = {
dashboard = { enabled = false }, dashboard = { enabled = false },
notifier = { level = vim.log.levels.WARN }, explorer = { trash = false },
}, },
}, },
{ {
-- Disable inline hints by default.
"neovim/nvim-lspconfig", "neovim/nvim-lspconfig",
opts = { opts = {
inlay_hints = { enabled = false }, inlay_hints = { enabled = false },
}, },
}, },
-- Disable unused plugins.
{ "folke/flash.nvim", enabled = false },
{ "folke/todo-comments.nvim", enabled = false },
{ "folke/trouble.nvim", enabled = false },
{ "MagicDuck/grug-far.nvim", enabled = false },
{ "akinsho/bufferline.nvim", 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
lua/plugins/php.lua Normal file
View File

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