Compare commits
4 Commits
a55e972ecb
...
f5c9c94207
| Author | SHA1 | Date | |
|---|---|---|---|
| f5c9c94207 | |||
| 662e59fe13 | |||
| 3c1a418702 | |||
| 360a40d01a |
@@ -1,32 +1,33 @@
|
||||
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 {
|
||||
vim.fn.system({
|
||||
"git",
|
||||
"clone",
|
||||
"--filter=blob:none",
|
||||
"https://github.com/folke/lazy.nvim.git",
|
||||
"--branch=stable",
|
||||
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
|
||||
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
|
||||
|
||||
require("lazy").setup {
|
||||
dev = {
|
||||
path = "~/Workspace",
|
||||
patterns = {},
|
||||
fallback = true, -- Fallback to git when local plugin doesn't exist
|
||||
},
|
||||
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 +43,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",
|
||||
-- },
|
||||
-- }
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
---@type LazySpec
|
||||
return {
|
||||
{ "goolord/alpha-nvim", enabled = false },
|
||||
-- Which-key
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
local home = vim.fn.hostname() == "comanche"
|
||||
local work = not home
|
||||
|
||||
---@type LazySpec
|
||||
return {
|
||||
{ "AstroNvim/astrocommunity", branch = "v4" },
|
||||
-- Language packs
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
---@type LazySpec
|
||||
return {
|
||||
{
|
||||
"AstroNvim/astroui",
|
||||
@@ -11,7 +12,7 @@ return {
|
||||
url = "https://git.niverton.tk/niverton/Astrobox.git",
|
||||
dev = true, -- Use local dir if available
|
||||
opts = {
|
||||
contrast = "hard"
|
||||
}
|
||||
contrast = "hard",
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
-- return {
|
||||
-- "AstroNvim/astrocore",
|
||||
-- ---@type AstroCoreOpts
|
||||
-- opts = {
|
||||
-- mappings = {
|
||||
-- t = {
|
||||
-- ["<Esc>"] = [[<C-\><C-n>]],
|
||||
-- ["<A-h>"] = [[<C-\><C-N><C-w>h]],
|
||||
-- ["<A-j>"] = [[<C-\><C-N><C-w>j]],
|
||||
-- ["<A-k>"] = [[<C-\><C-N><C-w>k]],
|
||||
-- ["<A-l>"] = [[<C-\><C-N><C-w>l]],
|
||||
-- },
|
||||
-- },
|
||||
-- },
|
||||
-- }
|
||||
return {}
|
||||
---@type LazySpec
|
||||
return {
|
||||
"AstroNvim/astrocore",
|
||||
---@type AstroCoreOpts
|
||||
opts = {
|
||||
mappings = {
|
||||
t = {
|
||||
["<Esc>"] = [[<C-\><C-n>]],
|
||||
["<A-h>"] = [[<C-\><C-N><C-w>h]],
|
||||
["<A-j>"] = [[<C-\><C-N><C-w>j]],
|
||||
["<A-k>"] = [[<C-\><C-N><C-w>k]],
|
||||
["<A-l>"] = [[<C-\><C-N><C-w>l]],
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
---@type LazySpec
|
||||
return {
|
||||
"AstroNvim/astrocore",
|
||||
---@type AstroCoreOpts
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
---@type LazySpec
|
||||
return {
|
||||
"AstroNvim/astrolsp",
|
||||
---@type AstroLSPOpts
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
---@type LazySpec
|
||||
return {
|
||||
--[[
|
||||
{
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
---@type LazySpec
|
||||
return {
|
||||
"rebelot/heirline.nvim",
|
||||
optional = true,
|
||||
@@ -6,28 +7,28 @@ return {
|
||||
|
||||
opts.statusline = {
|
||||
hl = { fg = "fg", bg = "bg" },
|
||||
status.component.mode { mode_text = { hl = { bold = true }, padding = { left = 1, right = 1 } } },
|
||||
status.component.file_info {
|
||||
status.component.mode({ mode_text = { hl = { bold = true }, padding = { left = 1, right = 1 } } }),
|
||||
status.component.file_info({
|
||||
filetype = false,
|
||||
filename = {
|
||||
modify = ":~:.",
|
||||
},
|
||||
file_modified = {},
|
||||
},
|
||||
}),
|
||||
status.component.diagnostics(),
|
||||
status.component.fill(),
|
||||
status.component.cmd_info(),
|
||||
status.component.fill(),
|
||||
status.component.lsp(),
|
||||
status.component.treesitter { padding = { right = 1 } }, -- Extra space to separate from next component
|
||||
status.component.treesitter({ padding = { right = 1 } }), -- Extra space to separate from next component
|
||||
status.component.git_diff(),
|
||||
status.component.git_branch(),
|
||||
status.component.nav { scrollbar = false },
|
||||
status.component.nav({ scrollbar = false }),
|
||||
}
|
||||
|
||||
local get_file_path = status.provider.filename {
|
||||
local get_file_path = status.provider.filename({
|
||||
modify = ":~:.:h", -- Relative path and cut filename
|
||||
}
|
||||
})
|
||||
-- Fix path separation on windows
|
||||
local path_func = get_file_path
|
||||
if vim.fn.has("win32") then
|
||||
@@ -45,34 +46,34 @@ return {
|
||||
{
|
||||
-- Set display priority to hide when component is too big to fit
|
||||
flexible = 1,
|
||||
status.component.separated_path {
|
||||
status.component.separated_path({
|
||||
flexible = 2,
|
||||
max_depth = 5,
|
||||
path_func = path_func,
|
||||
},
|
||||
status.component.separated_path {
|
||||
}),
|
||||
status.component.separated_path({
|
||||
flexible = 3,
|
||||
max_depth = 3,
|
||||
path_func = path_func,
|
||||
},
|
||||
status.component.separated_path {
|
||||
}),
|
||||
status.component.separated_path({
|
||||
flexible = 4,
|
||||
max_depth = 1,
|
||||
path_func = path_func,
|
||||
},
|
||||
}),
|
||||
{
|
||||
-- Hide
|
||||
provider = "",
|
||||
},
|
||||
},
|
||||
status.component.file_info {
|
||||
status.component.file_info({
|
||||
file_icon = { hl = status.hl.file_icon("winbar"), padding = { left = 0 } },
|
||||
file_modified = false,
|
||||
file_read_only = false,
|
||||
hl = status.hl.get_attributes("winbarnc", true),
|
||||
surround = false,
|
||||
update = "BufEnter",
|
||||
},
|
||||
}),
|
||||
},
|
||||
status.component.breadcrumbs(),
|
||||
}
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
---@type LazySpec
|
||||
return {
|
||||
{
|
||||
"vimwiki/vimwiki",
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
---@type LazySpec
|
||||
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" },
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
column_width = 120
|
||||
line_endings = "Unix"
|
||||
indent_type = "Spaces"
|
||||
call_parentheses = "NoSingleTable"
|
||||
call_parentheses = "Always"
|
||||
collapse_simple_statement = "Always"
|
||||
|
||||
[sort_requires]
|
||||
|
||||
Reference in New Issue
Block a user