danielscherzer / GLSL

VSIX Project that provides GLSL language integration.
258 stars 28 forks source link

Custom colors for new or redefined funcs #28

Closed barnes14 closed 5 years ago

barnes14 commented 5 years ago

Installed product versions

Description

how to set the color for texture2DRect or any redefined funcs? Like

define texLod textureLod

danielscherzer commented 5 years ago

Currently you can't. The extension does not parse the code to understand what is a macro or a function, but has fixed lists for the reserved names of glsl, grouped into variables, functions and keywords. For these 3 groups you can change the color in the visual studio option menu under Environment -> Fonts and Colors -> Display Items with GLSL as prefix. Does this help you?

barnes14 commented 5 years ago

I know how to change colors) About lists - can I change them?

danielscherzer commented 5 years ago

Currently only during the compile-time of the extension. The list with reserved names are compiled with the extension code as resources.

barnes14 commented 5 years ago

I thought as much) Can you tell me where in the code I can add my extensions?

danielscherzer commented 5 years ago

That depends on what exactly do you want as a result: Should macros be detected and colored if the substitute a function or do you want to add a user defined list of names that will be colored or something else?

barnes14 commented 5 years ago

I think a custom list of extensions will be enough

danielscherzer commented 5 years ago

The new release includes a user key words option field. You can enter a space separated list of key words. These will be colored with the GLSL user key word color under the Fonts and Colors section.

barnes14 commented 5 years ago

Nice!!! Big tnx))

danielscherzer commented 5 years ago

Glad to help!