gptscript-ai / gptscript

Build AI assistants that interact with your systems
https://gptscript.ai
Apache License 2.0
2.87k stars 253 forks source link

Support syntax highlighting for `.gpt` files #8

Open njhale opened 6 months ago

njhale commented 6 months ago

Description

Provide syntax highlighting for .gpt files in at least one editor.

Motivation

Humans like colorful text.

Possible Solutions

It looks like a few popular editors like GoLand and VSCode support TextMate Grammar based syntax highlighting, so if it's possible to produce one that approximates .gpt file sytax => QED.

Bonus points for getting gptscript to generate the grammar by analyzing examples and introspecting its own source code.

drpebcak commented 5 months ago

ive created a very basic highlighter extension for vscode - https://github.com/drpebcak/gptscript-vscode