Merged from template master
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
|
||||
if not vim.loop.fs_stat(lazypath) then
|
||||
local lazypath = vim.env.LAZY or vim.fn.stdpath "data" .. "/lazy/lazy.nvim"
|
||||
if not (vim.env.LAZY or vim.loop.fs_stat(lazypath)) then
|
||||
vim.g.astronvim_first_install = true -- lets AstroNvim know that this is an initial installation
|
||||
vim.fn.system {
|
||||
"git",
|
||||
@@ -10,23 +10,25 @@ if not vim.loop.fs_stat(lazypath) then
|
||||
lazypath,
|
||||
}
|
||||
end
|
||||
vim.opt.rtp:prepend(vim.env.LAZY or lazypath)
|
||||
vim.opt.rtp:prepend(lazypath)
|
||||
|
||||
-- TODO: set to true on release
|
||||
-- Whether or not to use stable releases of AstroNvim
|
||||
local USE_STABLE = false
|
||||
|
||||
require("lazy").setup {
|
||||
dev = {
|
||||
path = "~/Workspace",
|
||||
patterns = {},
|
||||
fallback = true, -- Fallback to git when local plugin doesn't exist
|
||||
},
|
||||
local lazy_loaded, lazy = pcall(require, "lazy") -- validate that lazy is available
|
||||
if not lazy_loaded then
|
||||
-- stylua: ignore
|
||||
vim.api.nvim_echo({ { ("Unable to load lazy from: %s\n"):format(lazypath), "ErrorMsg" }, { "Press any key to exit...", "MoreMsg" } }, true, {})
|
||||
vim.fn.getchar()
|
||||
vim.cmd.quit()
|
||||
end
|
||||
|
||||
lazy.setup({
|
||||
spec = {
|
||||
-- TODO: remove branch v4 on release
|
||||
{ "AstroNvim/AstroNvim", branch = "v4", version = USE_STABLE and "^4" or nil, import = "astronvim.plugins" },
|
||||
-- pin plugins to known working versions
|
||||
{ import = "astronvim.lazy_snapshot", cond = USE_STABLE },
|
||||
{
|
||||
"AstroNvim/AstroNvim",
|
||||
branch = "v4",
|
||||
import = "astronvim.plugins",
|
||||
},
|
||||
{ import = "plugins" },
|
||||
},
|
||||
install = { colorscheme = { "astrodark", "habamax" } },
|
||||
@@ -42,4 +44,9 @@ require("lazy").setup {
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
dev = {
|
||||
path = "~/Workspace",
|
||||
patterns = {},
|
||||
fallback = true, -- Fallback to git when local plugin doesn't exist
|
||||
},
|
||||
} --[[@as LazyConfig]])
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
-- This file is automatically ran last in the setup process and is a good place to configure
|
||||
-- augroups/autocommands and custom filetypes also this just pure lua so
|
||||
-- anything that doesn't fit in the normal config locations above can go here
|
||||
|
||||
-- Set up custom filetypes
|
||||
-- vim.filetype.add {
|
||||
-- extension = {
|
||||
-- foo = "fooscript",
|
||||
-- },
|
||||
-- filename = {
|
||||
-- ["Foofile"] = "fooscript",
|
||||
-- },
|
||||
-- pattern = {
|
||||
-- ["~/%.config/foo/.*"] = "fooscript",
|
||||
-- },
|
||||
-- }
|
||||
|
||||
Reference in New Issue
Block a user