BGforgeNet/VScode-BGforge-MLS

[WeiDU, baf]Syntax Highlighting should not use the same color for Symbolic Identifiers and Numerical Constants

4Luke4 opened this issue · 7 comments

See the attached screenshot for further details. Code snippet below.

IF
	!CheckSpellState(Myself,WIZARD_SHIELD)
THEN
	RESPONSE #100
		Spell(Myself,WIZARD_SHIELD)
END

Same color

NOTE: This issue doesn't seem to be related to a particular Color Theme, it occurs with all of them....

Moreover, Syntax Highlighting should take into account the fact that two different IDS files might use the same identifier (e.g., WIZARD_SHIELD is used both in SPELL.ids and SPLSTATE.ids....)

Well, semantically they are constants, aren't they? We aren't just painting with pretty colors, the colors are anchored to the meaning.

I mentioned before (I think), it's better to suggest what should be, rather than what should not be. So,

  1. Why (Syntax Highlighting should not use the same color for Symbolic Identifiers and Numerical Constants)?
  2. How would you color this, considering semantic and theme limitations?

Moreover, Syntax Highlighting should take into account the fact that two different IDS files might use the same identifier (e.g., WIZARD_SHIELD is used both in SPELL.ids and SPLSTATE.ids....)

Sorry, I don't quite understand - take into account and do what?

Well, semantically they are constants, aren't they? We aren't just painting with pretty colors, the colors are anchored to the meaning.

Yeah, you're right, all of them are constants in the end, that's why the same color is used... I was simply wondering if it can be useful to assign them different colors for better identification (provided it can be done of course...)

Moreover, Syntax Highlighting should take into account the fact that two different IDS files might use the same identifier (e.g., WIZARD_SHIELD is used both in SPELL.ids and SPLSTATE.ids....)

Sorry, I don't quite understand - take into account and do what?

This is related to the first request: in case you decide to differentiate all those constants with different colors, then you should take into account the fact that different IDS files might use the same symbolic reference, so different colors are needed...

Actually, upon further reflection, I don't think my request can be accommodated: I mean, too many colors are needed...

Actually, upon further reflection, I don't think my request can be accommodated: I mean, too many colors are needed...

Yes, that's exactly the problem. IDS files are very numerous. I'd be happy to improve, but that is why I'm asking for actual suggestions and keep linking theme editor.

I guess I'll close this for now. Please feel free to re-open if you have a good idea/workaround.

Also, just saying, it should be possible to extend Monokai (or another theme) to support more scopes, colors, etc, and even bundle such custom theme with BGforge MLS.
However:

  1. All these extras will only be seen when using this custom theme.
  2. It's extra maintenance overhead, so it's not something I'd take on myself, at least now. But I'd be open to accepting submissions.