Customize header
This commit is contained in:
parent
7119e95235
commit
265e0a0ece
1 changed files with 37 additions and 34 deletions
59
init.lua
59
init.lua
|
@ -53,15 +53,20 @@ local config = {
|
||||||
diagnostics_mode = 3, -- set the visibility of diagnostics in the UI (0=off, 1=only show in status line, 2=virtual text off, 3=all on)
|
diagnostics_mode = 3, -- set the visibility of diagnostics in the UI (0=off, 1=only show in status line, 2=virtual text off, 3=all on)
|
||||||
icons_enabled = true, -- disable icons in the UI (disable if no nerd font is available, requires :PackerSync after changing)
|
icons_enabled = true, -- disable icons in the UI (disable if no nerd font is available, requires :PackerSync after changing)
|
||||||
ui_notifications_enabled = true, -- disable notifications when toggling UI elements
|
ui_notifications_enabled = true, -- disable notifications when toggling UI elements
|
||||||
|
|
||||||
-- Copilot
|
-- Copilot
|
||||||
copilot_no_tab_map = true,
|
copilot_no_tab_map = true,
|
||||||
copilot_assume_mapped = true,
|
copilot_assume_mapped = true,
|
||||||
copilot_tab_fallback = "",
|
copilot_tab_fallback = "",
|
||||||
|
|
||||||
-- Taglist
|
-- Taglist
|
||||||
Tlist_Use_Right_Window = 1,
|
Tlist_Use_Right_Window = 1,
|
||||||
Tlist_GainFocus_On_ToggleOpen = 1,
|
Tlist_GainFocus_On_ToggleOpen = 1,
|
||||||
Tlist_Auto_Update = 1,
|
Tlist_Auto_Update = 1,
|
||||||
-- Tlist_Close_On_Select = 1,
|
-- Tlist_Close_On_Select = 1,
|
||||||
|
|
||||||
|
-- MarkdownPreview
|
||||||
|
mkdp_auto_close = 0
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
-- If you need more control, you can use the function()...end notation
|
-- If you need more control, you can use the function()...end notation
|
||||||
|
@ -107,14 +112,6 @@ local config = {
|
||||||
mappings = {
|
mappings = {
|
||||||
n = {
|
n = {
|
||||||
-- ["<leader>lf"] = false -- disable formatting keymap
|
-- ["<leader>lf"] = false -- disable formatting keymap
|
||||||
["<leader>c"] = {
|
|
||||||
function()
|
|
||||||
local bufs = vim.fn.getbufinfo { buflisted = true }
|
|
||||||
require("astronvim.utils.buffer").close(0)
|
|
||||||
if require("astronvim.utils").is_available "alpha-nvim" and not bufs[2] then require("alpha").start(true) end
|
|
||||||
end,
|
|
||||||
desc = "Close buffer",
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
-- add to the global LSP on_attach function
|
-- add to the global LSP on_attach function
|
||||||
|
@ -168,6 +165,17 @@ local config = {
|
||||||
-- tables with the `name` key will be registered with which-key if it's installed
|
-- tables with the `name` key will be registered with which-key if it's installed
|
||||||
-- this is useful for naming menus
|
-- this is useful for naming menus
|
||||||
["<leader>b"] = { name = "Buffers" },
|
["<leader>b"] = { name = "Buffers" },
|
||||||
|
|
||||||
|
-- Trigger Alpha dashboard on close when no buffers are left
|
||||||
|
["<leader>c"] = {
|
||||||
|
function()
|
||||||
|
local bufs = vim.fn.getbufinfo { buflisted = true }
|
||||||
|
require("astronvim.utils.buffer").close(0)
|
||||||
|
if require("astronvim.utils").is_available "alpha-nvim" and not bufs[2] then require("alpha").start(true) end
|
||||||
|
end,
|
||||||
|
desc = "Close buffer",
|
||||||
|
},
|
||||||
|
|
||||||
-- quick save
|
-- quick save
|
||||||
-- ["<C-s>"] = { ":w!<cr>", desc = "Save File" }, -- change description but the same command
|
-- ["<C-s>"] = { ":w!<cr>", desc = "Save File" }, -- change description but the same command
|
||||||
|
|
||||||
|
@ -378,30 +386,17 @@ local config = {
|
||||||
{
|
{
|
||||||
"ellisonleao/carbon-now.nvim",
|
"ellisonleao/carbon-now.nvim",
|
||||||
cmd = "CarbonNow",
|
cmd = "CarbonNow",
|
||||||
config = function()
|
|
||||||
require('carbon-now').setup()
|
|
||||||
end,
|
|
||||||
},
|
},
|
||||||
|
|
||||||
-- Comments
|
-- Comments
|
||||||
{
|
{
|
||||||
"folke/todo-comments.nvim",
|
"folke/todo-comments.nvim",
|
||||||
event = "BufEnter",
|
event = "BufEnter",
|
||||||
config = function()
|
|
||||||
require("todo-comments").setup()
|
|
||||||
end
|
|
||||||
},
|
},
|
||||||
-- Show todo comments, warnings, errors, ...
|
-- Show todo comments, warnings, errors, ...
|
||||||
{
|
{
|
||||||
"folke/trouble.nvim",
|
"folke/trouble.nvim",
|
||||||
cmd = { "TroubleToggle", "TodoTrouble" },
|
cmd = { "TroubleToggle", "TodoTrouble" },
|
||||||
config = function()
|
|
||||||
require("trouble").setup {
|
|
||||||
-- your configuration comes here
|
|
||||||
-- or leave it empty to use the default settings
|
|
||||||
-- refer to the configuration section below
|
|
||||||
}
|
|
||||||
end
|
|
||||||
},
|
},
|
||||||
-- TOC (functions, macros, ...)
|
-- TOC (functions, macros, ...)
|
||||||
{
|
{
|
||||||
|
@ -418,7 +413,8 @@ local config = {
|
||||||
-- PlatformIO
|
-- PlatformIO
|
||||||
{
|
{
|
||||||
"normen/vim-pio",
|
"normen/vim-pio",
|
||||||
event = "BufEnter"
|
-- event = "BufEnter"
|
||||||
|
cmd = { "PIO", "PIOInit", "PIOInstall", "PIOUninstall", "PIONewProject", "PIOAddLibrary", "PIORemoveLibrary" }
|
||||||
},
|
},
|
||||||
|
|
||||||
-- Text related
|
-- Text related
|
||||||
|
@ -430,7 +426,7 @@ local config = {
|
||||||
{
|
{
|
||||||
"iamcco/markdown-preview.nvim",
|
"iamcco/markdown-preview.nvim",
|
||||||
event = "BufEnter *.md",
|
event = "BufEnter *.md",
|
||||||
run = function() vim.fn["mkdp#util#install"]() end,
|
config = function() vim.fn["mkdp#util#install"]() end,
|
||||||
},
|
},
|
||||||
|
|
||||||
-- PlantUML
|
-- PlantUML
|
||||||
|
@ -466,17 +462,24 @@ local config = {
|
||||||
opts = function(_, opts)
|
opts = function(_, opts)
|
||||||
-- customize the dashboard header
|
-- customize the dashboard header
|
||||||
opts.section.header.val = {
|
opts.section.header.val = {
|
||||||
|
"███████ ████████ ███████ ███████ ██ ██ █████ ███████ ██ ██ ",
|
||||||
|
"██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ",
|
||||||
|
"███████ ██ █████ █████ █████ ███████ █████ ██ ██ ",
|
||||||
|
" ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ",
|
||||||
|
"███████ ██ ███████ ██ ██ ██ ██ ██ ██ ███████ ██████ ",
|
||||||
|
"",
|
||||||
" █████ ███████ ████████ ██████ ██████ ",
|
" █████ ███████ ████████ ██████ ██████ ",
|
||||||
" ██ ██ ██ ██ ██ ██ ██ ██ ",
|
" ██ ██ ██ ██ ██ ██ ██ ██ ",
|
||||||
" ███████ ███████ ██ ██████ ██ ██ ",
|
" ███████ ███████ ██ ██████ ██ ██ ",
|
||||||
" ██ ██ ██ ██ ██ ██ ██ ██ ",
|
" ██ ██ ██ ██ ██ ██ ██ ██ ",
|
||||||
" ██ ██ ███████ ██ ██ ██ ██████ ",
|
" ██ ██ ███████ ██ ██ ██ ██████ ",
|
||||||
" ",
|
" ",
|
||||||
" ███ ██ ██ ██ ██ ███ ███",
|
"",
|
||||||
" ████ ██ ██ ██ ██ ████ ████",
|
" ███ ██ ██ ██ ██ ███ ███",
|
||||||
" ██ ██ ██ ██ ██ ██ ██ ████ ██",
|
" ████ ██ ██ ██ ██ ████ ████",
|
||||||
" ██ ██ ██ ██ ██ ██ ██ ██ ██",
|
" ██ ██ ██ ██ ██ ██ ██ ████ ██",
|
||||||
" ██ ████ ████ ██ ██ ██",
|
" ██ ██ ██ ██ ██ ██ ██ ██ ██",
|
||||||
|
" ██ ████ ████ ██ ██ ██",
|
||||||
}
|
}
|
||||||
return opts
|
return opts
|
||||||
end,
|
end,
|
||||||
|
|
Loading…
Reference in a new issue