In the SQL Syntax Highligter Example an example of formatters API is shown. However, it appears that the string that is passed to a custom formatter function is not whole user input string, but parts of it before and after the cursor (the function is called multiple times with different parts of input string).
This weird behavior leads to some highlighting artefacts, such as: highlighting disappears when user moves the cursor over keyword. Is there a way to apply formatter to the whole input string instead?