Add color-picker.nvim to nvim
This commit is contained in:
parent
e7b8fada28
commit
e4d16abd64
4 changed files with 24 additions and 9 deletions
|
@ -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)
|
||||||
|
|
16
config/nvim/lua/core/plugin_config/color-picker.lua
Normal file
16
config/nvim/lua/core/plugin_config/color-picker.lua
Normal 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
|
||||||
|
})
|
|
@ -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")
|
||||||
|
|
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue