mirror of
https://github.com/folke/lazy.nvim.git
synced 2025-04-19 21:06:46 +00:00
feat: initial site
This commit is contained in:
parent
0671c76f96
commit
df4dc74ead
31 changed files with 10703 additions and 0 deletions
17
lua/build.lua
Normal file
17
lua/build.lua
Normal file
|
@ -0,0 +1,17 @@
|
|||
local M = {}
|
||||
|
||||
local function exec(cmd)
|
||||
return vim.system(vim.split(cmd, " "), { text = true }):wait()
|
||||
end
|
||||
|
||||
function M.themes()
|
||||
exec("rm -rf src/themes")
|
||||
exec("mkdir -p src/themes")
|
||||
exec("cp -r .nvim/plugins/tokyonight.nvim/extras/prism src/themes/prism")
|
||||
end
|
||||
|
||||
function M.update()
|
||||
M.themes()
|
||||
end
|
||||
|
||||
return M
|
56
lua/init.lua
Normal file
56
lua/init.lua
Normal file
|
@ -0,0 +1,56 @@
|
|||
-- DO NOT change the paths and don't remove the colorscheme
|
||||
local root = vim.fn.fnamemodify("./.nvim", ":p")
|
||||
|
||||
-- set stdpaths to use .repro
|
||||
for _, name in ipairs({ "config", "data", "state", "cache" }) do
|
||||
vim.env[("XDG_%s_HOME"):format(name:upper())] = root .. "/" .. name
|
||||
end
|
||||
|
||||
local lazy_dev = vim.fn.expand("~/projects/lazy.nvim")
|
||||
if vim.uv.fs_stat(lazy_dev) then
|
||||
vim.opt.runtimepath:prepend(lazy_dev)
|
||||
else
|
||||
-- bootstrap lazy
|
||||
local lazypath = root .. "/plugins/lazy.nvim"
|
||||
if not vim.loop.fs_stat(lazypath) then
|
||||
print("Bootstrapping lazy.nvim")
|
||||
vim.fn.system({ "git", "clone", "--filter=blob:none", "https://github.com/folke/lazy.nvim.git", lazypath })
|
||||
end
|
||||
vim.opt.runtimepath:prepend(lazypath)
|
||||
end
|
||||
|
||||
local function main()
|
||||
print("Installing plugins")
|
||||
require("lazy").setup({
|
||||
spec = {
|
||||
"folke/tokyonight.nvim",
|
||||
},
|
||||
root = root .. "/plugins",
|
||||
})
|
||||
|
||||
if vim.o.filetype == "lazy" then
|
||||
vim.cmd.close()
|
||||
end
|
||||
|
||||
print("Updating plugins")
|
||||
-- update plugins, wait for it to finish and don't show the output
|
||||
require("lazy").update({ wait = true, show = false })
|
||||
-- require("lazy.core.cache").reset()
|
||||
|
||||
vim.opt.rtp:append(".")
|
||||
|
||||
print("Building docs")
|
||||
|
||||
require("build").update()
|
||||
|
||||
print("Done!\n")
|
||||
end
|
||||
|
||||
local Util = require("lazy.core.util")
|
||||
Util.try(main, {
|
||||
on_error = function(err)
|
||||
print(err)
|
||||
os.exit(1)
|
||||
end,
|
||||
})
|
||||
os.exit(0)
|
Loading…
Add table
Add a link
Reference in a new issue