From d3e2ea602e4d6c0ac7ed6abbc624ac375a3e01fc Mon Sep 17 00:00:00 2001 From: Daniel Heras Quesada Date: Sat, 11 Jul 2026 23:06:11 +0200 Subject: [PATCH] feat: plugin cleanup --- init.lua | 2 +- lazy-lock.json | 3 +- lua/config/remap.lua | 7 +++- lua/plugins/edit.lua | 56 +------------------------ lua/plugins/git.lua | 5 --- lua/plugins/opts/cmp.lua | 83 -------------------------------------- lua/plugins/opts/noice.lua | 81 ------------------------------------- lua/plugins/preview.lua | 2 +- lua/plugins/qol.lua | 2 + lua/plugins/style.lua | 31 ++++---------- 10 files changed, 20 insertions(+), 252 deletions(-) delete mode 100644 lua/plugins/opts/cmp.lua delete mode 100644 lua/plugins/opts/noice.lua diff --git a/init.lua b/init.lua index 572fff3..af776f6 100644 --- a/init.lua +++ b/init.lua @@ -25,7 +25,7 @@ vim.o.sessionoptions = "blank,buffers,curdir,folds,help,tabpages,winsize,winpos, -- ╭─────────────╮ -- │ Colorscheme │ -- ╰─────────────╯ -vim.cmd("colorscheme rose-pine") -- rose-pine, gruvbox, koda-{dark/light/moss/glade}, komau +vim.cmd("colorscheme komau") -- rose-pine, gruvbox, koda-{dark/light/moss/glade}, komau vim.o.background = "dark" -- "dark" or "light" -- ╭───────────────────╮ diff --git a/lazy-lock.json b/lazy-lock.json index 994b6d8..6b8bd3d 100644 --- a/lazy-lock.json +++ b/lazy-lock.json @@ -22,9 +22,8 @@ "multiple-cursors.nvim": { "branch": "main", "commit": "1ac15d047a4b265cc2389957bcc56ee561b29e02" }, "neo-tree.nvim": { "branch": "main", "commit": "b01ee1769144c4491ea44bc329cb84040e9793be" }, "no-neck-pain.nvim": { "branch": "main", "commit": "434fed70b1ee553f8f27e6da7b3899f71b3c6f99" }, - "noice.nvim": { "branch": "main", "commit": "7bfd942445fb63089b59f97ca487d605e715f155" }, "nui.nvim": { "branch": "main", "commit": "de740991c12411b663994b2860f1a4fd0937c130" }, - "nvim-colorizer.lua": { "branch": "master", "commit": "664c0b7cea1de71f8b65dfe951b7996fc3e6ccde" }, + "nvim-colorizer.lua": { "branch": "master", "commit": "149fbd9f5e25511b0a8bad3ccecd43d1bc584f86" }, "nvim-lint": { "branch": "master", "commit": "a219b2c9e5b4765e5c845aba119dad55806fcaf1" }, "nvim-scrollbar": { "branch": "main", "commit": "f8e87b96cd6362ef8579be456afee3b38fd7e2a8" }, "nvim-treesitter": { "branch": "master", "commit": "cf12346a3414fa1b06af75c79faebe7f76df080a" }, diff --git a/lua/config/remap.lua b/lua/config/remap.lua index c9cc45a..10fb78a 100644 --- a/lua/config/remap.lua +++ b/lua/config/remap.lua @@ -48,6 +48,8 @@ map("n", "ct", "lua require('blueprints').createFromTemplateTelesco ---- Git ---- map("n", "gb", "Gitsigns blame", { desc = "Git blame" }) +map("n", "ghr", "Gitsigns reset_hunk", { desc = "Git next change" }) +map("n", "gha", "Gitsigns stage_hunk", { desc = "Git next change" }) map("n", "]g", "Gitsigns next_hunk", { desc = "Git next change" }) map("n", "[g", "Gitsigns prev_hunk", { desc = "Git prev change" }) map("n", "gdo", "DiffviewOpen", { desc = "Git diff view open" }) @@ -339,9 +341,12 @@ map("n", "qq", "qa", { desc = "Quit All" }) ---- Utils ---- -- undotree -map("n", "ut", "UndotreeToggle", { desc = "Toggle undotree" }) +map("n", "tu", "UndotreeToggle", { desc = "Toggle undotree" }) -- aerial map("n", "a", "AerialToggle", { desc = "Toggle aerial view" }) map("n", "]a", "AerialNext", { desc = "Next aerial view" }) map("n", "[a", "AerialPrev", { desc = "Prev aerial view" }) + +-- colorizer +map("n", "tc", "ColorizerToggle", { desc = "Toggle Colorizer" }) diff --git a/lua/plugins/edit.lua b/lua/plugins/edit.lua index ce3c76a..3a4f216 100644 --- a/lua/plugins/edit.lua +++ b/lua/plugins/edit.lua @@ -1,57 +1,3 @@ return { - { - "brenton-leighton/multiple-cursors.nvim", - version = "*", -- Use the latest tagged version - opts = {}, -- This causes the plugin setup function to be called - keys = { - { "", "MultipleCursorsAddDown", mode = { "n", "x" }, desc = "Add cursor and move down" }, - { "", "MultipleCursorsAddUp", mode = { "n", "x" }, desc = "Add cursor and move up" }, - - { "", "MultipleCursorsAddUp", mode = { "n", "i", "x" }, desc = "Add cursor and move up" }, - { - "", - "MultipleCursorsAddDown", - mode = { "n", "i", "x" }, - desc = "Add cursor and move down", - }, - - { - "", - "MultipleCursorsMouseAddDelete", - mode = { "n", "i" }, - desc = "Add or remove cursor on mouse click", - }, - { - "", - "MultipleCursorsAddDelete", - mode = { "n" }, - desc = "Add a locked cursor or remove an existing cursor", - }, - - { - "m", - "MultipleCursorsAddVisualArea", - mode = { "x" }, - desc = "Add cursors to the lines of the visual area", - }, - - { "a", "MultipleCursorsAddMatches", mode = { "n", "x" }, desc = "Add cursors to cword" }, - { - "A", - "MultipleCursorsAddMatchesV", - mode = { "n", "x" }, - desc = "Add cursors to cword in previous area", - }, - - { - "d", - "MultipleCursorsAddJumpNextMatch", - mode = { "n", "x" }, - desc = "Add cursor and jump to next cword", - }, - { "D", "MultipleCursorsJumpNextMatch", mode = { "n", "x" }, desc = "Jump to next cword" }, - - { "l", "MultipleCursorsLock", mode = { "n", "x" }, desc = "Lock virtual cursors" }, - }, - }, + -- multiple cursors and stuff like that, not supported yet } diff --git a/lua/plugins/git.lua b/lua/plugins/git.lua index df1ff0f..32aa2e1 100644 --- a/lua/plugins/git.lua +++ b/lua/plugins/git.lua @@ -9,11 +9,6 @@ return { end, }, - { - "sindrets/diffview.nvim", - lazy = false, - }, - { "tpope/vim-fugitive" }, -- { diff --git a/lua/plugins/opts/cmp.lua b/lua/plugins/opts/cmp.lua deleted file mode 100644 index d367093..0000000 --- a/lua/plugins/opts/cmp.lua +++ /dev/null @@ -1,83 +0,0 @@ -local cmp = require("cmp") - -local function border(hl_name) - return { - { "╭", hl_name }, - { "─", hl_name }, - { "╮", hl_name }, - { "│", hl_name }, - { "╯", hl_name }, - { "─", hl_name }, - { "╰", hl_name }, - { "│", hl_name }, - } -end - -local options = { - completion = { - completeopt = "menu,menuone", - }, - - window = { - completion = { - side_padding = 1, - scrollbar = false, - }, - documentation = { - border = border("CmpDocBorder"), - winhighlight = "Normal:CmpDoc", - }, - }, - snippet = { - expand = function(args) - require("luasnip").lsp_expand(args.body) - end, - }, - preselect = cmp.PreselectMode.None, - mapping = { - [""] = cmp.mapping.select_prev_item(), - [""] = cmp.mapping.select_next_item(), - [""] = cmp.mapping.scroll_docs(-4), - [""] = cmp.mapping.scroll_docs(4), - [""] = cmp.mapping.complete(), - [""] = cmp.mapping.close(), - [""] = cmp.mapping.confirm({ - behavior = cmp.ConfirmBehavior.Insert, - select = true, - }), - [""] = cmp.mapping(function(fallback) - if cmp.visible() then - cmp.select_next_item() - elseif require("luasnip").expand_or_jumpable() then - vim.fn.feedkeys(vim.api.nvim_replace_termcodes("luasnip-expand-or-jump", true, true, true), "") - else - fallback() - end - end, { - "i", - "s", - }), - [""] = cmp.mapping(function(fallback) - if cmp.visible() then - cmp.select_prev_item() - elseif require("luasnip").jumpable(-1) then - vim.fn.feedkeys(vim.api.nvim_replace_termcodes("luasnip-jump-prev", true, true, true), "") - else - fallback() - end - end, { - "i", - "s", - }), - }, - sources = { - { name = "nvim_lsp" }, - { name = "luasnip" }, - { name = "buffer" }, - { name = "nvim_lua" }, - { name = "path" }, - { name = "emoji" }, - }, -} - -return options diff --git a/lua/plugins/opts/noice.lua b/lua/plugins/opts/noice.lua deleted file mode 100644 index 85af31a..0000000 --- a/lua/plugins/opts/noice.lua +++ /dev/null @@ -1,81 +0,0 @@ -local config = { - views = { - cmdline_popup = { - position = { - row = 3, - col = "50%", - }, - size = { - width = 60, - height = "auto", - }, - }, - cmdline_popupmenu = { - position = { - row = 6, - col = "50%", - }, - size = { - width = 60, - height = "auto", - }, - }, - }, - cmdline = { - enabled = true, - view = "cmdline", -- cmdline, cmdline_popup - opts = {}, - ---@type table - format = { - cmdline = { pattern = "^:", icon = "λ", lang = "vim", title = "" }, - search_down = { kind = "search", pattern = "^/", icon = " ", lang = "regex" }, - search_up = { kind = "search", pattern = "^%?", icon = " ", lang = "regex" }, - filter = { pattern = "^:%s*!", icon = "$", lang = "bash" }, - lua = { - pattern = { "^:%s*lua%s+", "^:%s*lua%s*=%s*", "^:%s*=%s*" }, - icon = "", - lang = "lua", - }, - help = { pattern = "^:%s*he?l?p?%s+", icon = "" }, - input = {}, -- Used by input() - -- lua = false, -- to disable a format, set to `false` - }, - }, - notify = { - -- Noice can be used as `vim.notify` so you can route any notification like other messages - -- Notification messages have their level and other properties set. - -- event is always "notify" and kind can be any log level as a string - -- The default routes will forward notifications to nvim-notify - -- Benefit of using Noice for this is the routing and consistent history view - enabled = false, - view = "notify", - }, - lsp = { - -- override markdown rendering so that **cmp** and other plugins use **Treesitter** - override = { - ["vim.lsp.util.convert_input_to_markdown_lines"] = true, - ["vim.lsp.util.stylize_markdown"] = true, - ["cmp.entry.get_documentation"] = true, -- requires hrsh7th/nvim-cmp - }, - }, - presets = { - bottom_search = true, -- use a classic bottom cmdline for search - command_palette = true, -- position the cmdline and popupmenu together - long_message_to_split = true, -- long messages will be sent to a split - inc_rename = false, -- enables an input dialog for inc-rename.nvim - lsp_doc_border = false, -- add a border to hover docs and signature help - }, - routes = { - { view = "cmdline", filter = { event = "msg_showmode" } }, - { - filter = { - event = "msg_show", - kind = "", - find = "written", - }, - opts = { skip = true }, - }, - }, -} - -return config diff --git a/lua/plugins/preview.lua b/lua/plugins/preview.lua index c13e17c..6a7fb95 100644 --- a/lua/plugins/preview.lua +++ b/lua/plugins/preview.lua @@ -3,7 +3,7 @@ return { "NvChad/nvim-colorizer.lua", config = function() require("colorizer").setup({ - filetypes = { "css", "javascript", html = { mode = "foreground" }, "astro", "vue", "scss" }, + filetypes = { "css", "javascript", html = { mode = "foreground" }, "astro", "vue", "scss", "text" }, user_default_options = { RGB = true, -- #RGB hex codes RRGGBB = true, -- #RRGGBB hex codes diff --git a/lua/plugins/qol.lua b/lua/plugins/qol.lua index 117f87c..84b7291 100644 --- a/lua/plugins/qol.lua +++ b/lua/plugins/qol.lua @@ -43,6 +43,8 @@ local config = { words = { enabled = true }, }, }, + -- Task runner + -- TODO: think if really necessary { "stevearc/overseer.nvim", opts = {}, diff --git a/lua/plugins/style.lua b/lua/plugins/style.lua index 5e52fd1..f7486d8 100644 --- a/lua/plugins/style.lua +++ b/lua/plugins/style.lua @@ -2,14 +2,14 @@ -- │ Styling │ -- ╰─────────╯ return { - { - dir = "~/Documents/Code/plain-colors.nvim", - -- "rose-pine/neovim", - name = "rose-pine", - opts = { - variant = "darker", -- dark, light, darker | dawn - }, - }, + -- { + -- dir = "~/Documents/Code/plain-colors.nvim", + -- -- "rose-pine/neovim", + -- name = "rose-pine", + -- opts = { + -- variant = "darker", -- dark, light, darker | dawn + -- }, + -- }, { "dqnid/komau.vim", -- dir = "~/Documents/Code/komau.vim", @@ -67,21 +67,6 @@ return { { "echasnovski/mini.icons" }, - { - "folke/noice.nvim", - event = "VeryLazy", - opts = function() - return require("plugins.opts.noice") - end, - dependencies = { - "MunifTanjim/nui.nvim", - -- OPTIONAL: - -- `nvim-notify` is only needed, if you want to use the notification view. - -- If not available, we use `mini` as the fallback - -- "rcarriga/nvim-notify", - }, - }, - { "shortcuts/no-neck-pain.nvim", version = "*",