return { -- better vim.notify { "rcarriga/nvim-notify", config = { timeout = 3000, max_height = function() return math.floor(vim.o.lines * 0.75) end, max_width = function() return math.floor(vim.o.columns * 0.75) end, }, }, -- better vim.ui { "stevearc/dressing.nvim", init = function() ---@diagnostic disable-next-line: duplicate-set-field vim.ui.select = function(...) require("lazy").load({ plugins = { "dressing.nvim" } }) return vim.ui.select(...) end ---@diagnostic disable-next-line: duplicate-set-field vim.ui.input = function(...) require("lazy").load({ plugins = { "dressing.nvim" } }) return vim.ui.input(...) end end, }, -- bufferline { "akinsho/nvim-bufferline.lua", event = "BufAdd", config = { options = { diagnostics = "nvim_lsp", always_show_bufferline = false, diagnostics_indicator = function(_, _, diag) local icons = require("lazyvim.config.icons").diagnostics local ret = (diag.error and icons.Error .. diag.error .. " " or "") .. (diag.warning and icons.Warn .. diag.warning or "") return vim.trim(ret) end, offsets = { { filetype = "neo-tree", text = "Neo-tree", highlight = "Directory", text_align = "left", }, }, }, }, }, -- statusline { "nvim-lualine/lualine.nvim", event = "VeryLazy", config = { options = { globalstatus = true, disabled_filetypes = { statusline = { "lazy", "alpha" } }, }, }, }, -- indent guides for Neovim { "lukas-reineke/indent-blankline.nvim", event = "BufReadPre", config = { char = "▏", filetype_exclude = { "help", "alpha", "dashboard", "neo-tree", "Trouble", "lazy" }, show_trailing_blankline_indent = false, show_current_context = true, }, }, -- noicer ui { "folke/noice.nvim", event = "VeryLazy", config = { lsp = { override = { ["vim.lsp.util.convert_input_to_markdown_lines"] = true, ["vim.lsp.util.stylize_markdown"] = true, }, }, presets = { bottom_search = true, command_palette = true, long_message_to_split = true, }, }, }, -- dashboard { "goolord/alpha-nvim", event = "VimEnter", config = function() local dashboard = require("alpha.themes.dashboard") local logo = [[ ██╗ █████╗ ███████╗██╗ ██╗██╗ ██╗██╗███╗ ███╗ Z ██║ ██╔══██╗╚══███╔╝╚██╗ ██╔╝██║ ██║██║████╗ ████║ Z ██║ ███████║ ███╔╝ ╚████╔╝ ██║ ██║██║██╔████╔██║ z ██║ ██╔══██║ ███╔╝ ╚██╔╝ ╚██╗ ██╔╝██║██║╚██╔╝██║ z ███████╗██║ ██║███████╗ ██║ ╚████╔╝ ██║██║ ╚═╝ ██║ ╚══════╝╚═╝ ╚═╝╚══════╝ ╚═╝ ╚═══╝ ╚═╝╚═╝ ╚═╝ ]] dashboard.section.header.val = vim.split(logo, "\n") dashboard.section.buttons.val = { dashboard.button("f", " " .. " Find file", ":Telescope find_files "), dashboard.button("n", " " .. " New file", ":ene startinsert "), dashboard.button("r", " " .. " Recent files", ":Telescope oldfiles "), dashboard.button("g", " " .. " Find text", ":Telescope live_grep "), dashboard.button("c", " " .. " Config", ":e $MYVIMRC "), dashboard.button("l", "鈴" .. " Lazy", ":Lazy"), dashboard.button("q", " " .. " Quit", ":qa"), } for _, button in ipairs(dashboard.section.buttons.val) do button.opts.hl = "AlphaButtons" button.opts.hl_shortcut = "AlphaShortcut" end dashboard.section.footer.opts.hl = "Type" dashboard.section.header.opts.hl = "AlphaHeader" dashboard.section.buttons.opts.hl = "AlphaButtons" dashboard.opts.layout[1].val = 8 local alpha = require("alpha") if vim.o.filetype == "lazy" then -- close and re-open Lazy after showing alpha vim.cmd.close() alpha.setup(dashboard.opts) require("lazy").show() else alpha.setup(dashboard.opts) end vim.api.nvim_create_autocmd("User", { pattern = "LazyVimStarted", callback = function() local stats = require("lazy").stats() local ms = (math.floor(stats.startuptime * 100 + 0.5) / 100) dashboard.section.footer.val = "⚡ Neovim loaded " .. stats.count .. " plugins in " .. ms .. "ms" pcall(vim.cmd.AlphaRedraw) end, }) end, }, }