changeset 649:cc06db32b946

Source local plugins if available
author zegervdv <zegervdv@me.com>
date Fri, 02 Sep 2022 07:39:58 +0200
parents c5ed13440614
children da1e79692928
files .chezmoitemplates/init.lua
diffstat 1 files changed, 10 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/.chezmoitemplates/init.lua	Fri Sep 02 07:37:49 2022 +0200
+++ b/.chezmoitemplates/init.lua	Fri Sep 02 07:39:58 2022 +0200
@@ -18,6 +18,15 @@
 -- Packer configuration is compiled and only needs to be loaded on changes
 vim.cmd.packadd 'packer.nvim'
 
+local local_plugin = function(name)
+  local path = home .. '/Projects/' .. name
+  if vim.fn.isdirectory(path) > 0 then
+    return path
+  else
+    return 'zegervdv/' .. name
+  end
+end
+
 require('packer').startup(function()
   use { 'wbthomason/packer.nvim', opt = true }
 
@@ -626,7 +635,7 @@
     end,
   }
   use {
-    'zegervdv/espresso-tutti-colori.nvim',
+    local_plugin 'espresso-tutti-colori.nvim',
     config = function()
       require('tutti-colori').setup()
       require('tutti-colori').load()