@@ -571,7 +571,7 @@ function Plugin.new(spec)
571571 is_remote = not name :find (vim .env .HOME ), -- Is it a remote or local plugin
572572 is_local = spec .is_local or false , -- Development mode flag
573573 is_lazy = spec .is_lazy or false , -- Whether to lazy load
574- load_path = nil , -- Loacal path to load
574+ local_path = nil , -- Loacal path to load
575575
576576 -- States
577577 status = STATUS .PENDING , -- Current plugin status
@@ -594,18 +594,18 @@ function Plugin.new(spec)
594594 dependencies = spec .depends or {}, -- Dependencies
595595
596596 user_commands = {}, -- Created user commands
597- build_action = spec .build or nil ,
597+ run_action = spec .build or nil ,
598598 }, Plugin )
599599
600600 return self
601601end
602602
603603-- Get the plugin installation path
604604function Plugin :get_path ()
605- if not self .is_local then
605+ if not self .is_local and not self . local_path then
606606 return vim .fs .joinpath (self .is_lazy and OPT_DIR or START_DIR , self .plugin_name )
607607 end
608- return vim .fs .joinpath (self .load_path , self .plugin_name ) or self .name
608+ return vim .fs .joinpath (self .local_path , self .plugin_name ) or self .name
609609end
610610
611611-- Check if plugin is installed (async version)
852852-- Mark plugin as a development plugin
853853function Plugin :load_path (path )
854854 self .is_local = true
855- self .load_path = vim .fs .normalize (path )
855+ self .local_path = vim .fs .normalize (path )
856856 self .is_remote = false
857857 return self
858858end
@@ -914,9 +914,9 @@ function Plugin:call_setup()
914914 end
915915end
916916
917- function Plugin :build (action )
917+ function Plugin :run (action )
918918 assert (type (action ) == ' string' )
919- self .build_action = action
919+ self .run_action = action
920920 return self
921921end
922922
@@ -983,9 +983,9 @@ function Plugin:install()
983983 end
984984
985985 -- Run build command if specified
986- if self .build_action then
986+ if self .run_action then
987987 self :load ()
988- vim .cmd (self .build_action )
988+ vim .cmd (self .run_action )
989989 end
990990 else
991991 self .status = STATUS .ERROR
@@ -1173,10 +1173,10 @@ function Plugin:install_with_retry()
11731173 self :theme (self .colorscheme )
11741174 end
11751175
1176- -- Run build command if specified
1177- if self .build_action then
1176+ -- Run command if specified
1177+ if self .run_action then
11781178 self :load ()
1179- vim .cmd (self .build_action )
1179+ vim .cmd (self .run_action )
11801180 end
11811181 else
11821182 self .status = STATUS .ERROR
0 commit comments