Jobs and gutter messages for plugins

This commit is contained in:
Zachary Yedidia
2019-08-02 18:29:47 -07:00
parent e3ae38e54a
commit e7e0272968
5 changed files with 165 additions and 8 deletions

View File

@@ -54,13 +54,7 @@ var statusInfo = map[string]func(*buffer.Buffer) string{
func SetStatusInfoFnLua(s string, fn string) {
luaFn := strings.Split(fn, ".")
plName, plFn := luaFn[0], luaFn[1]
var pl *config.Plugin
for _, p := range config.Plugins {
if p.Name == plName {
pl = p
break
}
}
pl := config.FindPlugin(plName)
statusInfo[s] = func(b *buffer.Buffer) string {
if pl == nil || !pl.IsEnabled() {
return ""