emacs-aichat icon indicating copy to clipboard operation
emacs-aichat copied to clipboard

eager code blocks fontification

Open ghost opened this issue 2 years ago • 1 comments

When the response written includes code blocks, those are only formatted when the end of the block is reached.

```lang
unfontifed code being inserted

It could be improved by tracking triple backtick notations "```lang ....` (and maybe also single backtick?) and eagerly append the (org translated) tags to trigger fontification asap, (while still inserting the code block content before the closing tag until the real closing backticks are received from the stream.

```lang
fontified code being inserted
``` <- eager closing tag (org translated)

ghost avatar Aug 06 '23 06:08 ghost

I do not have the time to implement this. PRs are welcome.

xhcoding avatar Aug 08 '23 13:08 xhcoding