init.lua 588 B

123456789101112131415161718192021
  1. local function bootstrap(pkg, repo)
  2. local plug_dir = vim.fn.stdpath('data') .. '/site/pack/packer/start/' .. pkg
  3. if vim.fn.isdirectory(plug_dir) ~= 1 then
  4. vim.fn.system({ 'git', 'clone', '--depth', '1', repo, plug_dir })
  5. vim.cmd.packadd(pkg)
  6. return true
  7. end
  8. return false
  9. end
  10. _G.first_launch = bootstrap('packer.nvim', 'https://github.com/wbthomason/packer.nvim')
  11. bootstrap('tangerine.nvim', 'https://github.com/udayvir-singh/tangerine.nvim')
  12. require('tangerine').setup({
  13. compiler = {
  14. hooks = {
  15. "oninit"
  16. }
  17. }
  18. })