Fixup v4 template
This commit is contained in:
32
init.lua
32
init.lua
@@ -1,4 +1,28 @@
|
|||||||
-- bootstrap lazy.nvim, AstroNvim, and user plugins
|
local lazypath = vim.env.LAZY or vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
|
||||||
require("config.lazy")
|
if not (vim.env.LAZY or vim.loop.fs_stat(lazypath)) then
|
||||||
-- run polish file at the very end
|
vim.g.astronvim_first_install = true
|
||||||
pcall(require, "config.polish")
|
vim.fn.system({
|
||||||
|
"git",
|
||||||
|
"clone",
|
||||||
|
"--filter=blob:none",
|
||||||
|
"https://github.com/folke/lazy.nvim.git",
|
||||||
|
"--branch=stable",
|
||||||
|
lazypath,
|
||||||
|
})
|
||||||
|
end
|
||||||
|
vim.opt.rtp:prepend(lazypath)
|
||||||
|
|
||||||
|
if not pcall(require, "lazy") then
|
||||||
|
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
|
||||||
|
|
||||||
|
require("lazy_setup")
|
||||||
|
|||||||
@@ -1,51 +0,0 @@
|
|||||||
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",
|
|
||||||
"clone",
|
|
||||||
"--filter=blob:none",
|
|
||||||
"https://github.com/folke/lazy.nvim.git",
|
|
||||||
"--branch=stable",
|
|
||||||
lazypath,
|
|
||||||
})
|
|
||||||
end
|
|
||||||
vim.opt.rtp:prepend(lazypath)
|
|
||||||
|
|
||||||
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",
|
|
||||||
import = "astronvim.plugins",
|
|
||||||
},
|
|
||||||
{ import = "plugins" },
|
|
||||||
},
|
|
||||||
install = { colorscheme = { "astrodark", "habamax" } },
|
|
||||||
performance = {
|
|
||||||
rtp = {
|
|
||||||
-- disable some rtp plugins, add more to your liking
|
|
||||||
disabled_plugins = {
|
|
||||||
"gzip",
|
|
||||||
"netrwPlugin",
|
|
||||||
"tarPlugin",
|
|
||||||
"tohtml",
|
|
||||||
"zipPlugin",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
dev = {
|
|
||||||
path = "~/Workspace",
|
|
||||||
patterns = {},
|
|
||||||
fallback = true, -- Fallback to git when local plugin doesn't exist
|
|
||||||
},
|
|
||||||
} --[[@as LazyConfig]])
|
|
||||||
@@ -1,22 +0,0 @@
|
|||||||
vim.opt.background = "dark"
|
|
||||||
vim.opt.clipboard = ""
|
|
||||||
vim.opt.cmdheight = 1
|
|
||||||
vim.opt.expandtab = true
|
|
||||||
vim.opt.foldmethod = "syntax"
|
|
||||||
vim.opt.foldnestmax = 150
|
|
||||||
vim.opt.grepprg = vim.fn.executable("rg") and "rg --vimgrep" or nil
|
|
||||||
vim.opt.guifont = { "VictorMono Nerd Font", "Hack Nerd Font Mono", ":h10" }
|
|
||||||
vim.opt.listchars = { tab = "> ", extends = ">", precedes = "<", space = "·" }
|
|
||||||
vim.opt.number = true
|
|
||||||
vim.opt.relativenumber = false
|
|
||||||
vim.opt.shiftwidth = 4
|
|
||||||
vim.opt.signcolumn = "auto"
|
|
||||||
vim.opt.spell = false
|
|
||||||
vim.opt.tabstop = 4
|
|
||||||
vim.opt.textwidth = 120
|
|
||||||
vim.opt.wrap = true
|
|
||||||
|
|
||||||
vim.opt.path:append("**") -- recursive search for find
|
|
||||||
|
|
||||||
-- Globals
|
|
||||||
vim.g.rust_recommended_style = 0
|
|
||||||
@@ -1,16 +0,0 @@
|
|||||||
-- 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",
|
|
||||||
-- },
|
|
||||||
-- }
|
|
||||||
29
lua/lazy_setup.lua
Normal file
29
lua/lazy_setup.lua
Normal file
@@ -0,0 +1,29 @@
|
|||||||
|
require("lazy").setup{
|
||||||
|
spec = {
|
||||||
|
-- TODO: remove branch v4 on release
|
||||||
|
{
|
||||||
|
"AstroNvim/AstroNvim",
|
||||||
|
branch = "v4",
|
||||||
|
import = "astronvim.plugins",
|
||||||
|
},
|
||||||
|
{ import = "plugins" },
|
||||||
|
},
|
||||||
|
install = { colorscheme = { "astrodark", "habamax" } },
|
||||||
|
performance = {
|
||||||
|
rtp = {
|
||||||
|
-- disable some rtp plugins, add more to your liking
|
||||||
|
disabled_plugins = {
|
||||||
|
"gzip",
|
||||||
|
"netrwPlugin",
|
||||||
|
"tarPlugin",
|
||||||
|
"tohtml",
|
||||||
|
"zipPlugin",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
dev = {
|
||||||
|
path = "~/Workspace",
|
||||||
|
patterns = {},
|
||||||
|
fallback = true, -- Fallback to git when local plugin doesn't exist
|
||||||
|
},
|
||||||
|
} --[[@as LazyConfig]]
|
||||||
32
lua/plugins/14-options.lua
Normal file
32
lua/plugins/14-options.lua
Normal file
@@ -0,0 +1,32 @@
|
|||||||
|
---@type LazySpec
|
||||||
|
return {
|
||||||
|
"AstroNvim/astrocore",
|
||||||
|
---@type AstroCoreOpts
|
||||||
|
opts = {
|
||||||
|
options = {
|
||||||
|
opt = {
|
||||||
|
background = "dark",
|
||||||
|
clipboard = "",
|
||||||
|
cmdheight = 1,
|
||||||
|
expandtab = true,
|
||||||
|
foldmethod = "syntax",
|
||||||
|
foldnestmax = 150,
|
||||||
|
grepprg = vim.fn.executable("rg") and "rg --vimgrep" or nil,
|
||||||
|
guifont = { "VictorMono Nerd Font", "Hack Nerd Font Mono", ":h10" },
|
||||||
|
listchars = { tab = "> ", extends = ">", precedes = "<", space = "·" },
|
||||||
|
number = true,
|
||||||
|
relativenumber = false,
|
||||||
|
shiftwidth = 4,
|
||||||
|
signcolumn = "auto",
|
||||||
|
spell = false,
|
||||||
|
tabstop = 4,
|
||||||
|
textwidth = 120,
|
||||||
|
wrap = true,
|
||||||
|
path = vim.list_extend(vim.opt.path:get(), { "**" }),
|
||||||
|
},
|
||||||
|
g = {
|
||||||
|
rust_recommended_style = 0,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
@@ -2,4 +2,5 @@
|
|||||||
return {
|
return {
|
||||||
{ "echasnovski/mini.align", event = "User AstroFile", config = function() require("mini.align").setup({}) end },
|
{ "echasnovski/mini.align", event = "User AstroFile", config = function() require("mini.align").setup({}) end },
|
||||||
{ "tpope/vim-abolish", event = "User AstroFile" },
|
{ "tpope/vim-abolish", event = "User AstroFile" },
|
||||||
|
{ "rcarriga/nvim-notify", dev = true }, -- Until upstream fix for v10
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user