Livecode syntax highlighting in VSCode

Collaborate on tools, libraries, and applications beyond the IDE

Moderators: Klaus, FourthWorld, heatherlaine, kevinmiller, robinmiller

Post Reply
prometheus
Posts: 5
Joined: Sun Dec 13, 2015 6:05 pm

Livecode syntax highlighting in VSCode

Post by prometheus » Tue Oct 06, 2020 4:09 pm

Hello LiveCode community, I would like to announce that there is already available an extension to highlight LiveCode syntax in VS Code. It is in its initial state, so collaboration would be appreciated to turn this into a great extension.

Current features :
- Syntax highlightning for Livecode script
- Syntax highlightning for Livecode builder
- Code outline for livecodescript (handlers, multi line comments and variables)
- Code snippets for Livecode script
- Auto closing pairs for both LCS and LCB

**Suggestions are welcome**

Repository on github: https://github.com/Ferruslogic/livecode ... ghlighting
Extension on visualstudio marketplace: https://marketplace.visualstudio.com/it ... ghlighting
Last edited by prometheus on Tue Oct 13, 2020 4:21 pm, edited 3 times in total.

SparkOut
Posts: 2297
Joined: Sun Sep 23, 2007 4:58 pm

Re: Livecode syntax highlighting in VSCode

Post by SparkOut » Tue Oct 06, 2020 7:14 pm

Wow, this looks great. I just browsed the marketplace, found and installed it, no hassle.
I added .lc as a format to be interpreted as livecodescript and it shows all the syntax highlighting I'd expect. I've not yet tested in depth but looking great so far.
Good job and thank you. How come this is your first post here?

kdjanz
Posts: 227
Joined: Fri Dec 09, 2011 12:12 pm
Location: Fort Saskatchewan, AB Canada

Re: Livecode syntax highlighting in VSCode

Post by kdjanz » Tue Oct 06, 2020 8:01 pm

I'm trying this out as well. It would be great to integrate it with LiveCode server the way Thierry has with Bbedit so that we could comfortably replace the IDE. I'm just a beginner, so I don't even really know what linting and code folding and refactoring mean, but it all sounds like something I might want to know and have available.

prometheus
Posts: 5
Joined: Sun Dec 13, 2015 6:05 pm

Re: Livecode syntax highlighting in VSCode

Post by prometheus » Tue Oct 06, 2020 8:03 pm

SparkOut wrote:
Tue Oct 06, 2020 7:14 pm
Wow, this looks great. I just browsed the marketplace, found and installed it, no hassle.
I added .lc as a format to be interpreted as livecodescript and it shows all the syntax highlighting I'd expect. I've not yet tested in depth but looking great so far.
Good job and thank you. How come this is your first post here?
Hello SparkOut, thanks for the comment, this is an ongoing work, just starting, I've found some bugs already, updates will come out regularly and eventually we will add some features like syntax checking and a better autocompletion.

prometheus
Posts: 5
Joined: Sun Dec 13, 2015 6:05 pm

Re: Livecode syntax highlighting in VSCode

Post by prometheus » Tue Oct 06, 2020 8:07 pm

kdjanz wrote:
Tue Oct 06, 2020 8:01 pm
I'm trying this out as well. It would be great to integrate it with LiveCode server the way Thierry has with Bbedit so that we could comfortably replace the IDE. I'm just a beginner, so I don't even really know what linting and code folding and refactoring mean, but it all sounds like something I might want to know and have available.
Hi kdjanz, that is on the list, I think maybe in two weeks the linting will be ready for testing

kdjanz
Posts: 227
Joined: Fri Dec 09, 2011 12:12 pm
Location: Fort Saskatchewan, AB Canada

Re: Livecode syntax highlighting in VSCode

Post by kdjanz » Tue Oct 06, 2020 9:55 pm

Thanks Prometheus, but if you get the meaning of my post, I don't even know what listing is!

I'm an older non coder that picked up LiveCode in retirement to keep the brain active, and it is doing a good job!

