Page 1 of 1

random recognition of javascript files?

Posted: Thu Aug 29, 2013 2:44 am
by petah
Hi Eran,

It seems that CL recognizes javascript inconsistently, i.e. sometimes syntax highlighting works perfectly; at others it colors blocks of lines seemingly randomly.

The attached file is part of a C++ CL project; the js file gets fed to a 3rd-party application after my app launches, so it's really a resource file as far as CL is concerned. The javascript code isn't pretty, mainly because I'm a Lua-head and hence not exactly a javascript fan, but AFAIK it's valid syntax.

I know CL makes no promises outside C/C++ files (doesn't claim to be a generic editor supporting other languages) but am wondering what affects js recognition. It's the only js file in my CL project and I edit it pretty rarely; there seems to be no relationship between the js file's content and it being recognized, but I could be wrong.

Is there a log that could give me a clue to either enable or disable syntax coloring consistently? If there isn't and/or my question falls outside CL's scope I can configure CL to open it with an external editor like Geany but it'd be nice if I could stay within CL.

thx & cheers!

-- p

Re: random recognition of javascript files?

Posted: Thu Aug 29, 2013 7:43 pm
by eranif
Which version of codelite are u using?
It works perfectly for me (Windows, codelite 5.3 - git)

Notice that I am using wxWidgets 2.9.5 - which has a much more up to date version of wxStyledTextCtrl which fixed various colouring issues (including sometime colouring grey blocks)

Eran

Re: random recognition of javascript files?

Posted: Fri Aug 30, 2013 4:25 am
by petah
I'm using CL 5.3, compiled on July 25 from git and wx295, under Debian x64.

My problem is indeed that some blocks were colored grey and black.

I just built wx/samples/stc and opened the js file; it's completely grey but the code folding markers on the left seem to indicate syntax is properly recognized. When I open a cpp file it's fully colored as inside CL.

I'll look at the wxSTC doc for how/where syntax definitions are declared and any error indicators. I'll also do a rebuild all in case some older wxstc had been cached.

thx,

-- p