From a0bd84df02ce235123dfc939327e8bd33dffdd7e Mon Sep 17 00:00:00 2001 From: Elvis Claros Castro Date: Sat, 27 Jun 2026 22:48:15 -0300 Subject: Remplazando y eliminando plugins a favor de cosas nativas. --- after/ftplugin/codecompanion.lua | 1 + after/ftplugin/snacks_notif.lua | 1 + after/indent/codecompanion.lua | 1 + after/indent/snacks_notif.lua | 1 + after/syntax/codecompanion.lua | 1 + after/syntax/snacks_notif.lua | 1 + init.lua | 21 +++- lazy-lock.json | 83 +++++++--------- lua/config/autocmds.lua | 52 ++++++++++ lua/config/direnv.lua | 62 ++++++++++++ lua/config/init.lua | 3 + lua/config/keymaps.lua | 42 ++++++++ lua/config/usercmds.lua | 15 +++ lua/config/worktree.lua | 59 +++++++++++ lua/pi/lsp/attach.lua | 7 +- lua/pi/lsp/init.lua | 12 +-- lua/pi/lsp/null-ls.lua | 2 +- lua/plugins/codecompanion.lua | 81 ++++++++++------ lua/plugins/comment.lua | 5 - lua/plugins/direnv.lua | 5 - lua/plugins/dressing.lua | 205 --------------------------------------- lua/plugins/image.lua | 24 ----- lua/plugins/indent-blankline.lua | 5 - lua/plugins/luarocks.lua | 5 - lua/plugins/neocolumn.lua | 5 - lua/plugins/noice.lua | 1 - lua/plugins/nvim-bqf.lua | 10 -- lua/plugins/smart-splits.lua | 34 ------- lua/plugins/snacks.lua | 2 +- lua/plugins/transparent.lua | 5 - lua/plugins/treesitter.lua | 19 +++- lua/plugins/trouble.lua | 7 -- lua/plugins/twilight.lua | 5 - lua/plugins/vim-illuminate.lua | 21 ---- lua/plugins/vim-lastplace.lua | 4 - lua/plugins/worktree.lua | 23 ----- lua/plugins/zenmode.lua | 44 --------- 37 files changed, 371 insertions(+), 503 deletions(-) create mode 100644 after/ftplugin/codecompanion.lua create mode 100644 after/ftplugin/snacks_notif.lua create mode 100644 after/indent/codecompanion.lua create mode 100644 after/indent/snacks_notif.lua create mode 100644 after/syntax/codecompanion.lua create mode 100644 after/syntax/snacks_notif.lua create mode 100644 lua/config/direnv.lua create mode 100644 lua/config/worktree.lua delete mode 100644 lua/plugins/comment.lua delete mode 100644 lua/plugins/direnv.lua delete mode 100644 lua/plugins/dressing.lua delete mode 100644 lua/plugins/image.lua delete mode 100644 lua/plugins/indent-blankline.lua delete mode 100644 lua/plugins/luarocks.lua delete mode 100644 lua/plugins/neocolumn.lua delete mode 100644 lua/plugins/nvim-bqf.lua delete mode 100644 lua/plugins/smart-splits.lua delete mode 100644 lua/plugins/transparent.lua delete mode 100644 lua/plugins/trouble.lua delete mode 100644 lua/plugins/twilight.lua delete mode 100644 lua/plugins/vim-illuminate.lua delete mode 100644 lua/plugins/vim-lastplace.lua delete mode 100644 lua/plugins/worktree.lua delete mode 100644 lua/plugins/zenmode.lua diff --git a/after/ftplugin/codecompanion.lua b/after/ftplugin/codecompanion.lua new file mode 100644 index 0000000..9e7b78a --- /dev/null +++ b/after/ftplugin/codecompanion.lua @@ -0,0 +1 @@ +-- Local ftplugin stub to silence runtime lookup warnings. diff --git a/after/ftplugin/snacks_notif.lua b/after/ftplugin/snacks_notif.lua new file mode 100644 index 0000000..9e7b78a --- /dev/null +++ b/after/ftplugin/snacks_notif.lua @@ -0,0 +1 @@ +-- Local ftplugin stub to silence runtime lookup warnings. diff --git a/after/indent/codecompanion.lua b/after/indent/codecompanion.lua new file mode 100644 index 0000000..bd8c0b3 --- /dev/null +++ b/after/indent/codecompanion.lua @@ -0,0 +1 @@ +-- Local indent stub to silence runtime lookup warnings. diff --git a/after/indent/snacks_notif.lua b/after/indent/snacks_notif.lua new file mode 100644 index 0000000..bd8c0b3 --- /dev/null +++ b/after/indent/snacks_notif.lua @@ -0,0 +1 @@ +-- Local indent stub to silence runtime lookup warnings. diff --git a/after/syntax/codecompanion.lua b/after/syntax/codecompanion.lua new file mode 100644 index 0000000..6d2158e --- /dev/null +++ b/after/syntax/codecompanion.lua @@ -0,0 +1 @@ +-- Local syntax stub to silence runtime lookup warnings. diff --git a/after/syntax/snacks_notif.lua b/after/syntax/snacks_notif.lua new file mode 100644 index 0000000..6d2158e --- /dev/null +++ b/after/syntax/snacks_notif.lua @@ -0,0 +1 @@ +-- Local syntax stub to silence runtime lookup warnings. diff --git a/init.lua b/init.lua index 7fc832e..5ae938f 100644 --- a/init.lua +++ b/init.lua @@ -1,8 +1,21 @@ require "config" require "pi.globals" -vim.api.nvim_create_autocmd({ "BufReadPost" }, { - pattern = { "*" }, - callback = function() - vim.api.nvim_exec2('silent! normal! g`"zv', {}) + +-- Restaurar la última posición del cursor al abrir un archivo (reemplaza vim-lastplace) +vim.api.nvim_create_autocmd("BufReadPost", { + group = vim.api.nvim_create_augroup("last_place", { clear = true }), + callback = function(args) + local exclude_ft = { "gitcommit", "gitrebase", "svn", "hgcommit" } + local buf = args.buf + if vim.tbl_contains(exclude_ft, vim.bo[buf].filetype) or vim.b[buf].last_place_done then + return + end + vim.b[buf].last_place_done = true + local mark = vim.api.nvim_buf_get_mark(buf, '"') + local lcount = vim.api.nvim_buf_line_count(buf) + if mark[1] > 0 and mark[1] <= lcount then + pcall(vim.api.nvim_win_set_cursor, 0, mark) + vim.api.nvim_exec2("silent! normal! zv", {}) + end end, }) diff --git a/lazy-lock.json b/lazy-lock.json index e13e24b..a1895a0 100644 --- a/lazy-lock.json +++ b/lazy-lock.json @@ -1,122 +1,107 @@ { - "Comment.nvim": { "branch": "master", "commit": "e30b7f2008e52442154b66f7c519bfd2f1e32acb" }, - "CopilotChat.nvim": { "branch": "main", "commit": "5378035c2eb4089de245473dec1768e0986543bd" }, + "CopilotChat.nvim": { "branch": "main", "commit": "ab5cf12ea8b8c8af82feb616bf7fbac096edc0e0" }, "FixCursorHold.nvim": { "branch": "master", "commit": "1900f89dc17c603eec29960f57c00bd9ae696495" }, - "LazyVim": { "branch": "main", "commit": "cdc47ae6152872ad09d588697906bf93cba3fcd9" }, + "LazyVim": { "branch": "main", "commit": "459a4c3b1059671e766a46c7cc223827dc67e3d0" }, "LuaSnip": { "branch": "master", "commit": "500981ff6cefc7343e3959ef0f939bd0bfd49ba9" }, - "NeoColumn.nvim": { "branch": "main", "commit": "db7695c7c70fcacd290712deef659bca464634ee" }, "SmoothCursor.nvim": { "branch": "main", "commit": "12518b284e1e3f7c6c703b346815968e1620bee2" }, "animation.nvim": { "branch": "main", "commit": "fb77091ab72ec9971aee0562e7081182527aaa6a" }, "blink-cmp-latex": { "branch": "main", "commit": "4f2910b98dabed17a1667ab806354faa8763098e" }, "blink.cmp": { "branch": "main", "commit": "78336bc89ee5365633bcf754d93df01678b5c08f" }, "buffer_manager.nvim": { "branch": "main", "commit": "a0ac2db39c8bd4a2b6ca897f38c88770f90d9323" }, "codecompanion-history.nvim": { "branch": "main", "commit": "bc1b4fe06eaaf0aa2399be742e843c22f7f1652a" }, - "codecompanion.nvim": { "branch": "main", "commit": "f70759ee8b63b46ea0cf158dc22daa2a5e9c6319" }, + "codecompanion.nvim": { "branch": "main", "commit": "7cc35b7f7f08d093469fa9ae67d3af716bd729c3" }, "color-picker.nvim": { "branch": "master", "commit": "06cb5f853535dea529a523e9a0e8884cdf9eba4d" }, "composer.nvim": { "branch": "main", "commit": "ec9537969adc7fc128cfe9c3a9925850455896c8" }, - "direnv.vim": { "branch": "master", "commit": "ab2a7e08dd630060cd81d7946739ac7442a4f269" }, "dressing.nvim": { "branch": "master", "commit": "2d7c2db2507fa3c4956142ee607431ddb2828639" }, "elixir-tools.nvim": { "branch": "main", "commit": "b51b48edc668924a6b2f6610f9a0aff34741d20e" }, - "firenvim": { "branch": "master", "commit": "69d3411d08d35bb9b3e84b9deaff4b9b078a30e3" }, - "flutter-tools.nvim": { "branch": "main", "commit": "7fc434e99297af83cba10deff008be53a008a6d5" }, + "firenvim": { "branch": "master", "commit": "af775c4a1cef5a1e833ae5c6d81afe229ceb639e" }, + "flutter-tools.nvim": { "branch": "main", "commit": "7d1acfd139215e02d2784733af69a61aaebe06e8" }, "friendly-snippets": { "branch": "main", "commit": "6cd7280adead7f586db6fccbd15d2cac7e2188b9" }, - "git-worktree.nvim": { "branch": "master", "commit": "f247308e68dab9f1133759b05d944569ad054546" }, - "gitsigns.nvim": { "branch": "main", "commit": "6d808f99bd63303646794406e270bd553ad7792e" }, - "guihua.lua": { "branch": "master", "commit": "d178056728548ed8a99cce94de47b7500bd6889a" }, + "gitsigns.nvim": { "branch": "main", "commit": "25050e4ed39e628282831d4cbecb1850454ce915" }, + "guihua.lua": { "branch": "master", "commit": "f8e06bd8a26dee3377d63c2adf1e57cdb58ac474" }, "hydra.nvim": { "branch": "master", "commit": "3ced42c0b6a6c85583ff0f221635a7f4c1ab0dd0" }, "icon-picker.nvim": { "branch": "master", "commit": "3ee9a0ea9feeef08ae35e40c8be6a2fa2c20f2d3" }, - "image.nvim": { "branch": "master", "commit": "da2be65c153ba15a14a342b05591652a6df70d58" }, "img-clip.nvim": { "branch": "main", "commit": "b6ddfb97b5600d99afe3452d707444afda658aca" }, - "indent-blankline.nvim": { "branch": "master", "commit": "d28a3f70721c79e3c5f6693057ae929f3d9c0a03" }, "indent-o-matic": { "branch": "master", "commit": "764da1f30b5bb4a49035c3abc9a586322296b812" }, "json-nvim": { "branch": "master", "commit": "beb76a5ffa0a936677695bc82cc868654aad4398" }, - "laravel.nvim": { "branch": "main", "commit": "e63451559abeec2bf977e832fcd4dd85925f9e66" }, + "laravel.nvim": { "branch": "main", "commit": "0c12031c8c049c423c6c31951beba721115ce6cc" }, "lazy.nvim": { "branch": "main", "commit": "306a05526ada86a7b30af95c5cc81ffba93fef97" }, "lua-utils.nvim": { "branch": "main", "commit": "e565749421f4bbb5d2e85e37c3cef9d56553d8bd" }, - "lualine.nvim": { "branch": "master", "commit": "a905eeebc4e63fdc48b5135d3bf8aea5618fb21c" }, - "luarocks.nvim": { "branch": "main", "commit": "1db9093915eb16ba2473cfb8d343ace5ee04130a" }, + "lualine.nvim": { "branch": "master", "commit": "221ce6b2d999187044529f49da6554a92f740a96" }, "markview.nvim": { "branch": "main", "commit": "e27dee8b2a61f89ac3a06deae0264ad1d3f7b62c" }, - "mason-lspconfig.nvim": { "branch": "main", "commit": "0c2823e0418f3d9230ff8b201c976e84de1cb401" }, + "mason-lspconfig.nvim": { "branch": "main", "commit": "21c5b3ebeaa0412e28096bb0701434c51c1fbf76" }, "mason-tool-installer.nvim": { "branch": "main", "commit": "443f1ef8b5e6bf47045cb2217b6f748a223cf7dc" }, - "mason.nvim": { "branch": "main", "commit": "12ddd182d9efbdc848b540f16484a583d52da0fb" }, + "mason.nvim": { "branch": "main", "commit": "2a6940af80375532e5e9e7c1f2fc6319a1b7a69d" }, "mcphub.nvim": { "branch": "main", "commit": "7cd5db330f41b7bae02b2d6202218a061c3ebc1f" }, "menu": { "branch": "main", "commit": "7a0a4a2896b715c066cfbe320bdc048091874cc6" }, "middleclass": { "branch": "master", "commit": "9fab4d5bca67262614960960ca35c4740eb2be2c" }, - "mini.diff": { "branch": "main", "commit": "ab11575a6c147ecfba894d676d0c93e855021d34" }, - "mini.icons": { "branch": "main", "commit": "bac6317300e205335df425296570d84322730067" }, - "mini.nvim": { "branch": "main", "commit": "5849ef04c32a6a8e55957b946c0a275801d87530" }, + "mini.diff": { "branch": "main", "commit": "05be51814a718e74244829754a2a900a430a8d8b" }, + "mini.icons": { "branch": "main", "commit": "ac38c983aed0a2bd32a65ca3e2348e12e58ca292" }, + "mini.nvim": { "branch": "main", "commit": "bf8169f3e518be8de3f88073ace37d91f576cb04" }, "minty": { "branch": "main", "commit": "aafc9e8e0afe6bf57580858a2849578d8d8db9e0" }, - "minuet-ai.nvim": { "branch": "main", "commit": "173d8c9451504cdf93ce172f710487d3c6191ce8" }, - "navigator.lua": { "branch": "master", "commit": "f460f3d494eb0df7769ce7e51a240967219bb38e" }, + "minuet-ai.nvim": { "branch": "main", "commit": "d29dec4c36be2b41aa10e70938b7b09a03f0bdba" }, + "navigator.lua": { "branch": "master", "commit": "cdf118b21a2b7c05a6e8e6d57acbe7a41d4ea41b" }, "neogen": { "branch": "main", "commit": "23e7e9f883d01289ebd90e98025acc860ea26366" }, "neorg": { "branch": "main", "commit": "1f14d72aad7165eac307a2a2f6be0fb97a04b3c2" }, - "neotest": { "branch": "master", "commit": "fd0b7986dd0ae04e38ec7dc0c78a432e3820839c" }, + "neotest": { "branch": "master", "commit": "ad991822b7076b1d940b33a9d6d0d30416d5df81" }, "neotest-go": { "branch": "main", "commit": "59b50505053f9c45a9febb79e11a56206c3e3901" }, "neotest-plenary": { "branch": "master", "commit": "3523adcf9ffaad1911960c5813b0136c1b63a2ec" }, "neotest-python": { "branch": "master", "commit": "e6df4f1892f6137f58135917db24d1655937d831" }, "neotest-vim-test": { "branch": "master", "commit": "75c4228882ae4883b11bfce9b8383e637eb44192" }, "noice.nvim": { "branch": "main", "commit": "7bfd942445fb63089b59f97ca487d605e715f155" }, - "none-ls-extras.nvim": { "branch": "main", "commit": "70ec8815cdf186223af04cc5a15bc8bdface0ef0" }, + "none-ls-extras.nvim": { "branch": "main", "commit": "27681d797a26f1b4d6119296df42f5204c88a2dc" }, "none-ls-luacheck.nvim": { "branch": "main", "commit": "a1dfea0d4c40c4023829c8b9a7ab0a26135985ca" }, "none-ls-shellcheck.nvim": { "branch": "main", "commit": "0f84461241e76e376a95fb7391deac82dc3efdbf" }, - "none-ls.nvim": { "branch": "main", "commit": "e135361b9c11755ef6c48f54a2c970c509b56239" }, + "none-ls.nvim": { "branch": "main", "commit": "01f8e62ea11603e59ad9ff7afcfa94fd183f76d6" }, "nui.nvim": { "branch": "main", "commit": "de740991c12411b663994b2860f1a4fd0937c130" }, - "numb.nvim": { "branch": "master", "commit": "12ef3913dea8727d4632c6f2ed47957a993de627" }, - "nvim-autopairs": { "branch": "master", "commit": "59bce2eef357189c3305e25bc6dd2d138c1683f5" }, - "nvim-bqf": { "branch": "main", "commit": "c282a62bec6c0621a1ef5132aa3f4c9fc4dcc2c7" }, + "numb.nvim": { "branch": "master", "commit": "167fbbb8de5529eac4f66ef054c260636cd9af51" }, + "nvim-autopairs": { "branch": "master", "commit": "7b9923abad60b903ece7c52940e1321d39eccc79" }, "nvim-colorizer.lua": { "branch": "master", "commit": "a065833f35a3a7cc3ef137ac88b5381da2ba302e" }, - "nvim-dap": { "branch": "master", "commit": "45a69eba683a2c448dd9ecfc4de89511f0646b5f" }, + "nvim-dap": { "branch": "master", "commit": "531771530d4f82ad2d21e436e3cc052d68d7aebb" }, "nvim-dap-go": { "branch": "main", "commit": "b4421153ead5d726603b02743ea40cf26a51ed5f" }, "nvim-dap-python": { "branch": "master", "commit": "1808458eba2b18f178f990e01376941a42c7f93b" }, "nvim-dap-ui": { "branch": "master", "commit": "1a66cabaa4a4da0be107d5eda6d57242f0fe7e49" }, "nvim-dap-virtual-text": { "branch": "master", "commit": "fbdb48c2ed45f4a8293d0d483f7730d24467ccb6" }, "nvim-dap-vscode-js": { "branch": "main", "commit": "03bd29672d7fab5e515fc8469b7d07cc5994bbf6" }, "nvim-early-retirement": { "branch": "main", "commit": "3b05315a61c8f01bb893249f9e044fc359122c9d" }, - "nvim-lspconfig": { "branch": "master", "commit": "81878de76c0de4ce289513734ad80c31ec7871b8" }, + "nvim-lspconfig": { "branch": "master", "commit": "a683e0ddf0cf64c6cd689e18ffb480ade3c162b7" }, "nvim-nio": { "branch": "master", "commit": "21f5324bfac14e22ba26553caf69ec76ae8a7662" }, "nvim-notify": { "branch": "master", "commit": "8701bece920b38ea289b457f902e2ad184131a5d" }, "nvim-python-repl": { "branch": "main", "commit": "09e77dcb9b44e28062a754f8019003bb88fe9734" }, "nvim-spectre": { "branch": "master", "commit": "72f56f7585903cd7bf92c665351aa585e150af0f" }, - "nvim-transparent": { "branch": "main", "commit": "8ac59883de84e9cd1850ea25cf087031c5ba7d54" }, "nvim-treesitter": { "branch": "master", "commit": "cf12346a3414fa1b06af75c79faebe7f76df080a" }, - "nvim-treesitter-context": { "branch": "master", "commit": "b0c45cefe2c8f7b55fc46f34e563bc428ef99636" }, + "nvim-treesitter-context": { "branch": "master", "commit": "b311b30818951d01f7b4bf650521b868b3fece16" }, "nvim-treesitter-endwise": { "branch": "master", "commit": "8fe8a95630f4f2c72a87ba1927af649e0bfaa244" }, "nvim-treesitter-textobjects": { "branch": "master", "commit": "5ca4aaa6efdcc59be46b95a3e876300cfead05ef" }, "nvim-ts-autotag": { "branch": "main", "commit": "88c1453db4ba7dd24131086fe51fdf74e587d275" }, - "nvim-web-devicons": { "branch": "master", "commit": "c72328a5494b4502947a022fe69c0c47e53b6aa6" }, + "nvim-web-devicons": { "branch": "master", "commit": "dfbfaa967a6f7ec50789bead7ef87e336c1fa63c" }, "oil-git-status.nvim": { "branch": "main", "commit": "a3e2ccb00cb8822115e28a9a1791eda051d940c9" }, "oil-image-preview.nvim": { "branch": "master", "commit": "a71eacc879e1264339a62019ee3c2ff376f2cc39" }, - "oil.nvim": { "branch": "master", "commit": "0fcc83805ad11cf714a949c98c605ed717e0b83e" }, + "oil.nvim": { "branch": "master", "commit": "b73018b75affd13fa38e2fc94ef753b465f770d7" }, "pathlib.nvim": { "branch": "main", "commit": "57e5598af6fe253761c1b48e0b59b7cd6699e2c1" }, "playground": { "branch": "master", "commit": "ba48c6a62a280eefb7c85725b0915e021a1a0749" }, "plenary.nvim": { "branch": "master", "commit": "74b06c6c75e4eeb3108ec01852001636d85a932b" }, - "refactoring.nvim": { "branch": "master", "commit": "f06ac3d457128f9d512103399b367c4be49a2421" }, + "refactoring.nvim": { "branch": "master", "commit": "7eaa150061ea18fdbe18fbb924d236e3ddccc57d" }, "rustaceanvim": { "branch": "master", "commit": "f69c85a955b9a83d495e3dc8d43adb6364a0b765" }, - "rustowl": { "branch": "main", "commit": "d0754681dc49d3bf78bf5fbb37846bbc63ad9215" }, - "smart-splits.nvim": { "branch": "master", "commit": "78b9d3bd21fe479690ae5e08a1bf3602698466d8" }, - "snacks.nvim": { "branch": "main", "commit": "ad9ede6a9cddf16cedbd31b8932d6dcdee9b716e" }, + "rustowl": { "branch": "main", "commit": "f7bdd868df2501acff029b2d85fa544ec66ef9b6" }, + "snacks.nvim": { "branch": "main", "commit": "882c996cf28183f4d63640de0b4c02ec886d01f2" }, "spinner.nvim": { "branch": "main", "commit": "67ae7f64a6a7940be10c226301413521da26ea72" }, - "telescope.nvim": { "branch": "master", "commit": "506338434fec5ad19cb1f8d45bf92d66c4917393" }, + "telescope.nvim": { "branch": "master", "commit": "9377230aa5305d9e9aca4ed8dadf1070fb4aa9fc" }, "todo-comments.nvim": { "branch": "main", "commit": "31e3c38ce9b29781e4422fc0322eb0a21f4e8668" }, "tree-sitter-norg": { "branch": "main", "commit": "d7edfaf89198aab652c7a1f0f818196efedaccfb" }, "tree-sitter-norg-meta": { "branch": "main", "commit": "729d4e54fb881ba0ddf0f925ec78401354c7c6db" }, - "treesj": { "branch": "main", "commit": "5fa4e7ba3517f8fe743bb4488f9e9c7ce83330fc" }, - "trouble.nvim": { "branch": "main", "commit": "bd67efe408d4816e25e8491cc5ad4088e708a69a" }, - "twilight.nvim": { "branch": "main", "commit": "664e752f4a219801265cc3fc18782b457b58c1e1" }, + "treesj": { "branch": "main", "commit": "79aedb401bbdc7e4202f7881eab5f6feb2105b0a" }, "undotree": { "branch": "master", "commit": "6fa6b57cda8459e1e4b2ca34df702f55242f4e4d" }, "vim-dispatch": { "branch": "master", "commit": "a2ff28abdb2d89725192db5b8562977d392a4d3f" }, "vim-dotenv": { "branch": "master", "commit": "5c51cfcf8d87280d6414e03cd6b253eb70ecb800" }, "vim-eunuch": { "branch": "master", "commit": "e86bb794a1c10a2edac130feb0ea590a00d03f1e" }, "vim-fugitive": { "branch": "master", "commit": "3b753cf8c6a4dcde6edee8827d464ba9b8c4a6f0" }, - "vim-illuminate": { "branch": "master", "commit": "0d1e93684da00ab7c057410fecfc24f434698898" }, "vim-jsdoc": { "branch": "master", "commit": "6e5bc2a1f98a69e4902081c9f5969b228a7a5fd6" }, - "vim-lastplace": { "branch": "master", "commit": "e58cb0df716d3c88605ae49db5c4741db8b48aa9" }, "vim-repeat": { "branch": "master", "commit": "65846025c15494983dafe5e3b46c8f88ab2e9635" }, "vim-rhubarb": { "branch": "master", "commit": "5496d7c94581c4c9ad7430357449bb57fc59f501" }, "vim-surround": { "branch": "master", "commit": "3d188ed2113431cf8dac77be61b842acb64433d9" }, - "vim-test": { "branch": "master", "commit": "bc0e94059de40641d163516a83c63bc45c716acf" }, - "vimtex": { "branch": "master", "commit": "0f42a5130432d4af2e6fd21fb93a76915ff1f090" }, + "vim-test": { "branch": "master", "commit": "2676d84c6901e484df00b5d728bd6a345d47ee12" }, + "vimtex": { "branch": "master", "commit": "fedb7ffc1bebf254cc74e7419c3a5930b6719065" }, "volt": { "branch": "main", "commit": "620de1321f275ec9d80028c68d1b88b409c0c8b1" }, - "which-key.nvim": { "branch": "main", "commit": "3aab2147e74890957785941f0c1ad87d0a44c15a" }, - "zen-mode.nvim": { "branch": "main", "commit": "8564ce6d29ec7554eb9df578efa882d33b3c23a7" } + "which-key.nvim": { "branch": "main", "commit": "3aab2147e74890957785941f0c1ad87d0a44c15a" } } diff --git a/lua/config/autocmds.lua b/lua/config/autocmds.lua index f9ce4da..ffb5d57 100644 --- a/lua/config/autocmds.lua +++ b/lua/config/autocmds.lua @@ -90,6 +90,24 @@ local function augroup(name) return vim.api.nvim_create_augroup("my_lazyvim_" .. name, { clear = true }) end +vim.api.nvim_create_autocmd("FileType", { + group = augroup "disable_treesitter_special_buffers", + pattern = { "oil", "snacks_notif" }, + callback = function(event) + pcall(vim.treesitter.stop, event.buf) + end, +}) + +-- Auto-ajustar la altura del quickfix a su contenido (reemplaza nvim-bqf auto_resize_height) +vim.api.nvim_create_autocmd("FileType", { + group = augroup "qf_autoresize", + pattern = "qf", + callback = function() + local height = math.max(1, math.min(10, vim.fn.line "$")) + vim.cmd("resize " .. height) + end, +}) + -- Set filetype for .env and .env.* files vim.api.nvim_create_autocmd({ "BufRead", "BufNewFile" }, { group = augroup "env_filetype", @@ -125,3 +143,37 @@ vim.api.nvim_create_autocmd({ "BufRead", "BufNewFile" }, { vim.opt_local.filetype = "embedded_template" end, }) + +vim.api.nvim_create_autocmd("User", { + pattern = { + "CodeCompanionToolApprovalRequested", + "CodeCompanionChatDone", + }, + callback = function(args) + local event = args.match + + local messages = { + CodeCompanionToolApprovalRequested = "Aprobación requerida", + CodeCompanionChatDone = "Respuesta lista", + } + + local msg = messages[event] or event + vim.fn.jobstart({ "notify-send", "-a", "CodeCompanion", "CodeCompanion", msg }) + end, +}) + + + +-- vim.api.nvim_create_autocmd("User", { +-- pattern = "CodeCompanion*", +-- callback = function(args) +-- local event = args.match +-- local line = os.date("%H:%M:%S") .. " " .. event .. "\n" +-- +-- local f = io.open("/tmp/codecompanionEvents.txt", "a") +-- if f then +-- f:write(line) +-- f:close() +-- end +-- end, +-- }) diff --git a/lua/config/direnv.lua b/lua/config/direnv.lua new file mode 100644 index 0000000..bc89e33 --- /dev/null +++ b/lua/config/direnv.lua @@ -0,0 +1,62 @@ +-- Integración nativa con direnv (reemplaza direnv/direnv.vim) +-- `direnv export json` emite el diff de variables a aplicar para el cwd actual; +-- las variables a eliminar llegan como null (vim.NIL). +local M = {} + +local function apply(env) + if type(env) ~= "table" then + return + end + for k, v in pairs(env) do + if v == vim.NIL then + vim.env[k] = nil + else + vim.env[k] = v + end + end +end + +local function load(sync) + if vim.fn.executable("direnv") == 0 then + return + end + if sync then + -- Carga inicial sincrónica: el entorno debe estar listo antes de los LSP. + local out = vim.fn.system({ "direnv", "export", "json" }) + if vim.v.shell_error ~= 0 or vim.trim(out) == "" then + return + end + local ok, env = pcall(vim.json.decode, out) + if ok then + apply(env) + end + else + vim.system({ "direnv", "export", "json" }, { text = true }, function(obj) + if obj.code ~= 0 then + return + end + local out = vim.trim(obj.stdout or "") + if out == "" then + return + end + local ok, env = pcall(vim.json.decode, out) + if ok then + vim.schedule(function() + apply(env) + end) + end + end) + end +end + +function M.setup() + vim.api.nvim_create_autocmd("DirChanged", { + group = vim.api.nvim_create_augroup("direnv", { clear = true }), + callback = function() + load(false) + end, + }) + load(true) +end + +return M diff --git a/lua/config/init.lua b/lua/config/init.lua index ee1c549..5da196b 100644 --- a/lua/config/init.lua +++ b/lua/config/init.lua @@ -19,6 +19,9 @@ if vim.fn.has "termguicolors" == 1 then end -- ===================================================== +-- Cargar entorno de direnv temprano (reemplaza direnv/direnv.vim) +require("config.direnv").setup() + -- autocmds and keymaps can wait to load vim.api.nvim_create_autocmd("User", { group = vim.api.nvim_create_augroup("LazyVim", { clear = true }), diff --git a/lua/config/keymaps.lua b/lua/config/keymaps.lua index 3b20175..c1e126e 100644 --- a/lua/config/keymaps.lua +++ b/lua/config/keymaps.lua @@ -32,6 +32,48 @@ map("n", "", ":cprevzz", { desc = "Goes to the previous item in the qui -- map("n", "o", ":lprevzz") map("n", "cc", ":cclose", { desc = "Close the quick fix list" }) +-- Toggle de diagnósticos en quickfix (reemplaza trouble.nvim) +map("n", "t", function() + local qf_open = false + for _, win in ipairs(vim.fn.getwininfo()) do + if win.quickfix == 1 then + qf_open = true + end + end + if qf_open then + vim.cmd "cclose" + else + vim.diagnostic.setqflist() + end +end, { desc = "Toggle diagnostics quickfix list" }) + +-- Navegación entre referencias del símbolo bajo el cursor (snacks.words; reemplaza vim-illuminate) +map("n", "]r", function() + Snacks.words.jump(1, true) +end, { desc = "Next Reference" }) +map("n", "[r", function() + Snacks.words.jump(-1, true) +end, { desc = "Previous Reference" }) + +-- Modo sin distracciones (reemplaza zen-mode.nvim) +map("n", "cz", function() + Snacks.zen() +end, { desc = "Distraction Free Mode" }) + +-- Git worktrees (reemplaza git-worktree.nvim) +map("n", "gt", function() + require("config.worktree").switch() +end, { desc = "Git Worktree switch" }) +map("n", "gn", function() + require("config.worktree").create() +end, { desc = "Git Worktree new branch" }) + +-- Redimensionar ventanas (reemplaza smart-splits.nvim) +map("n", "", "vertical resize -3", { desc = "Resize window: narrower" }) +map("n", "", "vertical resize +3", { desc = "Resize window: wider" }) +map("n", "", "resize +3", { desc = "Resize window: taller" }) +map("n", "", "resize -3", { desc = "Resize window: shorter" }) + map("n", "tc", ":TSContextToggle", { desc = "Toggle treesitter context" }) -- tabulation diff --git a/lua/config/usercmds.lua b/lua/config/usercmds.lua index e69de29..c9cf9f3 100644 --- a/lua/config/usercmds.lua +++ b/lua/config/usercmds.lua @@ -0,0 +1,15 @@ +-- Alternar la columna de color (reemplaza ecthelionvi/NeoColumn.nvim) +vim.api.nvim_create_user_command("ToggleColorColumn", function() + vim.opt_local.colorcolumn = vim.wo.colorcolumn == "" and "80" or "" +end, { desc = "Alternar colorcolumn (80)" }) + +-- Atenuar el código fuera del scope (reemplaza twilight.nvim con snacks.dim) +local dim_on = false +vim.api.nvim_create_user_command("Twilight", function() + dim_on = not dim_on + if dim_on then + Snacks.dim.enable() + else + Snacks.dim.disable() + end +end, { desc = "Toggle dim del scope (snacks)" }) diff --git a/lua/config/worktree.lua b/lua/config/worktree.lua new file mode 100644 index 0000000..dd4e837 --- /dev/null +++ b/lua/config/worktree.lua @@ -0,0 +1,59 @@ +-- Git worktrees nativos vía `git` + vim.ui (reemplaza ThePrimeagen/git-worktree.nvim). +-- vim.ui.select/input los provee Snacks, así que se elimina además una dependencia de telescope. +local M = {} + +local function git(args) + local res = vim.system(vim.list_extend({ "git" }, args), { text = true }):wait() + return res.code == 0, vim.trim(res.stdout or ""), vim.trim(res.stderr or "") +end + +function M.switch() + local ok, out = git { "worktree", "list", "--porcelain" } + if not ok then + vim.notify("No es un repositorio git con worktrees", vim.log.levels.WARN) + return + end + local trees = {} + for path in out:gmatch "worktree (.-)\n" do + table.insert(trees, path) + end + -- el último no termina en \n + local last = out:match "worktree ([^\n]+)$" + if last then + table.insert(trees, last) + end + if #trees == 0 then + vim.notify("Sin worktrees", vim.log.levels.WARN) + return + end + vim.ui.select(trees, { prompt = "Cambiar a worktree" }, function(choice) + if not choice then + return + end + vim.cmd("cd " .. vim.fn.fnameescape(choice)) + vim.notify("Worktree: " .. choice) + end) +end + +function M.create() + vim.ui.input({ prompt = "Nueva rama/worktree: " }, function(name) + if not name or name == "" then + return + end + local ok, root = git { "rev-parse", "--show-toplevel" } + if not ok then + vim.notify("No es un repositorio git", vim.log.levels.WARN) + return + end + local path = vim.fn.fnamemodify(root, ":h") .. "/" .. name + local cok, _, cerr = git { "worktree", "add", path, "-b", name } + if not cok then + vim.notify("Error al crear worktree: " .. cerr, vim.log.levels.ERROR) + return + end + vim.cmd("cd " .. vim.fn.fnameescape(path)) + vim.notify("Worktree creado: " .. path) + end) +end + +return M diff --git a/lua/pi/lsp/attach.lua b/lua/pi/lsp/attach.lua index 3611279..7030cbd 100644 --- a/lua/pi/lsp/attach.lua +++ b/lua/pi/lsp/attach.lua @@ -9,10 +9,7 @@ return function(client, bufnr) vim.keymap.set({ "n", "v" }, "vca", vim.lsp.buf.code_action, { buffer = 0, desc = "LSP Code actions" }) vim.keymap.set("n", "vf", function() return vim.lsp.buf.format { - async = true, - filter = function(cli) - return cli.name ~= "lua_ls" - end, + async = true } end, { buffer = 0, desc = "LSP format file" }) @@ -37,4 +34,6 @@ return function(client, bufnr) vim.lsp.inlay_hint.enable(true, { bufnr = bufnr }) end) end + -- El resaltado de referencias bajo el cursor lo provee snacks.words (snacks.lua), + -- y la navegación ]r/[r se define en config.keymaps. end diff --git a/lua/pi/lsp/init.lua b/lua/pi/lsp/init.lua index 31b5161..de6e95b 100644 --- a/lua/pi/lsp/init.lua +++ b/lua/pi/lsp/init.lua @@ -3,12 +3,12 @@ return { ops = vim.tbl_deep_extend("force", require "pi.lsp.default", ops) -- Configure LSP border for native LSP - vim.lsp.handlers["textDocument/hover"] = vim.lsp.with(vim.lsp.handlers.hover, { - border = "single", - }) - vim.lsp.handlers["textDocument/signatureHelp"] = vim.lsp.with(vim.lsp.handlers.signature_help, { - border = "single", - }) + local orig_open_floating_preview = vim.lsp.util.open_floating_preview + vim.lsp.util.open_floating_preview = function(contents, syntax, opts, ...) + opts = opts or {} + opts.border = opts.border or "single" + return orig_open_floating_preview(contents, syntax, opts, ...) + end local mason_servers = {} for server, options in pairs(ops.servers) do diff --git a/lua/pi/lsp/null-ls.lua b/lua/pi/lsp/null-ls.lua index d8211ed..eef6be6 100644 --- a/lua/pi/lsp/null-ls.lua +++ b/lua/pi/lsp/null-ls.lua @@ -11,7 +11,7 @@ null_ls.setup { null_ls.builtins.code_actions.refactoring, null_ls.builtins.formatting.alejandra, require "none-ls-luacheck.diagnostics.luacheck", - -- null_ls.builtins.formatting.stylua, + null_ls.builtins.formatting.stylua, require "none-ls.diagnostics.yamllint", -- require("none-ls.diagnostics.ruff"), diff --git a/lua/plugins/codecompanion.lua b/lua/plugins/codecompanion.lua index 90c78b8..7b805a7 100644 --- a/lua/plugins/codecompanion.lua +++ b/lua/plugins/codecompanion.lua @@ -129,24 +129,6 @@ return { log_level = "DEBUG", }, config = function() - -- Compatibility patch for recent CodeCompanion/Copilot model schemas - -- where `schema.model.choices` can be a function instead of a table. - local adapter_utils = require("codecompanion.utils.adapters") - adapter_utils.model_choice = function(adapter) - local model = adapter_utils.model(adapter) - local choices = adapter.schema.model.choices - - if type(choices) == "function" then - choices = choices(adapter, { async = false }) - end - - if type(choices) ~= "table" then - return nil - end - - return choices[model] - end - require("codecompanion").setup({ mcp = { servers = { @@ -169,6 +151,15 @@ return { }) end, }, + acp = { + claude_code = function() + return require("codecompanion.adapters").extend("claude_code", { + env = { + CLAUDE_CODE_OAUTH_TOKEN = "cmd:echo $CLAUDE_CODE_OAUTH_TOKEN", + }, + }) + end, + }, }, interactions = { chat = { @@ -214,29 +205,61 @@ return { }, -- adapter = "llama.cpp", adapter = { - name = "copilot", - model = "gpt-5-mini", + name ="claude_code", + -- model = "claude-opus-4-8", + -- model = "claude-sonnet-4-6", + model = "claude-haiku-4-5", }, + -- adapter = { + -- name = "copilot", + -- model = "gpt-4.1", + -- }, }, inline = { - -- adapter = "llama.cpp", adapter = { - name = "copilot", - model = "gpt-5-mini", + name ="claude_code", + model = "claude-haiku-4-5", + -- model = "claude-sonnet-4-6", }, + -- adapter = "llama.cpp", + -- adapter = { + -- name = "copilot", + -- model = "gpt-4.1", + -- }, }, cmd = { - -- adapter = "llama.cpp", adapter = { - name = "copilot", - model = "gpt-5-mini", + name ="claude_code", + model = "claude-haiku-4-5", + -- model = "claude-sonnet-4-6", }, + -- adapter = "llama.cpp", + -- adapter = { + -- name = "copilot", + -- model = "gpt-4.1", + -- }, }, background = { - -- adapter = "llama.cpp" adapter = { - name = "copilot", - model = "gpt-5-mini", + name ="claude_code", + model = "claude-haiku-4-5", + -- model = "claude-sonnet-4-6", + }, + -- adapter = "llama.cpp" + -- adapter = { + -- name = "copilot", + -- model = "gpt-4.1", + -- }, + }, + cli = { + agent = "claude_code", + agents = { + claude_code = { + cmd = "claude", + args = {}, + description = "Claude Code CLI", + provider = "terminal", + }, }, }, }, diff --git a/lua/plugins/comment.lua b/lua/plugins/comment.lua deleted file mode 100644 index 801223b..0000000 --- a/lua/plugins/comment.lua +++ /dev/null @@ -1,5 +0,0 @@ -return { - "numToStr/Comment.nvim", - keys = { { "gcc", desc = "Comment current line" }, { "gc", mode = "v", desc = "Comment selected text" } }, - config = true, -} diff --git a/lua/plugins/direnv.lua b/lua/plugins/direnv.lua deleted file mode 100644 index df3d01d..0000000 --- a/lua/plugins/direnv.lua +++ /dev/null @@ -1,5 +0,0 @@ -return { - "direnv/direnv.vim", - lazy = false, - priority = 900, -} diff --git a/lua/plugins/dressing.lua b/lua/plugins/dressing.lua deleted file mode 100644 index 188453b..0000000 --- a/lua/plugins/dressing.lua +++ /dev/null @@ -1,205 +0,0 @@ -return { - "stevearc/dressing.nvim", - event = "VeryLazy", - opts = { - -- ===================================================== - -- Input Configuration - Enhanced vim.ui.input - -- ===================================================== - input = { - enabled = true, - default_prompt = "󰘳 Input:", - prompt_align = "center", - insert_only = true, - start_in_insert = true, - - -- ========== Window Styling ========== - border = "rounded", - relative = "editor", - - -- ========== Size Configuration ========== - prefer_width = 50, - width = nil, - max_width = { 140, 0.8 }, - min_width = { 30, 0.3 }, - - -- ========== Window Options ========== - win_options = { - winblend = 0, -- No transparency for better readability - wrap = false, - cursorline = true, - cursorlineopt = "both", - -- Better highlighting - winhighlight = "Normal:Normal,FloatBorder:FloatBorder,CursorLine:PmenuSel", - }, - - -- ========== Enhanced Key Mappings ========== - mappings = { - n = { - [""] = "Close", - [""] = "Confirm", - ["q"] = "Close", - [""] = "Close", - }, - i = { - [""] = "Close", - [""] = "Confirm", - [""] = "HistoryPrev", - [""] = "HistoryNext", - [""] = "HistoryPrev", - [""] = "HistoryNext", - [""] = function() vim.api.nvim_del_current_line() end, - [""] = "Close", - }, - }, - - -- ========== Custom Configuration Function ========== - get_config = function(opts) - -- Customize based on prompt type - if opts.prompt and opts.prompt:find("rename", 1, true) then - return { - relative = "cursor", - row = 1, - col = 0, - } - end - -- For file operations, make window larger - if opts.prompt and (opts.prompt:find("file", 1, true) or opts.prompt:find("path", 1, true)) then - return { - prefer_width = 80, - } - end - end, - }, - - -- ===================================================== - -- Select Configuration - Enhanced vim.ui.select - -- ===================================================== - select = { - enabled = true, -- Enable for better selection UI - - -- ========== Backend Priority ========== - backend = { "telescope", "builtin", "nui" }, - trim_prompt = true, - - -- ========== Telescope Integration ========== - telescope = require('telescope.themes').get_dropdown({ - layout_config = { - width = 0.6, - height = 0.6, - }, - borderchars = { - prompt = { "─", "│", " ", "│", "┌", "┐", "│", "│" }, - results = { "─", "│", "─", "│", "├", "┤", "┘", "└" }, - preview = { "─", "│", "─", "│", "┌", "┐", "┘", "└" }, - }, - }), - - -- ========== FZF Configuration ========== - fzf = { - window = { - width = 0.7, - height = 0.6, - }, - }, - - -- ========== NUI Configuration ========== - nui = { - position = "50%", - size = nil, - relative = "editor", - border = { - style = "rounded", - text = { - top = " Select ", - top_align = "center", - }, - }, - buf_options = { - swapfile = false, - filetype = "DressingSelect", - }, - win_options = { - winblend = 0, - winhighlight = "Normal:Normal,FloatBorder:FloatBorder,CursorLine:PmenuSel", - }, - max_width = 100, - max_height = 50, - min_width = 50, - min_height = 15, - }, - - -- ========== Built-in Selector Configuration ========== - builtin = { - border = "rounded", - relative = "editor", - - -- ========== Enhanced Window Options ========== - win_options = { - winblend = 0, - cursorline = true, - winhighlight = "Normal:Normal,FloatBorder:FloatBorder,CursorLine:PmenuSel", - }, - - -- ========== Size Configuration ========== - width = nil, - max_width = { 120, 0.8 }, - min_width = { 50, 0.4 }, - height = nil, - max_height = 0.8, - min_height = { 15, 0.3 }, - - -- ========== Enhanced Key Mappings ========== - mappings = { - [""] = "Close", - [""] = "Close", - [""] = "Confirm", - ["q"] = "Close", - ["j"] = "Next", - ["k"] = "Prev", - [""] = "Next", - [""] = "Prev", - [""] = "Next", - [""] = "Prev", - }, - }, - - -- ========== Format Item Override ========== - format_item_override = { - -- Add icons for common items - codeaction = function(action_tuple) - local title = action_tuple[2].title:gsub("\r\n", "\\r\\n") - local client = action_tuple[1] - return string.format(" %s - %s", title, client) - end, - }, - - -- ========== Dynamic Configuration ========== - get_config = function(opts) - -- For code actions, use telescope if available - if opts.kind == "codeaction" then - return { - backend = { "telescope", "builtin" }, - telescope = require('telescope.themes').get_cursor({ - layout_config = { - width = 0.6, - height = 0.4, - }, - }), - } - end - - -- For LSP references/definitions, prefer telescope - if opts.kind == "references" or opts.kind == "definitions" then - return { - backend = { "telescope" }, - } - end - - -- For simple selections, use builtin - return { - backend = { "builtin", "telescope" }, - } - end, - }, - }, -} diff --git a/lua/plugins/image.lua b/lua/plugins/image.lua deleted file mode 100644 index edd938f..0000000 --- a/lua/plugins/image.lua +++ /dev/null @@ -1,24 +0,0 @@ - -return { - "3rd/image.nvim", - opts = { - backend = "sixel", - max_width = nil, - max_height = nil, - max_width_window_percentage = nil, - max_height_window_percentage = nil, - window_overlap_clear_enabled = true, - window_overlap_clear_ft_ignore = { "cmp_menu", "cmp_docs", "notify", "noice", "lazy", "mason", "oil_list", "TelescopePrompt" }, - editor_only_render_when_focused = true, - tmux_show_only_in_active_window = true, - render = { - debounce_ms = 10, - show_label = true, - label_align = "center", - label_format = "[image.nvim] %s", - foreground_color = true, - background_color = true, - }, - integrations = {}, - }, -} diff --git a/lua/plugins/indent-blankline.lua b/lua/plugins/indent-blankline.lua deleted file mode 100644 index 08fc717..0000000 --- a/lua/plugins/indent-blankline.lua +++ /dev/null @@ -1,5 +0,0 @@ -return { - "lukas-reineke/indent-blankline.nvim", - main = "ibl", - opts = {} -} diff --git a/lua/plugins/luarocks.lua b/lua/plugins/luarocks.lua deleted file mode 100644 index c8dfe6c..0000000 --- a/lua/plugins/luarocks.lua +++ /dev/null @@ -1,5 +0,0 @@ -return { - "vhyrro/luarocks.nvim", - priority = 1000, -- Very high priority is required, luarocks.nvim should run as the first plugin in your config. - config = true, -} diff --git a/lua/plugins/neocolumn.lua b/lua/plugins/neocolumn.lua deleted file mode 100644 index f02b5b5..0000000 --- a/lua/plugins/neocolumn.lua +++ /dev/null @@ -1,5 +0,0 @@ -return { - "ecthelionvi/NeoColumn.nvim", - opts = {}, - cmd = { "ToggleNeoColumn" }, -} diff --git a/lua/plugins/noice.lua b/lua/plugins/noice.lua index 033db3c..57dd934 100644 --- a/lua/plugins/noice.lua +++ b/lua/plugins/noice.lua @@ -233,7 +233,6 @@ return { any = { { event = "msg_show", find = "lines yanked" }, { event = "msg_show", find = "more lines" }, - { event = "msg_show", find = "direnv:" }, { find = "laravel.sail." }, { find = "Pattern not found" }, { event = "msg_show", kind = "", find = "change;" }, diff --git a/lua/plugins/nvim-bqf.lua b/lua/plugins/nvim-bqf.lua deleted file mode 100644 index 5de7214..0000000 --- a/lua/plugins/nvim-bqf.lua +++ /dev/null @@ -1,10 +0,0 @@ -return { - 'kevinhwang91/nvim-bqf', - ft = 'qf', - opts = { - auto_resize_height = true, - preview = { - wrap = true, - }, - }, - } diff --git a/lua/plugins/smart-splits.lua b/lua/plugins/smart-splits.lua deleted file mode 100644 index 57faedb..0000000 --- a/lua/plugins/smart-splits.lua +++ /dev/null @@ -1,34 +0,0 @@ -return { - "mrjones2014/smart-splits.nvim", - config = true, - keys = { - { - "", - function() - require("smart-splits").resize_left() - end, - desc = "Resize window left +10", - }, - { - "", - function() - require("smart-splits").resize_down() - end, - desc = "Resize window down +10", - }, - { - "", - function() - require("smart-splits").resize_up() - end, - desc = "Resize window up +10", - }, - { - "", - function() - require("smart-splits").resize_right() - end, - desc = "Resize window right +10", - }, - }, -} diff --git a/lua/plugins/snacks.lua b/lua/plugins/snacks.lua index c6b63b3..6fa90e8 100644 --- a/lua/plugins/snacks.lua +++ b/lua/plugins/snacks.lua @@ -12,7 +12,7 @@ return { notifier = { enabled = true }, picker = { enabled = true, - ui_select = false, + ui_select = true, jump = { reuse_win = true, }, diff --git a/lua/plugins/transparent.lua b/lua/plugins/transparent.lua deleted file mode 100644 index e8a6939..0000000 --- a/lua/plugins/transparent.lua +++ /dev/null @@ -1,5 +0,0 @@ -return { - "xiyaowong/nvim-transparent", - lazy = false, - config = true, -} diff --git a/lua/plugins/treesitter.lua b/lua/plugins/treesitter.lua index 80f98cf..aa17471 100644 --- a/lua/plugins/treesitter.lua +++ b/lua/plugins/treesitter.lua @@ -29,7 +29,10 @@ return { 'TSPlaygroundToggle', }, opts = { - endwise = { enable = true }, + endwise = { + enable = true, + disable = { "markdown", "markdown_inline" }, + }, auto_install = true, ensure_installed = { "bash", @@ -68,6 +71,10 @@ return { }, highlight = { enable = true, + disable = function(_, buf) + local ft = vim.bo[buf].filetype + return ft == "oil" or ft == "snacks_notif" + end, additional_vim_regex_highlighting = { "org" }, }, playground = { @@ -83,6 +90,7 @@ return { }, indent = { enable = true, + disable = { "oil", "snacks_notif" }, }, textobjects = { select = { @@ -125,6 +133,15 @@ return { } }) + -- Reuse markdown parser for plugin-specific scratch buffers. + vim.treesitter.language.register("markdown", "codecompanion") + vim.treesitter.language.register("markdown", "snacks_notif") + vim.treesitter.language.register("markdown", "oil") + + -- Some markdown injections generated by external plugins can point to + -- placeholder languages and crash parser injection resolution. + pcall(vim.treesitter.query.set, "markdown", "injections", "") + require(plug.main).setup(config); end, } diff --git a/lua/plugins/trouble.lua b/lua/plugins/trouble.lua deleted file mode 100644 index 5a87f26..0000000 --- a/lua/plugins/trouble.lua +++ /dev/null @@ -1,7 +0,0 @@ -return { - "folke/trouble.nvim", - enabled = true, - dependencies = "kyazdani42/nvim-web-devicons", - keys = { { "t", "TroubleToggle", desc = "Trouble toggle" } }, - config = true, -} diff --git a/lua/plugins/twilight.lua b/lua/plugins/twilight.lua deleted file mode 100644 index 144111f..0000000 --- a/lua/plugins/twilight.lua +++ /dev/null @@ -1,5 +0,0 @@ -return { - "folke/twilight.nvim", - cmd = { "Twilight" }, - config = true, -} diff --git a/lua/plugins/vim-illuminate.lua b/lua/plugins/vim-illuminate.lua deleted file mode 100644 index 9ed467e..0000000 --- a/lua/plugins/vim-illuminate.lua +++ /dev/null @@ -1,21 +0,0 @@ -return - { - 'RRethy/vim-illuminate', - event = 'LspAttach', - keys = { - { - desc = 'Next Reference', - ']r', - function() require('illuminate').goto_next_reference() end, - }, - { - desc = 'Previous Reference', - '[r', - function() require('illuminate').goto_prev_reference() end, - }, - }, - opts = { - providers = { 'lsp' }, - }, - config = function(_, opts) require('illuminate').configure(opts) end, - } diff --git a/lua/plugins/vim-lastplace.lua b/lua/plugins/vim-lastplace.lua deleted file mode 100644 index 3de39ec..0000000 --- a/lua/plugins/vim-lastplace.lua +++ /dev/null @@ -1,4 +0,0 @@ -return { - 'farmergreg/vim-lastplace', - event = 'BufReadPre', - } diff --git a/lua/plugins/worktree.lua b/lua/plugins/worktree.lua deleted file mode 100644 index 9e74a9c..0000000 --- a/lua/plugins/worktree.lua +++ /dev/null @@ -1,23 +0,0 @@ -return { - "ThePrimeagen/git-worktree.nvim", - keys = { - { - "gt", - function() - require("telescope").extensions.git_worktree.git_worktrees() - end, - desc = "Git Worktree switch", - }, - { - "gn", - function() - require("telescope").extensions.git_worktree.create_git_worktree() - end, - desc = "Git Worktree new branch", - }, - }, - config = function() - require("git-worktree").setup {} - require("telescope").load_extension "git_worktree" - end, -} diff --git a/lua/plugins/zenmode.lua b/lua/plugins/zenmode.lua deleted file mode 100644 index a6922c6..0000000 --- a/lua/plugins/zenmode.lua +++ /dev/null @@ -1,44 +0,0 @@ --- Calculate min width of the window should be 70% of the editor width or 90 columns --- whichever is smaller -local function zen_mode_width() - local width = vim.api.nvim_win_get_width(0) - local min_width = math.max(width * 0.70, 90) - return math.min(width, min_width) -end - -return { - { - "folke/zen-mode.nvim", - cmd = { "ZenMode" }, - opts = { - window = { - width = zen_mode_width(), - }, - plugins = { - options = { - enabled = true, - ruler = false, -- disables the ruler text in the cmd line area - showcmd = false, -- disables the command in the last line of the screen - laststatus = 0, -- turn off the statusline in zen mode - }, - -- NOTE: Those options are disables by default, change to enabled = true to enable - gitsigns = { enabled = false }, -- disables git signs - tmux = { enabled = false }, -- disables the tmux statusline - -- NOTE: Need to add to wezterm config https://github.com/folke/zen-mode.nvim#wezterm - wezterm = { - enabled = false, - font = "+1", -- +1 font size or fixed size, e.g. 21 - }, - }, - }, - config = true, - keys = { - -- add cz to enter zen mode - { - "cz", - "ZenMode", - desc = "Distraction Free Mode", - }, - }, - }, -} -- cgit v1.2.3