From 0aba60b5de7ea0470bf8b85231f03ea97cd9c26b Mon Sep 17 00:00:00 2001 From: TorchedSammy Date: Sat, 26 Mar 2022 22:28:27 +0000 Subject: [PATCH] docs: [ci] generate new docs --- docs/hilbish.txt | 6 +++++- emmyLuaDocs/hilbish.lua | 8 ++++++-- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/docs/hilbish.txt b/docs/hilbish.txt index 2b0f3af..d843b40 100644 --- a/docs/hilbish.txt +++ b/docs/hilbish.txt @@ -16,7 +16,11 @@ exec(cmd) > Replaces running hilbish with `cmd` goro(fn) > Puts `fn` in a goroutine - > +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. + hinter(cb) > Sets the hinter function. This will be called on every key insert to determine what text to use as an inline hint. The callback is passed 2 arguments: the current line and the position. It is expected to return a string diff --git a/emmyLuaDocs/hilbish.lua b/emmyLuaDocs/hilbish.lua index 4ed3c64..9b0c263 100644 --- a/emmyLuaDocs/hilbish.lua +++ b/emmyLuaDocs/hilbish.lua @@ -33,8 +33,12 @@ function hilbish.exec(cmd) end --- @param fn function function hilbish.goro(fn) end ---- -function hilbish.highlighter() end +--- 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 +function hilbish.highlighter(cb) end --- Sets the hinter function. This will be called on every key insert to determine --- what text to use as an inline hint. The callback is passed 2 arguments: