Arrow color when no space
We use -> without space around it for struct field access:
@sockmaster27 Do you think it would be possible to give it a different color? I tried messing around in the grammar file, but I was unsuccessful.
I can fix it in the normal VS Code color scheme, but it's sort of a problem that the Flixify theme makes all keywords and operators the same color, so the only way to get it to be different is either to not categorize it as anything, or to categorize it as like a string literal or something.
I don't know if such semantic abuse could hurt anything (I'm specifically thinking of Linguist that does more than just highlighting), but it at the very least feels wrong, and it might be a problem with other third party themes.
Could we change the Flixify theme to accommodate this?
I suppose I never thought about whether -> is a keyword or an operator.
What if I want it to be neither?
I suppose I never thought about whether -> is a keyword or an operator.
What if I want it to be neither?
It just needs to be in a category that the different color themes recognize, and it looks like the standard way to categorize an operator is called keyword.operator for whatever reason. I don't believe there's any reason for it to match the philosophy of the language one to one, but it's probably not great to suddenly categorize the arrow as a number literal or something like that.
I've found that categorizing the function arrow as a regular keyword and the struct arrow as an operator happens to work fairly well with most of the default themes, just not Flixify:
Thanks for all the info. Very helpful. Ill talk to @dghosef and see what he thinks.
What is . classified as(if anything)?
What is
.classified as(if anything)?
It's not categorized as anything currently.
It sort of feels that ->, #, and . have similar enough purposes that they should be highlighted in the same fashion. I'm not familiar with a lot of LSP stuff though or conventions with other languages