mirror of
https://github.com/SpaceVim/SpaceVim.git
synced 2025-02-14 04:57:59 +08:00
23 lines
807 B
Lua
23 lines
807 B
Lua
--=============================================================================
|
|
-- 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
|