mirror of
https://github.com/Hopiu/micro.git
synced 2026-04-12 10:30:59 +00:00
Add support for init.lua file in ~/.config/micro
This commit is contained in:
parent
f9cb99b35f
commit
f9e8a2426b
1 changed files with 7 additions and 0 deletions
|
|
@ -3,6 +3,7 @@ package main
|
|||
import (
|
||||
"errors"
|
||||
"io/ioutil"
|
||||
"os"
|
||||
"strings"
|
||||
|
||||
"github.com/layeh/gopher-luar"
|
||||
|
|
@ -131,4 +132,10 @@ func LoadPlugins() {
|
|||
loadedPlugins = append(loadedPlugins, pluginName)
|
||||
}
|
||||
}
|
||||
|
||||
if _, err := os.Stat(configDir + "/init.lua"); err == nil {
|
||||
if err := L.DoFile(configDir + "/init.lua"); err != nil {
|
||||
TermMessage(err)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue