[READ-ONLY] Mirror of https://github.com/Savy011/dotfiles.
Something went wrong. Try again.
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134return { { 'numToStr/Comment.nvim', opts = {} }, { "windwp/nvim-autopairs", event = "InsertEnter", opts = {} }, 'windwp/nvim-ts-autotag', { "RRethy/vim-illuminate", event = { "BufReadPost", "BufNewFile" }, opts = { delay = 200, large_file_cutoff = 2000, large_file_overrides = { providers = { "lsp" }, }, }, config = function(_, opts) require("illuminate").configure(opts) local function map(key, dir, buffer) vim.keymap.set("n", key, function() require("illuminate")["goto_" .. dir .. "_reference"](false) end, { desc = dir:sub(1, 1):upper() .. dir:sub(2) .. " Reference", buffer = buffer }) end map("]]", "next") map("[[", "prev") vim.api.nvim_create_autocmd("FileType", { callback = function() local buffer = vim.api.nvim_get_current_buf() map("]]", "next", buffer) map("[[", "prev", buffer) end, }) end, keys = { { "]]", desc = "Next Reference" }, { "[[", desc = "Prev Reference" }, }, }, { "p00f/nvim-ts-rainbow", event = { "BufReadPre", "BufNewFile" } }, { "lukas-reineke/indent-blankline.nvim", event = { "BufReadPost", "BufNewFile" }, opts = { char = '┊', filetype_exclude = { "help", "alpha", "dashboard", "lazy" }, show_trailing_blankline_indent = false, show_current_context = false, } }, { "utilyre/barbecue.nvim", name = "barbecue", version = "*", dependencies = { "SmiteshP/nvim-navic", "nvim-tree/nvim-web-devicons", -- optional dependency }, opts = { show_dirname = false }, }, { "goolord/alpha-nvim", event = "VimEnter", opts = function() local dashboard = require("alpha.themes.dashboard") local logo = [[ _ __ _| | / /__ ___ ___ (_)___ ___| | /| / / _ \/ _ \/ _ \______/ / __ `__ \| |/ |/ / __/ __/ __/_____/ / / / / / /|__/|__/\___/\___/\___/ /_/_/ /_/ /_/ ]]
dashboard.section.header.val = vim.split(logo, '\n') dashboard.section.buttons.val = { dashboard.button("f", " " .. " Find file", ":Telescope find_files <CR>"), dashboard.button("n", " " .. " New file", ":ene <BAR> startinsert <CR>"), dashboard.button("r", " " .. " Recent files", ":Telescope oldfiles <CR>"), dashboard.button("g", " " .. " Find text", ":Telescope live_grep <CR>"), dashboard.button("c", " " .. " Config", ":e $MYVIMRC <CR>"), dashboard.button("s", " " .. " Restore Session", [[:lua require("persistence").load() <cr>]]), dashboard.button("l", " " .. " Lazy", ":Lazy<CR>"), dashboard.button("q", " " .. " Quit", ":qa<CR>"), }
for _, button in ipairs(dashboard.section.buttons.val) do button.opts.hl = "AplhaButtons" button.opts.hl_shortcut = "AplhaShortcut" end
dashboard.section.header.opts.hl = "AlphaHeader" dashboard.section.buttons.opts.hl = "AlphaButtons" dashboard.section.footer.opts.hl = "AlphaFooter" dashboard.opts.layout[1].val = 8
return dashboard end, config = function(_, dashboard) if vim.o.filetype == "lazy" then vim.cmd.close() vim.api.nvim_create_autocmd("User", { pattern = "AphaReady", callback = function() require("lazy").show() end }) end
require("alpha").setup(dashboard.opts)
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, },}