You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Right now, typing out a preprocessing directive does not recommend any symbols aside from the standard .NET SDK ones. So if I have already typed #if SYMBOL in the document, I should be getting it recommended in expressions inside #define, #undef, #if, #elif.
The restriction for symbols within the document is only to avoid performance pitfalls, if there is no index capturing all the preprocessing symbol identifiers used in the compilation. Otherwise, it would be nice to extend this globally across the entire assembly or compilation.
The text was updated successfully, but these errors were encountered:
This seems exceptionally niche. We didn't offer this sort of behavior elsewhere with intellisense. You need to define the symbols everywhere else before they show up. I don't see why pp directives should be different
They are not ever "defined" in the sense other symbols are defined. Preprocessing symbols are always available to type out, and the intend is to determine if they are defined with a specific value at that point in the source. If the symbol is not defined in the project configuration, but I use it to check if it should include some code, then it should always be available to use.
I do agree that it's niche. Would love to pick it up myself since I've got some involvement with conditional compilation. It would save a lot of headaches down the line because you'd be avoiding typos that would not be caught by any compilation errors.
Even #defined symbols do not appear right now. And to avoid checking if a symbol is defined or not at a given place, I settled for simply checking if the same symbol name has been typed out again, to recommend those in addition to the already provided recommendations.
Right now, typing out a preprocessing directive does not recommend any symbols aside from the standard .NET SDK ones. So if I have already typed
#if SYMBOL
in the document, I should be getting it recommended in expressions inside#define
,#undef
,#if
,#elif
.The restriction for symbols within the document is only to avoid performance pitfalls, if there is no index capturing all the preprocessing symbol identifiers used in the compilation. Otherwise, it would be nice to extend this globally across the entire assembly or compilation.
The text was updated successfully, but these errors were encountered: