comparison .chezmoitemplates/init.lua @ 649:cc06db32b946

Source local plugins if available
author zegervdv <zegervdv@me.com>
date Fri, 02 Sep 2022 07:39:58 +0200
parents c5ed13440614
children 40d77e69a46e
comparison
equal deleted inserted replaced
648:c5ed13440614 649:cc06db32b946
15 execute('!git clone https://github.com/wbthomason/packer.nvim ' .. install_path) 15 execute('!git clone https://github.com/wbthomason/packer.nvim ' .. install_path)
16 end 16 end
17 17
18 -- Packer configuration is compiled and only needs to be loaded on changes 18 -- Packer configuration is compiled and only needs to be loaded on changes
19 vim.cmd.packadd 'packer.nvim' 19 vim.cmd.packadd 'packer.nvim'
20
21 local local_plugin = function(name)
22 local path = home .. '/Projects/' .. name
23 if vim.fn.isdirectory(path) > 0 then
24 return path
25 else
26 return 'zegervdv/' .. name
27 end
28 end
20 29
21 require('packer').startup(function() 30 require('packer').startup(function()
22 use { 'wbthomason/packer.nvim', opt = true } 31 use { 'wbthomason/packer.nvim', opt = true }
23 32
24 -- General plugins 33 -- General plugins
624 vim.api.nvim_set_hl(0, name, opt) 633 vim.api.nvim_set_hl(0, name, opt)
625 end 634 end
626 end, 635 end,
627 } 636 }
628 use { 637 use {
629 'zegervdv/espresso-tutti-colori.nvim', 638 local_plugin 'espresso-tutti-colori.nvim',
630 config = function() 639 config = function()
631 require('tutti-colori').setup() 640 require('tutti-colori').setup()
632 require('tutti-colori').load() 641 require('tutti-colori').load()
633 end, 642 end,
634 } 643 }