From 62a6cc56b96fc0c11efa56ebc8efdc5d8d1bbb74 Mon Sep 17 00:00:00 2001 From: TorchedSammy <38820196+TorchedSammy@users.noreply.github.com> Date: Sat, 26 Mar 2022 18:28:01 -0400 Subject: [PATCH] docs: document hilbish.highlighter --- api.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/api.go b/api.go index 9ef51e3..68554f8 100644 --- a/api.go +++ b/api.go @@ -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