mirror of
https://github.com/Hilbis/Hilbish
synced 2025-04-02 03:33:22 +00:00
docs: document hilbish.highlighter
This commit is contained in:
parent
e5d841a0a7
commit
62a6cc56b9
6
api.go
6
api.go
@ -519,6 +519,12 @@ func hlhinter(L *lua.LState) int {
|
|||||||
return 0
|
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 {
|
func hlhighlighter(L *lua.LState) int {
|
||||||
highlighterCb := L.CheckFunction(1)
|
highlighterCb := L.CheckFunction(1)
|
||||||
highlighter = highlighterCb
|
highlighter = highlighterCb
|
||||||
|
Loading…
x
Reference in New Issue
Block a user