language-arma-atom icon indicating copy to clipboard operation
language-arma-atom copied to clipboard

No code highlighting inside QUOTE macros

Open dedmen opened this issue 9 years ago • 7 comments

I am using QUOTE(code) for the onLoad scripts in ui configs. But its not highlighting any code words. It should look like this: https://github.com/CBATeam/CBA_A3/blob/master/addons/diagnostic/gui.hpp#L14 (Github highlighting does it correctly) but it looks like this: Image of Atom code

As you can see encasing the code in {} fixes it a little. But doesn't fix the QUOTE macro itself not highlighting.

dedmen avatar Oct 12 '16 06:10 dedmen

This is mostly due to the fact we do not highlight sqf keywords in config files. The quote bit seems weird, maybe we can adjust our regex.

thojkooi avatar Oct 12 '16 17:10 thojkooi

*.cpp and *.hpp files are using C++ highlighting. By design, but if we can modify C++ highlighting to fit that wouldn't be bad.

jonpas avatar Oct 12 '16 17:10 jonpas

Do we not add the CBA macros to those files?

thojkooi avatar Oct 12 '16 17:10 thojkooi

No, everything is for SQF only. @dedmen Set your Atom to "Arma Config" when you open one of those files and see if it changes anything.

jonpas avatar Oct 12 '16 17:10 jonpas

Above screenshots were made with Arma config grammar. Setting it to SQF highlights everything correctly. Though its kinda unusual to have a bunch of script in a config file. But also highlighting of safezone* commands, which are often used in UI's, don't highlight in configs which is a little more important.

dedmen avatar Oct 13 '16 16:10 dedmen

Works like that in C++ header highlighter which we use, and we don't do any SQF highlighting at all in configs. Would just mean copying them to the cfg.json as well.

jonpas avatar Mar 21 '17 22:03 jonpas

Hello @acemod/maintainers. This ticket has been open for over 115 days without any activity.

acemod-bot avatar Jul 15 '17 20:07 acemod-bot