Replies: 1 comment 1 reply
-
Noth should work almost the same I suppose. Processor seem to work on text input, lexing on content creation, which if I'm not wrong, should be called each time the app updates. So if you go with the lexer, app.invalidate should, If I'm not wrong re-lex the document |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello,
I'm writing a prompt_toolkit program that highlights text in a document based on quotes (strings) from the document that have been saved to a separate file (
quotes.txt
). It is a full-screen program based on the pager.py example.I've been trying to implement a custom Lexer that does this, with limited success. I just found out about Processors and now I'm wondering if I should be using a custom Processor or maybe a different class?
Also, is it possible for a Lexer or Processor to be "refreshed" so that if I manually add strings that I want highlighted to quotes.txt, then prompt_toolkit can begin highlighting the new strings?
Beta Was this translation helpful? Give feedback.
All reactions