dotfiles

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README

starter-mini.lua (2171B)


      1 
      2 return {
      3 --   "echasnovski/mini.starter",
      4 --   version = false, -- until 0.7.0 release
      5 --   event = "VimEnter",
      6 --   opts = function()
      7 --     local logo = table.concat({
      8 --       "neovim",
      9 --     }, "\n")
     10 --     local pad = string.rep(" ", 1)
     11 --     local new_section = function(name, action, section)
     12 --       return { name = name, action = action, section = pad .. section }
     13 --     end
     14 --
     15 --     local starter = require("mini.starter")
     16 --     local config = {
     17 --       evaluate_single = true,
     18 --       header = logo,
     19 --       footer = "",
     20 --       items = {
     21 --         new_section("file search",  function() vim.cmd("Telescope find_files") end,     "Files"),
     22 --         new_section("text search",  function() vim.cmd("Telescope live_grep") end,      "Files"),
     23 --         new_section("recent files", function() vim.cmd("Telescope oldfiles") end,       "Files"),
     24 --         new_section("config",       function() vim.cmd("e $MYVIMRC") end,               "Config"),
     25 --         new_section("lazy",         function() vim.cmd("Lazy") end,                     "Config"),
     26 --         new_section("restore session", function() require("persistence").load() end,    "System"),
     27 --         new_section("new file",     function() vim.cmd("ene | startinsert") end,        "System"),
     28 --         new_section("quit",         function() vim.cmd("q") end,                        "System"),
     29 --       },
     30 --       content_hooks = {
     31 --         starter.gen_hook.adding_bullet(pad .. "░ ", false),
     32 --         starter.gen_hook.aligning("center", "center"),
     33 --       },
     34 --     }
     35 --     return config
     36 --   end,
     37 --
     38 --   config = function(_, config)
     39 --     local starter = require("mini.starter")
     40 --     starter.setup(config)
     41 --
     42 --     vim.api.nvim_create_autocmd("User", {
     43 --       pattern = "VimEnter",
     44 --       callback = function()
     45 --         local plugin_count = #vim.tbl_keys(require("lazy.core.config").plugins or {})
     46 --         local ms = vim.g.startuptime or 0
     47 --         local pad_footer = string.rep(" ", 8)
     48 --         starter.config.footer = pad_footer .. "Neovim loaded " .. plugin_count .. " plugins"
     49 --         pcall(starter.refresh, config)
     50 --       end,
     51 --     })
     52 --   end,
     53 }
     54 --