Open Meir017 opened 1 month ago
Changing from Feature Request to Design Debt, since this feature was originally implemented in #35667 and the more recent LSP work failed to meet parity.
@sharwell we added support for c# syntax highlighting within a doc comment codeblock in VS?
@CyrusNajmabadi Sorry, I added the above comment after seeing #75215. There are two separate reports here: a request for syntax highlighting, and an observation that the comment renders as inline text instead of a code block. The part implemented previously is just the code block portion.
The impression I have is that the C#-test
option is not really a public feature (hence the slightly awkward name) - although the fact is it used by people (including myself in projects) maybe demonstrates that properly exposing such functionality would be a good idea.
If this was going to be exposed, wouldn't it be better to expose it as just C#
? The reason its C#-test
currently is because it has support for the test markup syntax used for unit testing analyzers:
And people (like me) just use it as a stand in even outside of analzyer tests as there is no better option.
I added tasks to the main comment here including the different requests we have here, I think that while discussing having syntax highlighting inside <code>
comment tags it would make sense to even have intellisense (as if the code was inside this project)
Summary
In many libraries authors add code sample inside the
<code>
documentation comment, it would be helpful to have syntax highlighting for these code commentsBackground and Motivation
This type of syntax-highlighting already exists in the form of adding a
// lang=C#-test
or annotation an argument with[StringSyntax("C#-test")]
however, this doesn't work
from vscode:
tasks from this issues: