docs: document hilbish.highlighter

pull/128/head
TorchedSammy 2022-03-26 18:28:01 -04:00
parent e5d841a0a7
commit 62a6cc56b9
Signed by: sammyette
GPG Key ID: 904FC49417B44DCD
1 changed files with 6 additions and 0 deletions

6
api.go
View File

@ -519,6 +519,12 @@ func hlhinter(L *lua.LState) int {
return 0
}
// highlighter(cb)
// Sets the highlighter function. This is mainly for syntax hightlighting, but in
// reality could set the input of the prompt to display anything. The callback
// is passed the current line as typed and is expected to return a line that will
// be used to display in the line.
// --- @param cb function
func hlhighlighter(L *lua.LState) int {
highlighterCb := L.CheckFunction(1)
highlighter = highlighterCb