Syntax highlighting for VS Code - updated for 5.0

It’s only to tell you that we appreciate your work :wink:

First, thanks a lot for this extension!

But it looks a bit puzzling to me. I installed it in VS Code, and it does syntax highlighting, but only for basic language keywords like Var, Function, End etc

None of the system functions is highlighted

Is it how it’s supposed to work? And if yes, what’s the point of versions, these keywords aren’t different in version 5 of GPScript vs version 4, are they?

The token SetlistChanged was added as new option to the SystemEvent callback.

I’m not sure what you’re saying here

For me the extension doesn’t highlight even things like Select

You said keywords aren’t different between 4 and 5. ---- SetlistChanged is a new keyword

As for the other stuff, I can’t speak to how it was implemented — sounds like he mainly focused on code completion which is very useful

Ah, I see now what you mean

Autocompletion probably works indeed, although I’m not always sure what’s the source for it - this extension or GitHub Copilot

The syntax highlighting though is very limited

I would assume he’s pulling that info from the system function list — there’s a definition for each function

Yes, but what I mean is that Copilot also learns from existing scripts in the workspace, tracks variables and manipulations with them, and does its own autocomplete suggestions, so I don’t always know who exactly suggests what :slight_smile:

CoPilot for VS Code is a paid subscription, right?

Probably. I have the subscription from my job.

I don’t think it’s worth it for typical gpscript usage - it gets confused with the language, and even though it’s a bit better than generic LLMs like ChatGPT or whatever, it still hallucinates. So simple autocomplete is fine.

In my case however I have multiple scripts and includes and a lot of lines of code, so it’s very difficult to track everything. Here copilot is great, you can index the whole repo and it will “know” what all the scripts are doing, so it doesn’t just suggests functions, but whole blocks of code - you need to check that the logic is correct, but it’s much easier than copying and pasting.

It can also write whole scripts after a while in some cases.

I also experimented a bit with trying to convert my script into an extension using JUCE and the GP SDK, and it kinda works, but still assumes you’re a developer (and I’m not). So that needs a bit more work.