Add linter plugin support

This commit is contained in:
Zachary Yedidia
2019-08-02 23:46:25 -07:00
parent e7e0272968
commit 4027081e0e
11 changed files with 166 additions and 99 deletions

View File

@@ -367,8 +367,13 @@ func SetGlobalOptionNative(option string, nativeValue interface{}) error {
}
} else {
for _, pl := range config.Plugins {
if option == pl.Name && nativeValue.(bool) && !pl.Loaded {
pl.Load()
if option == pl.Name {
if nativeValue.(bool) && !pl.Loaded {
pl.Load()
pl.Call("init")
} else if !nativeValue.(bool) && pl.Loaded {
pl.Call("deinit")
}
}
}
}