Open
Description
In Q# we can use @Config
attributes to mark a particular item as not being applicable to the current target.
@Config(Adaptive)
operation Foo() : Unit {
}
@Config(not Adaptive)
operation Foo() : Unit {
}
It would be nice to report the ranges for any of the code that is NOT included in the current compilation, to the editor, so that the editor can display them as grayed out.
VS Code does have support for this, but I'm not sure which property we need to set exactly. My guess is the Unnecessary
DiagnosticTag
(this is from LSP, but the VS Code equivalent should exist)
For reference, this is how Q# looks today in VS Code:
Compare to how conditionally compiled out code looks in Rust in VS Code: