open official website user command

This commit is contained in:
arthur 2024-07-11 02:09:38 +08:00
parent 1476f0d277
commit 1024ac2aa3
2 changed files with 12 additions and 0 deletions

View file

@ -1,5 +1,7 @@
_G.LazyVim = require("lazyvim.util")
local LAZYVIM_DOC = "https://www.lazyvim.org"
---@class LazyVimConfig: LazyVimOptions
local M = {}
@ -186,6 +188,15 @@ function M.setup(opts)
LazyVim.news.setup()
LazyVim.root.setup()
-- TODO: add this to lazy or simply add it in lazyvim
-- vim.api.nvim_create_user_command("LazyDocument", function()
-- require("lazy.help").openDoc()
-- end, { desc = "Open Lazy Document" })
vim.api.nvim_create_user_command("LazyVimDocument", function()
require("lazy.util").open(LAZYVIM_DOC)
end, { desc = "Open LazyVim Document" })
vim.api.nvim_create_user_command("LazyExtras", function()
LazyVim.extras.show()
end, { desc = "Manage LazyVim extras" })

View file

@ -359,6 +359,7 @@ return {
{ action = 'lua LazyVim.pick.config_files()()', desc = " Config", icon = "", key = "c" },
{ action = 'lua require("persistence").load()', desc = " Restore Session", icon = "", key = "s" },
{ action = "LazyExtras", desc = " Lazy Extras", icon = "", key = "x" },
{ action = "LazyVimDocument", desc = " LazyVim Document",icon = "󰒲 ", key = "d" },
{ action = "Lazy", desc = " Lazy", icon = "󰒲 ", key = "l" },
{ action = function() vim.api.nvim_input("<cmd>qa<cr>") end, desc = " Quit", icon = "", key = "q" },
},