prometheus
Posts: 5
Joined: Sun Dec 13, 2015 6:05 pm

Re: Livecode syntax highlighting in VSCode

Post by prometheus » Tue Oct 06, 2020 10:02 pm

kdjanz wrote:
Tue Oct 06, 2020 9:55 pm
Thanks Prometheus, but if you get the meaning of my post, I don't even know what listing is!

I'm an older non coder that picked up LiveCode in retirement to keep the brain active, and it is doing a good job!
I thought you were exaggerating :-), well, good choice with livecode, you will learn little by little, by the way the linting is the checking of the code syntax from the editor

kdjanz
Posts: 227
Joined: Fri Dec 09, 2011 12:12 pm
Location: Fort Saskatchewan, AB Canada

Re: Livecode syntax highlighting in VSCode

Post by kdjanz » Tue Oct 06, 2020 11:03 pm

Thanks. OK, so the IDE does linting already by putting the red X up and no letting you compile - Right?

So what made you start to work on LiveCode and how long have you been working with it?
Is your intent with VSCode to replace the IDE?

Since VSCode can't do anything with binary LiveCode files, I think that Brian Milby's - Script Tracker will be essential for me. It takes all the scripts out of a binary and puts them into text files, and can also notify the IDE when scripts have been modified on the outside so that they can update. I have been using Script Tracker as a way of printing out and looking through all my scripts offline and away from the computer - either when I am banging my head against a bug or planning how to add a new feature.

If we can get VSC linked into that loop - so much the better for this beginner!

I'm also doing the LiveCode University program at the moment and did the summer zoom sessions with Elanor (they were the best), so I'm much more comfortable with scripting and making the beast do what I want now.

bwmilby
Posts: 346
Joined: Wed Jun 07, 2017 5:37 am
Location: Henrico, VA
Contact:

Re: Livecode syntax highlighting in VSCode

Post by bwmilby » Thu Oct 08, 2020 12:39 am

One good thing about ScriptTracker is that it doesn’t need the editor to send anything to the IDE. It works by watching the file system to detect changes, so any editor will do. I currently use Atom to edit code outside the IDE since it also does linting. There is a new standard out there for linting (which I think VSCode and Atom support) so work in that area would benefit multiple editors. Currently linting uses the server version of LC but it would be nice to be able to use the IDE itself (or even a standalone built from it) as the linter.
Brian Milby

Script Tracker https://github.com/bwmilby/scriptTracker

prometheus
Posts: 5
Joined: Sun Dec 13, 2015 6:05 pm

Re: Livecode syntax highlighting in VSCode

Post by prometheus » Thu Oct 08, 2020 4:33 am

kdjanz wrote:
Tue Oct 06, 2020 11:03 pm
Thanks. OK, so the IDE does linting already by putting the red X up and no letting you compile - Right?

So what made you start to work on LiveCode and how long have you been working with it?
Is your intent with VSCode to replace the IDE?

Since VSCode can't do anything with binary LiveCode files, I think that Brian Milby's - Script Tracker will be essential for me. It takes all the scripts out of a binary and puts them into text files, and can also notify the IDE when scripts have been modified on the outside so that they can update. I have been using Script Tracker as a way of printing out and looking through all my scripts offline and away from the computer - either when I am banging my head against a bug or planning how to add a new feature.

If we can get VSC linked into that loop - so much the better for this beginner!

I'm also doing the LiveCode University program at the moment and did the summer zoom sessions with Elanor (they were the best), so I'm much more comfortable with scripting and making the beast do what I want now.
Hello kdjanz, I have been using the IDE since it was revolution 2_7 if I remember correctly, about 13 years ago, I started to use it mostly as a hobby, then I took a liking to it and here we are, my intention is not to replace the IDE, it is to put more tools available to the community, also my preferred editor is vscode, so nothing better than to have my favorite IDE and my favorite editor working together, it is also very useful for LCB plugins, I use it with a plugin that may publish in a few days that does something like the tracker script you mentioned.

Post Reply

Return to “Community Projects”