JacksonKearl / ai-book

MIT License
34 stars 15 forks source link

Add markdown language highlighting to system/user/assistant languages #6

Closed msnidal closed 6 months ago

msnidal commented 7 months ago

Hello, thanks for this extension I'm finding this to actually be an incredible alternative to using chatgpt for coding, in particular having copilot, my vim keybindings and the ability to edit the conversation thread is all actually really great.

One quirk of the notebook format is the built-in markdown mode, which is ignore from what I can tell when constructing the messages. I understand the logic here, but also found that the markdown syntax highlighting is really nice for the prompts themselves, especially supporting Markdown code blocks like:

def my_function() -> int:
  return 42

I'm therefore copying the markdown tmLanguage.json file and trying to get the custom languages to inherit from it. Ideally I will also be able to disable the markdown mode after this to reduce confusion, will try and follow up with a PR soon

JacksonKearl commented 6 months ago

Neat, thanks!

Released in version 0.1.4 of the extension.