From e1429b3224427166767ac8393cf1a12ef5907713 Mon Sep 17 00:00:00 2001 From: Daniel Heras Quesada Date: Sat, 11 Jul 2026 10:32:32 +0200 Subject: [PATCH] feat: colorizer improved --- lazy-lock.json | 37 +++++++++++++------------- lua/plugins/edit.lua | 57 +++++++++++++++++++++++++++++++++++++++++ lua/plugins/preview.lua | 32 ++++++++++++++++++++--- 3 files changed, 104 insertions(+), 22 deletions(-) create mode 100644 lua/plugins/edit.lua diff --git a/lazy-lock.json b/lazy-lock.json index 3966c3a..994b6d8 100644 --- a/lazy-lock.json +++ b/lazy-lock.json @@ -1,46 +1,45 @@ { - "aerial.nvim": { "branch": "master", "commit": "645d108a5242ec7b378cbe643eb6d04d4223f034" }, - "auto-session": { "branch": "main", "commit": "daa7c996a0395e26342934843938647d0f1e87f4" }, + "aerial.nvim": { "branch": "master", "commit": "28fe6e822ae344544c379d60fcb13c9519a1f08a" }, + "auto-session": { "branch": "main", "commit": "6cde3874a9283c2db55627acca5f28e4fa402320" }, "autoclose.nvim": { "branch": "main", "commit": "bafd0368716216fa6a7bb2a43ecd889b44efdb46" }, "blink.cmp": { "branch": "main", "commit": "78336bc89ee5365633bcf754d93df01678b5c08f" }, "blueprints": { "branch": "main", "commit": "e5825c30464f98e77e8b5ffb88d59fd98df6c802" }, "bufferline.nvim": { "branch": "main", "commit": "655133c3b4c3e5e05ec549b9f8cc2894ac6f51b3" }, - "codecompanion.nvim": { "branch": "main", "commit": "f85078a8e0a44159c8653ef507511a38fb9b2a6d" }, - "conform.nvim": { "branch": "master", "commit": "dca1a190aa85f9065979ef35802fb77131911106" }, - "copilot.vim": { "branch": "release", "commit": "a12fd5672110c8aa7e3c8419e28c96943ca179be" }, + "conform.nvim": { "branch": "master", "commit": "619363c30309d29ffa631e67c8183f2a72caa373" }, "diffview.nvim": { "branch": "main", "commit": "4516612fe98ff56ae0415a259ff6361a89419b0a" }, - "flash.nvim": { "branch": "main", "commit": "fcea7ff883235d9024dc41e638f164a450c14ca2" }, + "flash.nvim": { "branch": "main", "commit": "b6346946d10d07998efee029fb0f7a593806d0cd" }, "friendly-snippets": { "branch": "main", "commit": "6cd7280adead7f586db6fccbd15d2cac7e2188b9" }, - "gitsigns.nvim": { "branch": "main", "commit": "dd3f588bacbeb041be6facf1742e42097f62165d" }, - "grug-far.nvim": { "branch": "main", "commit": "21790e59dd0109a92a70cb874dd002af186314f5" }, + "gitsigns.nvim": { "branch": "main", "commit": "eb60cc7b94c46005237fd34170d76f3a089a90aa" }, + "grug-far.nvim": { "branch": "main", "commit": "beb2ce490b72048c587e8a3d919cba1b4608bb04" }, "gruvbox.nvim": { "branch": "main", "commit": "154eb5ff5b96d0641307113fa385eaf0d36d9796" }, "indent-blankline.nvim": { "branch": "master", "commit": "d28a3f70721c79e3c5f6693057ae929f3d9c0a03" }, "komau.vim": { "branch": "master", "commit": "f7c7a00c0cbb67ed269b565a4ada47d96dce14f3" }, "lazy.nvim": { "branch": "main", "commit": "306a05526ada86a7b30af95c5cc81ffba93fef97" }, - "lualine.nvim": { "branch": "master", "commit": "131a558e13f9f28b15cd235557150ccb23f89286" }, - "mason.nvim": { "branch": "main", "commit": "e54f5bf5f12c560da31c17eee5b3e1bd369f3ff9" }, - "mini.clue": { "branch": "main", "commit": "43bd6cf1c3ccdea46d403c32dbc4629fa6afa09d" }, - "mini.icons": { "branch": "main", "commit": "bac6317300e205335df425296570d84322730067" }, - "neo-tree.nvim": { "branch": "main", "commit": "ff84e6e1608b24773f1b73cd4182e0bcf2b3d637" }, + "lualine.nvim": { "branch": "master", "commit": "221ce6b2d999187044529f49da6554a92f740a96" }, + "mason.nvim": { "branch": "main", "commit": "2a6940af80375532e5e9e7c1f2fc6319a1b7a69d" }, + "mini.clue": { "branch": "main", "commit": "4d506660e7030a15748ab073bebfe3ed03884000" }, + "mini.icons": { "branch": "main", "commit": "98faae31e9be1cc054ae63485e58ceb185efcad0" }, + "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": "a065833f35a3a7cc3ef137ac88b5381da2ba302e" }, - "nvim-lint": { "branch": "master", "commit": "eab58b48eb11d7745c11c505e0f3057165902461" }, + "nvim-colorizer.lua": { "branch": "master", "commit": "664c0b7cea1de71f8b65dfe951b7996fc3e6ccde" }, + "nvim-lint": { "branch": "master", "commit": "a219b2c9e5b4765e5c845aba119dad55806fcaf1" }, "nvim-scrollbar": { "branch": "main", "commit": "f8e87b96cd6362ef8579be456afee3b38fd7e2a8" }, "nvim-treesitter": { "branch": "master", "commit": "cf12346a3414fa1b06af75c79faebe7f76df080a" }, "nvim-treesitter-context": { "branch": "master", "commit": "b311b30818951d01f7b4bf650521b868b3fece16" }, "nvim-ts-autotag": { "branch": "main", "commit": "88c1453db4ba7dd24131086fe51fdf74e587d275" }, - "nvim-web-devicons": { "branch": "master", "commit": "2795c26c916bb3c57dde308b82be51971fa92747" }, + "nvim-web-devicons": { "branch": "master", "commit": "dad71387de386a946b123079d0e53f23028f3abd" }, "nvim-window-picker": { "branch": "main", "commit": "6382540b2ae5de6c793d4aa2e3fe6dbb518505ec" }, - "overseer.nvim": { "branch": "master", "commit": "f818eefff81f4b12fb7cf236f1b6c16768a2fcbc" }, + "overseer.nvim": { "branch": "master", "commit": "a93d9f6d6defdac4bcd6d2c8ba988650e42e0a0e" }, "plenary.nvim": { "branch": "master", "commit": "74b06c6c75e4eeb3108ec01852001636d85a932b" }, "scope.nvim": { "branch": "main", "commit": "228aabdb1b9cc74f0c0ccec88e79873857236e49" }, "smear-cursor.nvim": { "branch": "main", "commit": "9e9378d6ee34bb3782e0e8c63d9ec8ca618b479b" }, - "snacks.nvim": { "branch": "main", "commit": "ad9ede6a9cddf16cedbd31b8932d6dcdee9b716e" }, + "snacks.nvim": { "branch": "main", "commit": "882c996cf28183f4d63640de0b4c02ec886d01f2" }, "telescope-fzf-native.nvim": { "branch": "main", "commit": "b25b749b9db64d375d782094e2b9dce53ad53a40" }, "telescope-git-file-history.nvim": { "branch": "master", "commit": "4442114f9257e682e60a8cb6de14cf988e26055c" }, - "telescope.nvim": { "branch": "master", "commit": "f04ab730b8f9c6bf3f54a206d0dcddfd70c52d59" }, + "telescope.nvim": { "branch": "master", "commit": "427b576c16792edad01a92b89721d923c19ad60f" }, "todo-comments.nvim": { "branch": "main", "commit": "31e3c38ce9b29781e4422fc0322eb0a21f4e8668" }, "trouble.nvim": { "branch": "main", "commit": "bd67efe408d4816e25e8491cc5ad4088e708a69a" }, "undotree": { "branch": "master", "commit": "6fa6b57cda8459e1e4b2ca34df702f55242f4e4d" }, diff --git a/lua/plugins/edit.lua b/lua/plugins/edit.lua new file mode 100644 index 0000000..ce3c76a --- /dev/null +++ b/lua/plugins/edit.lua @@ -0,0 +1,57 @@ +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" }, + }, + }, +} diff --git a/lua/plugins/preview.lua b/lua/plugins/preview.lua index 854a1d3..c13e17c 100644 --- a/lua/plugins/preview.lua +++ b/lua/plugins/preview.lua @@ -1,8 +1,34 @@ return { { - "norcalli/nvim-colorizer.lua", - init = function(_, opts) - return require("colorizer").setup(opts) + "NvChad/nvim-colorizer.lua", + config = function() + require("colorizer").setup({ + filetypes = { "css", "javascript", html = { mode = "foreground" }, "astro", "vue", "scss" }, + user_default_options = { + RGB = true, -- #RGB hex codes + RRGGBB = true, -- #RRGGBB hex codes + names = true, -- "Name" codes like Blue or blue + RRGGBBAA = true, -- #RRGGBBAA hex codes + AARRGGBB = false, -- 0xAARRGGBB hex codes + rgb_fn = true, -- CSS rgb() and rgba() functions + hsl_fn = true, -- CSS hsl() and hsla() functions + css = true, -- Enable all CSS features: rgb_fn, hsl_fn, names, RGB, RRGGBB + css_fn = true, -- Enable all CSS *functions*: rgb_fn, hsl_fn + -- Available modes for `mode`: foreground, background, virtualtext + mode = "virtualtext", -- Set the display mode. + -- Available methods are false / true / "normal" / "lsp" / "both" + -- True is same as normal + tailwind = false, -- Enable tailwind colors + -- parsers can contain values used in |user_default_options| + sass = { enable = true, parsers = { "css" } }, -- Enable sass colors + virtualtext = "■", + -- update color values even if buffer is not focused + -- example use: cmp_menu, cmp_docs + always_update = false, + }, + -- all the sub-options of filetypes apply to buftypes + buftypes = {}, + }) end, }, }