Author Topic: Syntax highlighting - AngelScript  (Read 8755 times)

Offline cacb

  • Lives here!
  • ****
  • Posts: 536
Syntax highlighting - AngelScript
« on: September 12, 2011, 09:56:14 am »
I have been experimenting with AngelScript and having some success. However, there seems to be an issue in Code::Blocks when editing AngelScript files. These files typically have suffix .as.

The syntax of AngelScript is very similar to C++, so the syntax highlighting should be similar as well. I can see that Code::Blocks has support for AngelScript syntax highlighting in Settings -> Editor ... Syntax Highlighting. But When I include an *.as file, it isn't displayed as in the Syntax Highlighting dialog preview, instead it becomes totally unreadable since all language keywords are displayed with background colour (white). I have tried to fix it by manipulating the Syntax Highlighting settings, but I am having no luck. So for the moment I rename the files to *.as2 to see the script in all black only.

See the attachments for what the problem looks like (AngelScript.png), and what it should look like if everything is ok (cpp.png, this was made by renaming the file to .cpp).

I am on Windows XP and using Nightly Build svn 7289 (binary downloaded).

Offline renega_666

  • Multiple posting newcomer
  • *
  • Posts: 36
Re: Syntax highlighting - AngelScript
« Reply #1 on: September 13, 2011, 12:58:59 pm »
I have the exact same problem as cacb explains.
I'm on win xp and win7  with code blocks rev 7387.
Also removing the file mask for *.as files in the syntax highlighting for the AngelScript langage doesn't change anything...

Offline cacb

  • Lives here!
  • ****
  • Posts: 536
Re: Syntax highlighting - AngelScript
« Reply #2 on: September 13, 2011, 09:42:02 pm »
Same problem also under Linux Kubuntu 11.04 using Code::Blocks svn 7447 (binary build Sep 7 2011 from Jens Lody). Apparently this bug is OS-independent and visible in the latest versions.

Any advice appreciated.

Offline ouch

  • Almost regular
  • **
  • Posts: 223
Re: Syntax highlighting - AngelScript
« Reply #3 on: September 16, 2011, 08:30:11 pm »
looks fine for me. win7, 7448

all you would have to do is go to Settings->editor->syntax highlighting and from the drop down box labeled "Sytax highlighting for:" select angelscript.

Then just look through the list and change any colors that don't make sense.

Offline cacb

  • Lives here!
  • ****
  • Posts: 536
Re: Syntax highlighting - AngelScript
« Reply #4 on: September 17, 2011, 11:30:29 pm »
looks fine for me. win7, 7448

all you would have to do is go to Settings->editor->syntax highlighting and from the drop down box labeled "Sytax highlighting for:" select angelscript.

Then just look through the list and change any colors that don't make sense.

I am glad you got it to work.  :o

I have of course tried what you suggest, but nothing works here. I have also just now upgraded to 7452 (XP), and the problem persists. I am not able to change anything, really.

Just now I did, using 7452
- An Angelscript *.as file is open, displayed wrong as described before.
- Settings->editor->syntax highlighting 
   Syntax highlighting for: AngelScript
- I made some changes, for example light grey background. This was displayed ok in the code preview in the dialog.
- Then I pressed OK, expecting the actual code to look the same. It didn't. Nothing had changed. My *.as file is just as unreadable as before.

This feature does not work at all for AngelScript over here.

Offline cacb

  • Lives here!
  • ****
  • Posts: 536
Re: Syntax highlighting - AngelScript
« Reply #5 on: September 29, 2011, 12:10:59 am »
This feature does not work at all for AngelScript over here.

For the record: I am now on C::B 7070 - Kubuntu 11.04. I have tried for half an hour to edit syntax highlighting for AngelScript, but I get absolutely no effect, and the whole thing remains completely unreadable  if I use the *.as file suffix. What on earth am I missing?

damianpaz

  • Guest
Re: Syntax highlighting - AngelScript
« Reply #6 on: April 28, 2012, 10:54:20 pm »
There is a conflict with the language Haskell. You need to go to Settings->Editor->Syntax Highlighting, then select the language "Haskell" from the combo and press the button "Filemasks..." and delete the extension *.as. Then the angelscript files will get highlighted properly.

Offline cacb

  • Lives here!
  • ****
  • Posts: 536
Re: Syntax highlighting - AngelScript
« Reply #7 on: July 20, 2012, 02:16:48 pm »
There is a conflict with the language Haskell. You need to go to Settings->Editor->Syntax Highlighting, then select the language "Haskell" from the combo and press the button "Filemasks..." and delete the extension *.as. Then the angelscript files will get highlighted properly.

I just found your reply for this, this thread is moving slowly  ;)
Thank you for that clarification, I shall give it a try.

Edit: Actually, in Nightly Build svn 8133 (from Jens repository) the Angelscript problem appears to have been resolved (I'm on Kubuntu 12.04). Haskell doesn't have the *.as extension, so I guess that is the explanation.

Many thanks. 
« Last Edit: July 20, 2012, 02:35:42 pm by cacb »

Offline Alpha

  • Developer
  • Lives here!
  • *****
  • Posts: 1513
Re: Syntax highlighting - AngelScript
« Reply #8 on: July 20, 2012, 03:22:33 pm »
Edit: Actually, in Nightly Build svn 8133 (from Jens repository) the Angelscript problem appears to have been resolved (I'm on Kubuntu 12.04). Haskell doesn't have the *.as extension, so I guess that is the explanation.
I had been silently watching this thread: rev 8030 ;)