Add user command for updating everything

This commit is contained in:
2023-09-04 03:44:07 +02:00
parent a9f6ce6216
commit fd5add50ee
2 changed files with 30 additions and 1 deletions
+1 -1
View File
@@ -18,7 +18,7 @@ local module_name = "base"
local utils = require("utils")
local files = { "globals", "options", "autocommands", "mappings", }
local files = { "globals", "options", "autocommands", "mappings", "user_commands", }
for _, file in ipairs(files) do
local pkg = "core." .. file
+29
View File
@@ -0,0 +1,29 @@
--[[
Copyright 2023 Oscar Wallberg
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
]]
vim.api.nvim_create_user_command(
"Update",
function (_)
require("lazy").update()
vim.fn.execute(":TSUpdateSync")
vim.fn.execute(":Neorg sync-parsers")
vim.fn.execute(":MasonUpdateAll")
end,
{
desc = "Update lazy plugins, treesitter parsers and mason language servers",
force = false,
}
)