New plugin teaser

That I can embed in a Xojo project?

I think I might renew my license just for this @Christian_Schmitz

I will ask, any chance you could write a Xojo lexer rather than having to use the VB one (which isnā€™t accurate). I need to highlight Xojoscript.

Iā€™d write one myself but I have never written any C++ code and thatā€™s what the lexers are written in.

Thanks for renewal.
A Xojo specific lexer is on the wish list for this.
Weā€™ll see as we need to know what it should look like, e.g. a list of changes we need to make on the VB one.

1 Like

Would it not be possible to write the lexer within Xojo itself?

As far as I see, the default way to make lexer is C++ and I would assume we will have one for Xojo.
Existing lexer list is quite excessive with over 130 entries.

But you can also run without a lexer and then do styling in StyleNeeded event.

1 Like

I started today a Xojo lexer based on the VB one:

So the // is now recognized as comment.

3 Likes

Thank you!

Welcome. The more difficult question is what other things to changeā€¦

Presumably there are keyword changes to add and remove (like Var, etc).

1 Like

I already put in the keyword list from the Xojo documentation.
You see that in the example already as it uses the xojo keyword list for the vb lexer.

I just loaded the example app. I pasted in 240 lines of Xojo code to test. If you scroll down and then back up again, the gutter disappears:

It also looks like itā€™s performing syntax highlighting within comments. Is it supposed to do that?

Garry doesnā€™t have the newer xojo lexer which now can handle // as comment.

Donā€™t laugh.
There are people making apps in Xojo, which may take HTML, JavaScript, SQL statements, XojoScript code or whatever and like to have it shown nicely with syntax highlighting, folding, auto complete and other features in a Xojo app.

5 Likes

there are many uses for this type of control, not only for standalone code editorsā€¦

Mine would use it for the internal scripting languageā€¦

4 Likes

I know and I didnā€™t dig/complain on your plugin. Not sure were you get that? Can you please explain that bit?
Also, any reason why you flagged my message? There is absolutely zero reason to do so. It was meant as a joke (and a good one). :slight_smile:

FWW this new plugin is great.

Anyhow ā€¦ I do think some people (mis)use that flag way too often for silly (or commercial?) reasons.

Seemed obvious to me that @ChristopheDV was being genuine

Enjoy the new plugin and please try it soon.

1 Like

Yes.