From e4d16abd64917aa4d1cce1538b8b2450266b5df8 Mon Sep 17 00:00:00 2001 From: Sakooooo <78461130+Sakooooo@users.noreply.github.com> Date: Sat, 29 Jul 2023 20:45:44 +0300 Subject: [PATCH] Add color-picker.nvim to nvim --- config/nvim/lua/core/keymaps.lua | 6 +++++- .../nvim/lua/core/plugin_config/color-picker.lua | 16 ++++++++++++++++ config/nvim/lua/core/plugin_config/init.lua | 1 + config/nvim/lua/core/plugins.lua | 10 ++-------- 4 files changed, 24 insertions(+), 9 deletions(-) create mode 100644 config/nvim/lua/core/plugin_config/color-picker.lua diff --git a/config/nvim/lua/core/keymaps.lua b/config/nvim/lua/core/keymaps.lua index d6533a16..a00d08e1 100644 --- a/config/nvim/lua/core/keymaps.lua +++ b/config/nvim/lua/core/keymaps.lua @@ -23,7 +23,7 @@ vim.opt.splitright = true -- :terminal shell if (vim.loop.os_uname().sysname == "Linux") then - vim.opt.shell = "bash" + vim.opt.shell = "zsh" else vim.opt.shell = "pwsh" end @@ -52,3 +52,7 @@ vim.keymap.set("n", "t", ":split :terminal") -- exit terminal with esc vim.keymap.set("t", "", "", opts) + +-- color picker +vim.keymap.set("n", "", "PickColor", opts) +vim.keymap.set("i", "", "PickColorInsert", opts) diff --git a/config/nvim/lua/core/plugin_config/color-picker.lua b/config/nvim/lua/core/plugin_config/color-picker.lua new file mode 100644 index 00000000..38ae3be5 --- /dev/null +++ b/config/nvim/lua/core/plugin_config/color-picker.lua @@ -0,0 +1,16 @@ +require("color-picker").setup({ -- for changing icons & mappings + -- ["icons"] = { "ﱢ", "" }, + -- ["icons"] = { "ﮊ", "" }, + -- ["icons"] = { "", "ﰕ" }, + -- ["icons"] = { "", "" }, + -- ["icons"] = { "", "" }, + ["icons"] = { "ﱢ", "" }, + ["border"] = "rounded", -- none | single | double | rounded | solid | shadow + ["keymap"] = { -- mapping example: + ["U"] = "ColorPickerSlider5Decrease", + ["O"] = "ColorPickerSlider5Increase", + }, + ["background_highlight_group"] = "Normal", -- default + ["border_highlight_group"] = "FloatBorder", -- default + ["text_highlight_group"] = "Normal", --default +}) diff --git a/config/nvim/lua/core/plugin_config/init.lua b/config/nvim/lua/core/plugin_config/init.lua index 7e536de2..3c5d9288 100644 --- a/config/nvim/lua/core/plugin_config/init.lua +++ b/config/nvim/lua/core/plugin_config/init.lua @@ -10,3 +10,4 @@ require("core.plugin_config.precense") require("core.plugin_config.null_ls") require("core.plugin_config.kanagawa") require("core.plugin_config.liveserver") +require("core.plugin_config.color-picker") diff --git a/config/nvim/lua/core/plugins.lua b/config/nvim/lua/core/plugins.lua index d0e71826..66752b9e 100644 --- a/config/nvim/lua/core/plugins.lua +++ b/config/nvim/lua/core/plugins.lua @@ -66,14 +66,8 @@ return require("packer").startup(function(use) -- flex use("andweeb/presence.nvim") - -- live server - use({ - "aurum77/live-server.nvim", - run = function() - require("live_server.util").install() - end, - cmd = { "LiveServer", "LiveServerStart", "LiveServerStop" }, - }) + -- color picker + use ("ziontee113/color-picker.nvim") -- auto update just like vscode if packer_bootstrap then