From 33aec2f252d4767b1227f20ab6a6ce276b609478 Mon Sep 17 00:00:00 2001 From: Daniel Heras Quesada Date: Tue, 10 Jun 2025 08:10:01 +0200 Subject: [PATCH] feat: major plugin cleanup --- README.md | 1 + lazy-lock.json | 32 ++--- lua/config/autocmds.lua | 5 +- lua/config/init.lua | 2 +- lua/config/remap.lua | 11 +- lua/plugins/code-utils.lua | 109 +++++++++--------- lua/plugins/collections.lua | 74 ++++++------ lua/plugins/help.lua | 32 ++--- lua/plugins/opts/lualine.lua | 2 - .../opts/{which-key.lua => whichKey.lua} | 0 lua/plugins/style.lua | 1 + 11 files changed, 128 insertions(+), 141 deletions(-) rename lua/plugins/opts/{which-key.lua => whichKey.lua} (100%) diff --git a/README.md b/README.md index 64e2cac..57fd9ab 100644 --- a/README.md +++ b/README.md @@ -9,6 +9,7 @@ This list is arbitrary and will depend on the current state of the lsp folder: - `# pacman -S lua-language-server bash-language-server typescript-language-server vscode-html-language-server vscode-css-language-server pyright-langserver gopls astro-ls jdtls rust-analyzer solargraph vue-language-server vscode-json-languageserver` +- `$ yay -S jdtls ruby-solargraph` - `# npm i -g emmet-language-server emmet-ls @astrojs/language-server` ## Relevant docs diff --git a/lazy-lock.json b/lazy-lock.json index ccaf2cd..1ca5b7e 100644 --- a/lazy-lock.json +++ b/lazy-lock.json @@ -1,41 +1,29 @@ { "Comment.nvim": { "branch": "master", "commit": "e30b7f2008e52442154b66f7c519bfd2f1e32acb" }, - "LuaSnip": { "branch": "master", "commit": "faf3c94a44508cec1b961406d36cc65113ff3b98" }, - "aerial.nvim": { "branch": "master", "commit": "2e00d1d4248f08dddfceacb8d2996e51e13e00f6" }, + "aerial.nvim": { "branch": "master", "commit": "5c0df1679bf7c814c924dc6646cc5291daca8363" }, "auto-session": { "branch": "main", "commit": "00334ee24b9a05001ad50221c8daffbeedaa0842" }, - "autoclose.nvim": { "branch": "main", "commit": "b2077aa2c83df7ebc19b2a20a3a0654b24ae9c8f" }, + "blink.cmp": { "branch": "main", "commit": "022521a8910a5543b0251b21c9e1a1e989745796" }, "blueprints": { "branch": "main", "commit": "e5825c30464f98e77e8b5ffb88d59fd98df6c802" }, "bufferline.nvim": { "branch": "main", "commit": "655133c3b4c3e5e05ec549b9f8cc2894ac6f51b3" }, - "cmp-buffer": { "branch": "main", "commit": "b74fab3656eea9de20a9b8116afa3cfc4ec09657" }, - "cmp-cmdline": { "branch": "main", "commit": "d126061b624e0af6c3a556428712dd4d4194ec6d" }, - "cmp-emoji": { "branch": "main", "commit": "e8398e2adf512a03bb4e1728ca017ffeac670a9f" }, - "cmp-nvim-lsp": { "branch": "main", "commit": "a8912b88ce488f411177fc8aed358b04dc246d7b" }, - "cmp-path": { "branch": "main", "commit": "c6635aae33a50d6010bf1aa756ac2398a2d54c32" }, - "cmp_luasnip": { "branch": "master", "commit": "98d9cb5c2c38532bd9bdb481067b20fea8f32e90" }, - "conform.nvim": { "branch": "master", "commit": "6feb2f28f9a9385e401857b21eeac3c1b66dd628" }, + "conform.nvim": { "branch": "master", "commit": "8132ec733eed3bf415b97b76797ca41b59f51d7d" }, "diffview.nvim": { "branch": "main", "commit": "4516612fe98ff56ae0415a259ff6361a89419b0a" }, "flash.nvim": { "branch": "main", "commit": "3c942666f115e2811e959eabbdd361a025db8b63" }, - "friendly-snippets": { "branch": "main", "commit": "572f5660cf05f8cd8834e096d7b4c921ba18e175" }, - "gitsigns.nvim": { "branch": "main", "commit": "8bdaccdb897945a3c99c1ad8df94db0ddf5c8790" }, + "gitsigns.nvim": { "branch": "main", "commit": "d0f90ef51d4be86b824b012ec52ed715b5622e51" }, "indent-blankline.nvim": { "branch": "master", "commit": "005b56001b2cb30bfa61b7986bc50657816ba4ba" }, "lazy.nvim": { "branch": "main", "commit": "6c3bda4aca61a13a9c63f1c1d1b16b9d3be90d7a" }, - "lualine.nvim": { "branch": "master", "commit": "0c6cca9f2c63dadeb9225c45bc92bb95a151d4af" }, - "neo-tree.nvim": { "branch": "main", "commit": "3f1dd2de5045659e00bfbe27c8aca3b52c1fdbde" }, - "no-neck-pain.nvim": { "branch": "main", "commit": "c824c54d837160ac32d0f877574ccfa2ecce9947" }, + "lualine.nvim": { "branch": "master", "commit": "a94fc68960665e54408fe37dcf573193c4ce82c9" }, + "mini.icons": { "branch": "main", "commit": "397ed3807e96b59709ef3292f0a3e253d5c1dc0a" }, + "neo-tree.nvim": { "branch": "main", "commit": "e01ca7de8e6dbc6118bcb12c4cbe1f88162a337f" }, + "no-neck-pain.nvim": { "branch": "main", "commit": "ecdfe60f23134089fac92659e688b65fdd8b5cc0" }, "noice.nvim": { "branch": "main", "commit": "0427460c2d7f673ad60eb02b35f5e9926cf67c59" }, - "nui.nvim": { "branch": "main", "commit": "7cd18e73cfbd70e1546931b7268b3eebaeff9391" }, - "nvim-cmp": { "branch": "main", "commit": "b5311ab3ed9c846b585c0c15b7559be131ec4be9" }, + "nui.nvim": { "branch": "main", "commit": "de740991c12411b663994b2860f1a4fd0937c130" }, "nvim-colorizer.lua": { "branch": "master", "commit": "a065833f35a3a7cc3ef137ac88b5381da2ba302e" }, - "nvim-lspconfig": { "branch": "master", "commit": "b8e7957bde4cbb3cb25a13a62548f7c273b026e9" }, "nvim-treesitter": { "branch": "master", "commit": "42fc28ba918343ebfd5565147a42a26580579482" }, - "nvim-treesitter-context": { "branch": "master", "commit": "ed1cf48d5af252248c55f50b9427e8ce883a2c6b" }, - "nvim-ts-autotag": { "branch": "main", "commit": "a1d526af391f6aebb25a8795cbc05351ed3620b5" }, "nvim-web-devicons": { "branch": "master", "commit": "1fb58cca9aebbc4fd32b086cb413548ce132c127" }, "nvim-window-picker": { "branch": "main", "commit": "6382540b2ae5de6c793d4aa2e3fe6dbb518505ec" }, "plenary.nvim": { "branch": "master", "commit": "857c5ac632080dba10aae49dba902ce3abf91b35" }, "scope.nvim": { "branch": "main", "commit": "6b4208f017da9b122d69ddc5841e040dffe7313c" }, - "smear-cursor.nvim": { "branch": "main", "commit": "162703638203060b1d3412e73429d232bbd2627e" }, - "snacks.nvim": { "branch": "main", "commit": "bc0630e43be5699bb94dadc302c0d21615421d93" }, + "smear-cursor.nvim": { "branch": "main", "commit": "aff844fc1483fd673f721a41affcd7e2fcb885f5" }, "telescope-fzf-native.nvim": { "branch": "main", "commit": "1f08ed60cafc8f6168b72b80be2b2ea149813e55" }, "telescope-git-file-history.nvim": { "branch": "master", "commit": "e7d495319f2a04df96402057a6992ea970f8914d" }, "telescope.nvim": { "branch": "master", "commit": "b4da76be54691e854d3e0e02c36b0245f945c2c7" }, diff --git a/lua/config/autocmds.lua b/lua/config/autocmds.lua index 848024d..775c632 100644 --- a/lua/config/autocmds.lua +++ b/lua/config/autocmds.lua @@ -1,4 +1,6 @@ -vim.api.nvim_create_autocmd("ModeChanged", { +local autocmd = vim.api.nvim_create_autocmd + +autocmd("ModeChanged", { callback = function(opts) require("lualine").refresh() end, @@ -8,4 +10,3 @@ vim.api.nvim_create_autocmd("CursorMoved", { require("lualine").refresh() end, }) - diff --git a/lua/config/init.lua b/lua/config/init.lua index edc7423..bc299de 100644 --- a/lua/config/init.lua +++ b/lua/config/init.lua @@ -1,4 +1,4 @@ +require("config.lsp") require("config.autocmds") require("config.remap") require("config.lazy") -require("config.lsp") diff --git a/lua/config/remap.lua b/lua/config/remap.lua index 44518f1..4963b35 100644 --- a/lua/config/remap.lua +++ b/lua/config/remap.lua @@ -2,11 +2,9 @@ vim.g.mapleader = " " local map = vim.keymap.set ---- Bufferline ---- - map("n", "bg", "BufferLinePick") map("n", "bpx", "BufferLinePickClose") -map("n", "box", "BufferLineCloseOthers") -map("n", "", "BufferLineCycleNext") +map("n", "box", "BufferLineCloseOthers") map("n", "", "BufferLineCycleNext") map("n", "", "BufferLineCyclePrev") map("n", "bsd", "BufferLineSortByDirectory") map("n", "bse", "BufferLineSortByExtension") @@ -18,17 +16,14 @@ map("n", "", "BufferLineMoveNext", { desc = "Move buffer to right" map("n", "[b", "bprevious", { desc = "Prev Buffer" }) map("n", "]b", "bnext", { desc = "Next Buffer" }) map("n", "bd", function() - Snacks.bufdelete() -end, { desc = "Delete Buffer" }) -map("n", "x", function() - Snacks.bufdelete() + -- Snacks.bufdelete() end, { desc = "Delete Buffer" }) -- cant have C-w to delete buffer since in being used to navigate windows -- map("n", "", function() -- Snacks.bufdelete() -- end, { desc = "Go to Left Window", remap = true }) map("n", "", function() - Snacks.bufdelete() + -- Snacks.bufdelete() end, { desc = "Delete Buffer" }) map("n", "bD", ":bd", { desc = "Delete Buffer and Window" }) -- tabpages diff --git a/lua/plugins/code-utils.lua b/lua/plugins/code-utils.lua index ca16a37..feb8ac4 100644 --- a/lua/plugins/code-utils.lua +++ b/lua/plugins/code-utils.lua @@ -14,65 +14,68 @@ return { }, -- To test if TreeSitter is working -- "nvim-treesitter/playground", - { - "nvim-treesitter/nvim-treesitter-context", - opts = function() - return require("plugins.opts.treesitterContext") - end, - }, + -- { + -- "nvim-treesitter/nvim-treesitter-context", + -- opts = function() + -- return require("plugins.opts.treesitterContext") + -- end, + -- }, -- │ Completion │ { - "hrsh7th/nvim-cmp", - enabled = true, - dependencies = { - "hrsh7th/cmp-emoji", - "hrsh7th/cmp-buffer", - "hrsh7th/cmp-emoji", - "hrsh7th/cmp-nvim-lsp", - "hrsh7th/cmp-cmdline", - "hrsh7th/cmp-path", + 'saghen/blink.cmp', + -- dependencies = { 'rafamadriz/friendly-snippets' }, + version = '1.*', + opts = { + -- All presets have the following mappings: + -- C-space: Open menu or open docs if already open + -- C-n/C-p or Up/Down: Select next/previous item + -- C-e: Hide menu + -- C-k: Toggle signature help (if signature.enabled = true) + keymap = { preset = 'default' }, + appearance = { + nerd_font_variant = 'mono' }, - opts = function() - return require("plugins.opts.cmp") - end, - }, - - { - "L3MON4D3/LuaSnip", - build = "make install_jsregexp", - dependencies = { "rafamadriz/friendly-snippets" }, - }, - { - "saadparwaiz1/cmp_luasnip", - dependencies = { - "hrsh7th/nvim-cmp", + -- (Default) Only show the documentation popup when manually triggered + completion = { documentation = { auto_show = false } }, + -- Default list of enabled providers defined so that you can extend it + -- elsewhere in your config, without redefining it, due to `opts_extend` + sources = { + default = { 'lsp', 'path', 'snippets', 'buffer' }, }, + fuzzy = { implementation = "prefer_rust_with_warning" } + }, + opts_extend = { "sources.default" } }, - - -- │ Auto close │ - { - "m4xshen/autoclose.nvim", - }, - - { - "windwp/nvim-ts-autotag", - config = function(_, opts) - require('nvim-ts-autotag').setup({ - opts = { - enable_close = true, -- Auto close tags - enable_rename = true, -- Auto rename pairs of tags - enable_close_on_slash = false -- Auto close on trailing ?", - function() - require("which-key").show({ global = false }) - end, - desc = "Buffer Local Keymaps (which-key)", - }, - }, - } +-- { +-- "folke/which-key.nvim", +-- event = "VeryLazy", +-- opts = function() +-- return require("plugins.opts.whichKey") +-- end, +-- keys = { +-- { +-- "?", +-- function() +-- require("which-key").show({ global = false }) +-- end, +-- desc = "Buffer Local Keymaps (which-key)", +-- }, +-- }, +-- } } diff --git a/lua/plugins/opts/lualine.lua b/lua/plugins/opts/lualine.lua index 9d4569a..e314ec3 100644 --- a/lua/plugins/opts/lualine.lua +++ b/lua/plugins/opts/lualine.lua @@ -2,8 +2,6 @@ local options = { options = { icons_enabled = true, theme = "auto", - -- component_separators = { left = "", right = "" }, - -- section_separators = { left = "", right = "" }, component_separators = { left = "╎", right = "╎" }, section_separators = { left = "┃", right = "┃" }, disabled_filetypes = { diff --git a/lua/plugins/opts/which-key.lua b/lua/plugins/opts/whichKey.lua similarity index 100% rename from lua/plugins/opts/which-key.lua rename to lua/plugins/opts/whichKey.lua diff --git a/lua/plugins/style.lua b/lua/plugins/style.lua index ef20362..8b8ac20 100644 --- a/lua/plugins/style.lua +++ b/lua/plugins/style.lua @@ -11,6 +11,7 @@ return { variant = "darker", -- dark, light, darker }, }, + { "echasnovski/mini.icons" }, { "folke/noice.nvim", event = "VeryLazy",