Compare commits

..

No commits in common. "6729ecddea9379f2c2b65ec70e20d36da13e626a" and "480d4de75039eea58f8927e88e3a8b658e6649bf" have entirely different histories.

3 changed files with 0 additions and 24 deletions

8
api.go
View File

@ -639,14 +639,6 @@ func hlhinter(t *rt.Thread, c *rt.GoCont) (rt.Cont, error) {
// reality could set the input of the prompt to *display* anything. The // reality could set the input of the prompt to *display* anything. The
// callback is passed the current line and is expected to return a line that // callback is passed the current line and is expected to return a line that
// will be used as the input display. // will be used as the input display.
// Note that to set a highlighter, one has to override this function.
// Example:
// ```
// function hilbish.highlighter(line)
// return line:gsub('"%w+"', function(c) return lunacolors.green(c) end)
// end
// ```
// This code will highlight all double quoted strings in green.
// --- @param line string // --- @param line string
func hlhighlighter(t *rt.Thread, c *rt.GoCont) (rt.Cont, error) { func hlhighlighter(t *rt.Thread, c *rt.GoCont) (rt.Cont, error) {
return c.Next(), nil return c.Next(), nil

View File

@ -49,14 +49,6 @@ Line highlighter handler. This is mainly for syntax highlighting, but in
reality could set the input of the prompt to *display* anything. The reality could set the input of the prompt to *display* anything. The
callback is passed the current line and is expected to return a line that callback is passed the current line and is expected to return a line that
will be used as the input display. will be used as the input display.
Note that to set a highlighter, one has to override this function.
Example:
```
function hilbish.highlighter(line)
return line:gsub('"%w+"', function(c) return lunacolors.green(c) end)
end
```
This code will highlight all double quoted strings in green.
### hinter(line, pos) ### hinter(line, pos)
The command line hint handler. It gets called on every key insert to The command line hint handler. It gets called on every key insert to

View File

@ -79,14 +79,6 @@ function hilbish.goro(fn) end
--- reality could set the input of the prompt to *display* anything. The --- reality could set the input of the prompt to *display* anything. The
--- callback is passed the current line and is expected to return a line that --- callback is passed the current line and is expected to return a line that
--- will be used as the input display. --- will be used as the input display.
--- Note that to set a highlighter, one has to override this function.
--- Example:
--- ```
--- function hilbish.highlighter(line)
--- return line:gsub('"%w+"', function(c) return lunacolors.green(c) end)
--- end
--- ```
--- This code will highlight all double quoted strings in green.
--- @param line string --- @param line string
function hilbish.highlighter(line) end function hilbish.highlighter(line) end