From 5748d1bcdbf9f66e078a5fe7d00528bdcdb2e368 Mon Sep 17 00:00:00 2001 From: alemi Date: Thu, 18 Aug 2022 05:06:02 +0200 Subject: [PATCH] feat: added UpdateConfig command --- init.lua | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/init.lua b/init.lua index e7ad657..7ca1eef 100644 --- a/init.lua +++ b/init.lua @@ -123,3 +123,12 @@ PALETTE:set_colors() --|| UTILITY function P(something) print(vim.inspect(something)) end + +vim.api.nvim_create_user_command( + 'UpdateConfig', + function(args) + local stdout = vim.fn.system(string.format("git -C %s pull", vim.fn.stdpath('config'))) + print(stdout:sub(0, #stdout-1)) + end, + {} +)