Syntax Highlighting

I just started using Cody, so I don’t know if the Syntax Highlighting in chat is determined by Sourcegraph or if it is a setting in VSCode. The syntax highlighting works for Javascript, Python, C#, but not Free Pascal. I am on Linux, if that matters. If there isn’t syntax highlighting for Free Pascal/Delphi, could you add it?

Hi @IndyDev VS Code handles the syntax highlighting.

You can download them here:

Includes support for dialects like Delphi and FreePascal.

I have this extension, and it is active. I have several others as well that offer syntax highlighting. They work on the actual units, but not in the chat sessions where cody offers some code samples. They highlighting works in cody chat sessions with Javascript, python etc, just not Pascal. It’s not terrible, because any code that I save into a unit does get the highlighting from the extension. If the generated code in the chat sessions gets its syntax highlighting from the extensions then I guess the extension builders need to know it.

Thanks

Forgive me, didn’t think about that. Just out of curiosity can you share a screenshot of what it looks like in chat now?

I will ask the product team if there is a way to add Pascal/Delphi highlighting. Pascal, man that takes me back to high school!

Attachment added. It is just plain code style text, as one would expect without highlighting. Nothing awful, just not as nice.

As for Free Pascal, discovered it about 5 years ago. So much has changed. Is oop now, has generics, function references and targets many processor architectures: Intel x86 (16 and 32 bit), AMD64/x86-64, PowerPC, PowerPC64, SPARC, SPARC64, ARM, AArch64, MIPS, Motorola 68k, AVR, and the JVM. Supports all Windows (16/32/64 bit, CE, and native NT), Linux, Mac OS X/iOS/iPhoneSimulator/Darwin, FreeBSD and other BSD flavors, DOS (16 bit, or 32 bit DPMI), OS/2, AIX, Android, Haiku, Nintendo GBA/DS/Wii, AmigaOS, MorphOS, AROS, Atari TOS, and embedded platforms. I have remade arcade games with it and put them on gaming consoles, written code for the various Pi’s, Linux tools, etc. Very easy to use, compiles to reasonable sizes and doesn’t need a complicated setup like Python with env or conda. I even made a desktop client for chatGPT. I wrote my own highlighter for it because chatGPT doesn’t highlight pascal code either.

One last request, unless I just don’t know how to do this. Is it possible to have the chat sessions saved in markdown format? So far, they save to JSON which preserves all of the internal CODY instructions that I don’t need. I just need the human and assistant responses. I suppose I could write a separate application to read through and grab them, but there is a lot of extraneous display code that I would have to parse.

Thanks

Thanks for the screenshot.

I will make sure the product team sees this in the weekly community feedback report. I believe there was a similar request, but they will decide whether to prioritize it. Thanks!