@@ -32,6 +32,8 @@ local add_raw_rtp = false
3232--- @field hook_install_done ? function
3333--- @field autoload ? boolean
3434--- @field fetch ? boolean If set to true , nvim-plug doesn ' t add the path to user runtimepath, and doesn' t load the bundle
35+ --- @field loaded ? boolean
36+ --- @field enabled ? boolean
3537
3638--- @param plugSpec PluginSpec
3739--- @return boolean
@@ -53,6 +55,7 @@ local function check_name(plugSpec)
5355 return s [# s ]
5456end
5557
58+ --- @param plugSpec PluginSpec
5659function M .parser (plugSpec )
5760 if type (plugSpec .enabled ) == ' nil' then
5861 plugSpec .enabled = true
@@ -90,7 +93,7 @@ function M.parser(plugSpec)
9093 elseif plugSpec .script_type == ' color' then
9194 plugSpec .rtp = config .bundle_dir .. ' /' .. plugSpec [1 ]
9295 plugSpec .path = config .bundle_dir .. ' /' .. plugSpec [1 ] .. ' /color'
93- plugSpec .repo = config .base_url .. ' /' .. plugSpec [1 ]
96+ plugSpec .url = config .base_url .. ' /' .. plugSpec [1 ]
9497 elseif plugSpec .script_type == ' plugin' then
9598 plugSpec .rtp = config .bundle_dir .. ' /' .. plugSpec [1 ]
9699 plugSpec .path = config .bundle_dir .. ' /' .. plugSpec [1 ] .. ' /plugin'
@@ -107,6 +110,7 @@ function M.parser(plugSpec)
107110 return plugSpec
108111end
109112
113+ --- @param plugSpec PluginSpec
110114function M .load (plugSpec )
111115 if
112116 plugSpec .rtp
@@ -123,7 +127,7 @@ function M.load(plugSpec)
123127 plugSpec .config ()
124128 end
125129 if vim .fn .has (' vim_starting' ) ~= 1 then
126- local plugin_directory_files = vim .fn .globpath (plugSpec .rtp , ' plugin/*.{lua,vim}' , 0 , 1 )
130+ local plugin_directory_files = vim .fn .globpath (plugSpec .rtp , ' plugin/*.{lua,vim}' , false , true )
127131 for _ , f in ipairs (plugin_directory_files ) do
128132 vim .cmd .source (f )
129133 end
0 commit comments