Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No code highlighting inside QUOTE macros #82

Open
dedmen opened this issue Oct 12, 2016 · 7 comments
Open

No code highlighting inside QUOTE macros #82

dedmen opened this issue Oct 12, 2016 · 7 comments

Comments

@dedmen
Copy link
Contributor

dedmen commented Oct 12, 2016

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.

@thojkooi
Copy link
Contributor

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.

@jonpas
Copy link
Member

jonpas commented Oct 12, 2016

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

@thojkooi
Copy link
Contributor

Do we not add the CBA macros to those files?

@jonpas
Copy link
Member

jonpas commented Oct 12, 2016

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.

@dedmen
Copy link
Contributor Author

dedmen commented Oct 13, 2016

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.

@jonpas jonpas added bug and removed by design labels Mar 21, 2017
@jonpas
Copy link
Member

jonpas commented Mar 21, 2017

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.

@acemod-bot
Copy link
Member

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants