Add better intellisense support for Attributes?

edited July 10

Upon typing a [ at a spot where attributes are allowed, pressing Ctrl + [, intellisense will suggest attribute names, which is great. (Though maybe it shouldn't suggest snippets or other unrelated constructs? Should probably suggest the abbreviated names or have some indication that the Attribute part of the name is optional?) Is it smart enough to know what attributes can actually be used in this spot? (e.g., consider attribute targets, attributes that could be applied multiple times, inherited attributes, etc.)

Once you start typing a name however, it will list out the filtered names but using the full and abbreviated names (i.e., without the Attribute suffix). Ideally, it should show one or the other, but not both? Perhaps show the full name, but with the Attribute part dimmed? (similar to how Visual Studio handles it) Selecting the option when the full name is not typed would use the abbreviated name, and if Attribute was partially entered, it would use the full name would be used.

Once you commit to the name and add the opening (, there is no help with the arguments. Constructor arguments or settable properties should be suggested like other method/ctor calls. Instead, class members (depending on context) are included in the list of suggested names.

Hovering over the completed attribute does show info for the ctor overload that is used which is fine. Maybe it could list settable properties if applicable as well? It does show the property info if you hover over the property name.

Sign In or Register to comment.