aboutsummaryrefslogtreecommitdiffstats
path: root/lua/alpha/init.lua
AgeCommit message (Expand)Author
2021-08-20add snippets, fix compAriel D'ALessandro
2021-08-14add packer and refactoringAriel DAlessandro
2021-07-26Initialization of the repository, copy from https://github.com/adalessa/dotfilesAriel D'ALessandro
local download_packer = function()
  if vim.fn.input "Download Packer? (y for yes)" ~= "y" then
    return
  end

  local directory = string.format("%s/site/pack/packer/start/", vim.fn.stdpath "data")

  vim.fn.mkdir(directory, "p")

  local out = vim.fn.system(
    string.format("git clone %s %s", "https://github.com/wbthomason/packer.nvim", directory .. "/packer.nvim")
  )

  print(out)
  print "Downloading packer.nvim..."
  print "( You'll need to restart now )"
end

return function()
  if not pcall(require, "packer") then
    download_packer()

    return true
  end

  return false
end