Add color-picker.nvim to nvim

This commit is contained in:
Sakooooo 2023-07-29 20:45:44 +03:00
parent e7b8fada28
commit e4d16abd64
Signed by: sako
GPG key ID: 3FD715D87D7725E0
4 changed files with 24 additions and 9 deletions

View file

@ -23,7 +23,7 @@ vim.opt.splitright = true
-- :terminal shell -- :terminal shell
if (vim.loop.os_uname().sysname == "Linux") if (vim.loop.os_uname().sysname == "Linux")
then then
vim.opt.shell = "bash" vim.opt.shell = "zsh"
else else
vim.opt.shell = "pwsh" vim.opt.shell = "pwsh"
end end
@ -52,3 +52,7 @@ vim.keymap.set("n", "<leader>t", ":split<CR> <BAR> :terminal<CR>")
-- exit terminal with esc -- exit terminal with esc
vim.keymap.set("t", "<Esc>", "<C-\\><C-n>", opts) vim.keymap.set("t", "<Esc>", "<C-\\><C-n>", opts)
-- color picker
vim.keymap.set("n", "<C-c>", "<cmd>PickColor<cr>", opts)
vim.keymap.set("i", "<C-c>", "<cmd>PickColorInsert<cr>", opts)

View file

@ -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"] = "<Plug>ColorPickerSlider5Decrease",
["O"] = "<Plug>ColorPickerSlider5Increase",
},
["background_highlight_group"] = "Normal", -- default
["border_highlight_group"] = "FloatBorder", -- default
["text_highlight_group"] = "Normal", --default
})

View file

@ -10,3 +10,4 @@ require("core.plugin_config.precense")
require("core.plugin_config.null_ls") require("core.plugin_config.null_ls")
require("core.plugin_config.kanagawa") require("core.plugin_config.kanagawa")
require("core.plugin_config.liveserver") require("core.plugin_config.liveserver")
require("core.plugin_config.color-picker")

View file

@ -66,14 +66,8 @@ return require("packer").startup(function(use)
-- flex -- flex
use("andweeb/presence.nvim") use("andweeb/presence.nvim")
-- live server -- color picker
use({ use ("ziontee113/color-picker.nvim")
"aurum77/live-server.nvim",
run = function()
require("live_server.util").install()
end,
cmd = { "LiveServer", "LiveServerStart", "LiveServerStop" },
})
-- auto update just like vscode -- auto update just like vscode
if packer_bootstrap then if packer_bootstrap then