Formatting
This commit is contained in:
@@ -1,24 +1,23 @@
|
|||||||
local lazypath = vim.env.LAZY or vim.fn.stdpath "data" .. "/lazy/lazy.nvim"
|
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
|
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.g.astronvim_first_install = true -- lets AstroNvim know that this is an initial installation
|
||||||
vim.fn.system {
|
vim.fn.system({
|
||||||
"git",
|
"git",
|
||||||
"clone",
|
"clone",
|
||||||
"--filter=blob:none",
|
"--filter=blob:none",
|
||||||
"https://github.com/folke/lazy.nvim.git",
|
"https://github.com/folke/lazy.nvim.git",
|
||||||
"--branch=stable",
|
"--branch=stable",
|
||||||
lazypath,
|
lazypath,
|
||||||
}
|
})
|
||||||
end
|
end
|
||||||
vim.opt.rtp:prepend(lazypath)
|
vim.opt.rtp:prepend(lazypath)
|
||||||
|
|
||||||
|
|
||||||
local lazy_loaded, lazy = pcall(require, "lazy") -- validate that lazy is available
|
local lazy_loaded, lazy = pcall(require, "lazy") -- validate that lazy is available
|
||||||
if not lazy_loaded then
|
if not lazy_loaded then
|
||||||
-- stylua: ignore
|
-- stylua: ignore
|
||||||
vim.api.nvim_echo({ { ("Unable to load lazy from: %s\n"):format(lazypath), "ErrorMsg" }, { "Press any key to exit...", "MoreMsg" } }, true, {})
|
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.fn.getchar()
|
||||||
vim.cmd.quit()
|
vim.cmd.quit()
|
||||||
end
|
end
|
||||||
|
|
||||||
lazy.setup({
|
lazy.setup({
|
||||||
|
|||||||
@@ -4,13 +4,13 @@ local work = not home
|
|||||||
return {
|
return {
|
||||||
{ "AstroNvim/astrocommunity", branch = "v4" },
|
{ "AstroNvim/astrocommunity", branch = "v4" },
|
||||||
-- Language packs
|
-- Language packs
|
||||||
{ enabled = true, import = "astrocommunity.pack.cpp" },
|
{ enabled = true, import = "astrocommunity.pack.cpp" },
|
||||||
{ enabled = true, import = "astrocommunity.pack.lua" },
|
{ enabled = true, import = "astrocommunity.pack.lua" },
|
||||||
{ enabled = true, import = "astrocommunity.pack.markdown" },
|
{ enabled = true, import = "astrocommunity.pack.markdown" },
|
||||||
{ enabled = home, import = "astrocommunity.pack.rust" },
|
{ enabled = home, import = "astrocommunity.pack.rust" },
|
||||||
{ enabled = home, import = "astrocommunity.pack.bash" },
|
{ enabled = home, import = "astrocommunity.pack.bash" },
|
||||||
{ enabled = work, import = "astrocommunity.pack.cs" },
|
{ enabled = work, import = "astrocommunity.pack.cs" },
|
||||||
{ enabled = work, import = "astrocommunity.pack.ps1" },
|
{ enabled = work, import = "astrocommunity.pack.ps1" },
|
||||||
{ enabled = false, import = "astrocommunity.pack.html-css" },
|
{ enabled = false, import = "astrocommunity.pack.html-css" },
|
||||||
{ enabled = false, import = "astrocommunity.pack.java" },
|
{ enabled = false, import = "astrocommunity.pack.java" },
|
||||||
{ enabled = false, import = "astrocommunity.pack.wgsl" }, -- WebGLShaderLanguage
|
{ enabled = false, import = "astrocommunity.pack.wgsl" }, -- WebGLShaderLanguage
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ return {
|
|||||||
url = "https://git.niverton.tk/niverton/Astrobox.git",
|
url = "https://git.niverton.tk/niverton/Astrobox.git",
|
||||||
dev = true, -- Use local dir if available
|
dev = true, -- Use local dir if available
|
||||||
opts = {
|
opts = {
|
||||||
contrast = "hard"
|
contrast = "hard",
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ return {
|
|||||||
---@diagnostic disable: missing-fields
|
---@diagnostic disable: missing-fields
|
||||||
config = {
|
config = {
|
||||||
clangd = {
|
clangd = {
|
||||||
cmd = { "clangd", "--header-insertion=never"}, -- Disable auto includes
|
cmd = { "clangd", "--header-insertion=never" }, -- Disable auto includes
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -6,28 +6,28 @@ return {
|
|||||||
|
|
||||||
opts.statusline = {
|
opts.statusline = {
|
||||||
hl = { fg = "fg", bg = "bg" },
|
hl = { fg = "fg", bg = "bg" },
|
||||||
status.component.mode { mode_text = { hl = { bold = true }, padding = { left = 1, right = 1 } } },
|
status.component.mode({ mode_text = { hl = { bold = true }, padding = { left = 1, right = 1 } } }),
|
||||||
status.component.file_info {
|
status.component.file_info({
|
||||||
filetype = false,
|
filetype = false,
|
||||||
filename = {
|
filename = {
|
||||||
modify = ":~:.",
|
modify = ":~:.",
|
||||||
},
|
},
|
||||||
file_modified = {},
|
file_modified = {},
|
||||||
},
|
}),
|
||||||
status.component.diagnostics(),
|
status.component.diagnostics(),
|
||||||
status.component.fill(),
|
status.component.fill(),
|
||||||
status.component.cmd_info(),
|
status.component.cmd_info(),
|
||||||
status.component.fill(),
|
status.component.fill(),
|
||||||
status.component.lsp(),
|
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_diff(),
|
||||||
status.component.git_branch(),
|
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
|
modify = ":~:.:h", -- Relative path and cut filename
|
||||||
}
|
})
|
||||||
-- Fix path separation on windows
|
-- Fix path separation on windows
|
||||||
local path_func = get_file_path
|
local path_func = get_file_path
|
||||||
if vim.fn.has("win32") then
|
if vim.fn.has("win32") then
|
||||||
@@ -45,34 +45,34 @@ return {
|
|||||||
{
|
{
|
||||||
-- Set display priority to hide when component is too big to fit
|
-- Set display priority to hide when component is too big to fit
|
||||||
flexible = 1,
|
flexible = 1,
|
||||||
status.component.separated_path {
|
status.component.separated_path({
|
||||||
flexible = 2,
|
flexible = 2,
|
||||||
max_depth = 5,
|
max_depth = 5,
|
||||||
path_func = path_func,
|
path_func = path_func,
|
||||||
},
|
}),
|
||||||
status.component.separated_path {
|
status.component.separated_path({
|
||||||
flexible = 3,
|
flexible = 3,
|
||||||
max_depth = 3,
|
max_depth = 3,
|
||||||
path_func = path_func,
|
path_func = path_func,
|
||||||
},
|
}),
|
||||||
status.component.separated_path {
|
status.component.separated_path({
|
||||||
flexible = 4,
|
flexible = 4,
|
||||||
max_depth = 1,
|
max_depth = 1,
|
||||||
path_func = path_func,
|
path_func = path_func,
|
||||||
},
|
}),
|
||||||
{
|
{
|
||||||
-- Hide
|
-- Hide
|
||||||
provider = "",
|
provider = "",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
status.component.file_info {
|
status.component.file_info({
|
||||||
file_icon = { hl = status.hl.file_icon("winbar"), padding = { left = 0 } },
|
file_icon = { hl = status.hl.file_icon("winbar"), padding = { left = 0 } },
|
||||||
file_modified = false,
|
file_modified = false,
|
||||||
file_read_only = false,
|
file_read_only = false,
|
||||||
hl = status.hl.get_attributes("winbarnc", true),
|
hl = status.hl.get_attributes("winbarnc", true),
|
||||||
surround = false,
|
surround = false,
|
||||||
update = "BufEnter",
|
update = "BufEnter",
|
||||||
},
|
}),
|
||||||
},
|
},
|
||||||
status.component.breadcrumbs(),
|
status.component.breadcrumbs(),
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
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" },
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
column_width = 120
|
column_width = 120
|
||||||
line_endings = "Unix"
|
line_endings = "Unix"
|
||||||
indent_type = "Spaces"
|
indent_type = "Spaces"
|
||||||
call_parentheses = "NoSingleTable"
|
call_parentheses = "Always"
|
||||||
collapse_simple_statement = "Always"
|
collapse_simple_statement = "Always"
|
||||||
|
|
||||||
[sort_requires]
|
[sort_requires]
|
||||||
|
|||||||
Reference in New Issue
Block a user