From 969510cee1ddb393d61e66aa9bbd24bc543f7ab5 Mon Sep 17 00:00:00 2001 From: rootiest Date: Thu, 27 Feb 2025 16:52:43 -0500 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20Feat(picker):=20implement=20Pick=20?= =?UTF-8?q?command?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This allows you to do `:Pick colorschemes` instead of `:lua Pick('colorschemes')`. Makes using less frequent pickers fast and easy! --- lua/config/postopts.lua | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lua/config/postopts.lua b/lua/config/postopts.lua index 452f36c..f1d269f 100644 --- a/lua/config/postopts.lua +++ b/lua/config/postopts.lua @@ -36,6 +36,11 @@ end local function define_globals() -- Define Pick function Pick = require('data.func').pick + + -- Define Pick command + vim.api.nvim_create_user_command('Pick', function(opts) + Pick(unpack(opts.fargs)) + end, { nargs = '*' }) end -- Run Setup function