1
0
mirror of https://github.com/SpaceVim/SpaceVim.git synced 2025-02-14 02:07:58 +08:00
SpaceVim/bundle/cpicker.nvim/plugin/cpicker.lua

23 lines
807 B
Lua
Raw Normal View History

--=============================================================================
-- cpicker.lua
-- Copyright (c) 2019-2024 Wang Shidong & Contributors
-- Author: Wang Shidong < wsdjeg@outlook.com >
-- URL: https://spacevim.org
-- License: GPLv3
--=============================================================================
if vim.api.nvim_create_user_command then
local function complete(...)
return {'all', 'rgb', 'hsl'}
end
vim.api.nvim_create_user_command('Cpicker', function(opt)
require('cpicker').picker(opt.fargs)
end, { nargs = '*', complete = complete })
vim.api.nvim_create_user_command('CpickerCursorForeground', function(opt)
require('cpicker.util').set_default_color(opt.fargs)
require('cpicker').picker(opt.fargs)
end, { nargs = '*', complete = complete })
end