Skip to content

Minimal `init.lua` to Reproduce an Issue

Folke Lemaitre edited this page Oct 9, 2022 · 4 revisions

Please provide a minimal init.lua based off the following template:

vim.cmd([[set runtimepath=$VIMRUNTIME]])
vim.cmd([[set packpath=/tmp/nvim/site]])
local package_root = "/tmp/nvim/site/pack"
local install_path = package_root .. "/packer/start/packer.nvim"
local function load_plugins()
  require("packer").startup({
    {
      "wbthomason/packer.nvim",
      {
        "folke/noice.nvim",
        requires = {
          "MunifTanjim/nui.nvim",
          "rcarriga/nvim-notify",
        },
      },
      {
        "folke/tokyonight.nvim",
      },
      -- ADD PLUGINS THAT ARE _NECESSARY_ FOR REPRODUCING THE ISSUE
    },
    config = {
      package_root = package_root,
      compile_path = install_path .. "/plugin/packer_compiled.lua",
      display = { non_interactive = true },
    },
  })
end
_G.load_config = function()
  require("noice").setup()
  vim.opt.termguicolors = true
  vim.cmd([[colorscheme tokyonight]])
  -- ADD INIT.LUA SETTINGS THAT ARE _NECESSARY_ FOR REPRODUCING THE ISSUE
end
if vim.fn.isdirectory(install_path) == 0 then
  print("Installing Noice and dependencies.")
  vim.fn.system({ "git", "clone", "--depth=1", "https://github.com/wbthomason/packer.nvim", install_path })
end
load_plugins()
require("packer").sync()
vim.cmd([[autocmd User PackerComplete ++once echo "Ready!" | lua load_config()]])
Clone this wiki locally