Compare commits

..

2 Commits

Author SHA1 Message Date
a2c284693a Auto commit lazy lock changes 2025-03-19 08:35:57 +11:00
f83969af93 Update lazy-lock.json 2025-03-19 08:34:53 +11:00
2 changed files with 33 additions and 1 deletions

View File

@ -9,7 +9,7 @@
"neo-tree.nvim": { "branch": "v3.x", "commit": "9b5d67119c46e3262ffe1508fe6d8540b79ad75d" },
"nui.nvim": { "branch": "main", "commit": "8d3bce9764e627b62b07424e0df77f680d47ffdb" },
"nvim-cmp": { "branch": "main", "commit": "1e1900b0769324a9675ef85b38f99cca29e203b3" },
"nvim-lspconfig": { "branch": "master", "commit": "2574ad38c6ee4f0bef3a1ca305cd5df627a52bb3" },
"nvim-lspconfig": { "branch": "master", "commit": "185b2af444b27d6541c02d662b5b68190e5cf0c4" },
"nvim-web-devicons": { "branch": "master", "commit": "4c3a5848ee0b09ecdea73adcd2a689190aeb728c" },
"plenary.nvim": { "branch": "master", "commit": "857c5ac632080dba10aae49dba902ce3abf91b35" },
"telescope.nvim": { "branch": "master", "commit": "a0bbec21143c7bc5f8bb02e0005fa0b982edc026" },

View File

@ -0,0 +1,32 @@
vim.api.nvim_create_autocmd("User", {
pattern = "LazyUpdate",
callback = function()
local home = os.getenv("HOME") or "~/"
local cmd = {
"yadm",
"-C",
string.format("%s", home),
"commit",
".config/nvim/lazy-lock.json",
"-m",
"Update lazy-lock.json"
}
local success, process = pcall(function()
return vim.system(cmd):wait()
end)
if process and process.code == 0 then
vim.notify("Committed lazy-lock")
else
if not success then
vim.notify("Failed to run command")
else
vim.notify("Git ran, but nothing committed")
end
end
end
})
return {}