Add NvChadUpdate command and shortcut for it
map leader+uu to it summary of what it does: first ask the user for confirmation and tell that the updater is gonna run git reset --hard in config repo and chadrc will be restored take backup of chadrc in a lua string and locally in a file with chadrc.bak.(random numbers) git reset on config dir and git pull whether success or error, restore the chadrc file if restore fails, then print backup file path for more deep understanding, read the comments in utils.lua
This commit is contained in:
@@ -141,6 +141,7 @@ M.mappings = {
|
||||
copywhole_file = "<C-a>",
|
||||
toggle_linenr = "<leader>n", -- show or hide line number
|
||||
theme_toggle = "<leader>x",
|
||||
update_nvchad = "<leader>uu",
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user