From 5e0e677cb8edbc825ef8d32bfbc8a5128596b52a Mon Sep 17 00:00:00 2001 From: Yuan Chiu Date: Fri, 23 May 2025 20:16:56 +0800 Subject: [PATCH] =?UTF-8?q?nvim:=20color=20picker=20=E6=9B=B4=E6=8F=9B?= =?UTF-8?q?=E9=A1=8F=E8=89=B2=E9=81=B8=E6=93=87=E5=99=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../exact_plugins/exact_editor/color.lua | 93 +++++++++++-------- 1 file changed, 52 insertions(+), 41 deletions(-) diff --git a/dot_config/nvim/exact_lua/exact_plugins/exact_editor/color.lua b/dot_config/nvim/exact_lua/exact_plugins/exact_editor/color.lua index 8186416..00caff4 100644 --- a/dot_config/nvim/exact_lua/exact_plugins/exact_editor/color.lua +++ b/dot_config/nvim/exact_lua/exact_plugins/exact_editor/color.lua @@ -1,32 +1,42 @@ return { -- 單純顯示顏色 -- 不過以下ccc.nvim與oklch-color-picker.nvim都有此功能,故關閉 - -- { - -- 'norcalli/nvim-colorizer.lua', - -- lazy = false, - -- config = function() - -- -- Attaches to every FileType mode - -- require 'colorizer'.setup() + { + 'norcalli/nvim-colorizer.lua', + lazy = false, + config = function() + -- Attaches to every FileType mode + require 'colorizer'.setup() - -- -- require("colorizer").setup({ - -- -- '*'; -- Highlight all files, but customize some others. - -- -- '!vim'; -- Exclude vim from highlighting. - -- -- '!markdown'; -- Exclude markdown from highlighting. - -- -- '!text'; -- Exclude text from highlighting. - -- -- '!html'; -- Exclude html from highlighting. - -- -- '!css'; -- Exclude css from highlighting. - -- -- '!javascript'; -- Exclude javascript from highlighting. - -- -- '!typescript'; -- Exclude typescript from highlighting. - -- -- }, { - -- -- RGB = true; -- #RGB hex codes - -- -- RRGGBB = true; -- #RRGGBB hex codes - -- -- names = false; -- "Name" codes like Blue or blue - -- -- RRGGBBAA = true; -- #RRGGBBAA hex codes - -- -- rgb_fn = true; -- CSS rgb() and rgba() functions - -- -- hsl_fn = true; -- CSS hsl() and hsla() functions - -- -- }) - -- end, - -- }, + -- require("colorizer").setup({ + -- '*'; -- Highlight all files, but customize some others. + -- '!vim'; -- Exclude vim from highlighting. + -- '!markdown'; -- Exclude markdown from highlighting. + -- '!text'; -- Exclude text from highlighting. + -- '!html'; -- Exclude html from highlighting. + -- '!css'; -- Exclude css from highlighting. + -- '!javascript'; -- Exclude javascript from highlighting. + -- '!typescript'; -- Exclude typescript from highlighting. + -- }, { + -- RGB = true; -- #RGB hex codes + -- RRGGBB = true; -- #RRGGBB hex codes + -- names = false; -- "Name" codes like Blue or blue + -- RRGGBBAA = true; -- #RRGGBBAA hex codes + -- rgb_fn = true; -- CSS rgb() and rgba() functions + -- hsl_fn = true; -- CSS hsl() and hsla() functions + -- }) + end, + }, + { "nvzone/volt", lazy = true }, + { + "nvzone/minty", + cmd = { "Shades", "Huefy" }, + keys = { + { + "v", "Huefy", desc = "Color pick under cursor" + }, + }, + } -- { -- "uga-rosa/ccc.nvim", @@ -61,20 +71,21 @@ return { -- end, -- } - { - "eero-lehtinen/oklch-color-picker.nvim", - enabled = require("tools.gui").is_graphical(), - event = "VeryLazy", - version = "*", - keys = { - -- One handed keymap recommended, you will be using the mouse - { - "v", - function() require("oklch-color-picker").pick_under_cursor() end, - desc = "Color pick under cursor", - }, - }, - ---@type oklch.Opts - opts = {}, - } + -- { + -- "eero-lehtinen/oklch-color-picker.nvim", + -- enabled = require("tools.gui").is_graphical(), + -- event = "VeryLazy", + -- version = "*", + -- keys = { + -- -- One handed keymap recommended, you will be using the mouse + -- { + -- "v", + -- function() require("oklch-color-picker").pick_under_cursor() end, + -- desc = "Color pick under cursor", + -- }, + -- }, + -- ---@type oklch.Opts + -- opts = {}, + -- }, + }